Access to polygons of an object #42
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(). |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I notice in
fn cube
you 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_polygon
but that returned an empty vector.Idea, provide a way to get the polygons you used to create an object.
Beta Was this translation helpful? Give feedback.
All reactions