Access to polygons of an object #42
winksaville
started this conversation in
Ideas
Replies: 2 comments 5 replies
|
Every CSG contains a Vec polygons which contains all the 3D Polygons. So, csg.polygons. 2D geometry is stored in csg.geometry as a geo GeometryCollection, and there's an extra metadata in every CSG as well. I suppose a better name for to_polygons() might be geometry_to_polygons(). |
1 reply
Yes, that is expected behavior, as to_polygons converts a 2D geometry to a 3D geometry. Since you've only supplied a 3D geometry, to_polygons correctly returns an empty set. |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I notice in
fn cubeyou create 6 polygons then union them into the cube. In this case I want to access the polygons so I can modify the face, write text on them. I tried usingcube.to_polygonbut that returned an empty vector.Idea, provide a way to get the polygons you used to create an object.
All reactions