This script generates a 3D model of diamond cut like the image below;
There might be several ways to make it in a trueSpace scene; e.g. boolean operations, putting vertices together, generating a polyhedron, etc. In the example, we use adding edge by PolyhMakeEdge() and separating polyhedra by PointsSeparate().
At the first, the script creates a cone with 16 longitudes in the scene (i.e. it's a 16-sided pyramid).
Turns it upside down, and sweeps the new top face upwards twice.
Scales down the uppermost (i.e. new top) face.
Adds diagonal edges in the faces just below the top vertices, and adds edges between next to next vertices on the top.
Selects the 3 faces surrounded by the 3 new edges just added.
The 3-face block can be separate from the object as a trigonal pyramid using PointsSeparate(). A face is added to each object. The script delete the trigonal pyramid and repeats the same operation for other top vertices.
Though you might feel it is an easy process, the script takes efforts to find each face or vertex.
The author added lights and materials to the generated scene by hand, and rendered as below.
Requirement: ptsxpy version 0.0.12
Apr 30 2021 edited: Supported tS4.3 at diamond1b.py. (After a message box appeared, please click "Point Edit" button BEFORE close it in case of tS4.3)
Diamond (2021)
- 3DfromNULL
- Site Admin
- Posts: 45
- Joined: 2018-Jul-13 9:35
Diamond (2021)
- Attachments
-
- diamond1b.py
- script file
- (8.99 KiB) Downloaded 1730 times