jscad / csg.js

DEPRECATED: CSG Library for JSCAD (See the link below)
https://github.com/jscad/OpenJSCAD.org/tree/master/packages/modeling
MIT License
217 stars 56 forks source link

swept volume of a solid following a path #161

Closed gabrielandreussi closed 2 years ago

gabrielandreussi commented 5 years ago

Hello, I would like to know if there is a way to swept a solid into a path. I managed to find a result by transforming a solid into polygons and extruding them, but the result is slow and can only be done for linear extrusions. Example image attached Solid: 2 Swept volume result: 1

I would be happy if there is a solution for this, or if you are thinking about developing something Thanks

z3dev commented 5 years ago

I think this would be possible using 3D hull, as the swept would be the hulling of two identical shapes.

Thoughts?

RedHatter commented 5 years ago

That would be true for the simple example shown above but 3D hull would not work for more complex situations. For example if the path is a curve. It could be approximated by placing identical objects at intervals along the curve but, not only would that be a pain to do, it wouldn't produce any true curves.

z3dev commented 3 years ago

@gabrielandreussi Please see the examples for V2 JSCAD. There have been improvements to extruding, including extruding while following a path in 3D space.

www.openjscad.xyz