fidget
fidget copied to clipboard
Extrude a polygon to a solid
I am trying to implement an extrusion of a polygon face, how to make it happen? thanks.
This question isn't specific enough to provide an answer.
If you're looking for the mathematics, you can reference the libfive implementations of polygon and extrude_z.
Please provide details on what you're trying to do, including specific code that you've written.
I want to make an arbitrary polygon with some points, the libfive is a polygon made by a center and specific angle. I want to make a CAD application with a boolean operation including extrusion and revolution solids.
Fidget (and libfive before it) use implicit surfaces, so you need to find a way to convert your polygon to a pure mathematical equation representing (signed) distance to the polygon's boundary.
Here's one way to do it for Bézier curves. This example is using GLSL, so you'd have to translate the logic into the operators supported by Fidget. On the bright side, distance-to-a-line-segment is much easier than distance-to-a-Bézier-curve!
For now, I'm going to close this issue, because it's not Fidget-specific. When you have reached the point of using the Fidget library, feel free to reopen it.