Sorry for length. Could CGAL implement a “Sweep” command (idea from old Super3D program for Macintosh), like OpenSCAD’s linear_extrude, except that would use a custom path?
I’m a complete newbie to CGAL, so I don’t know if there’s a specific place suggestions should go, or if this has been suggested, hashed out, and rejected for some (good) reason before.
I read somewhere about OpenSCAD that “if CGAL doesn’t have it then OpenSCAD doesn’t (natively)”. Hence this suggestion, or the theory that implementing it at the level of CGAL could be more efficient than OpenSCAD.
I don’t know if CGAL (or OpenSCD) can implement “paths” as pure 1D structures (rather than just “very thin 2D “snakes”). The geometry would presumably be something like the following (pseudo-HyperTalk):
On Sweep (shape3D, path)
pPlane[0] = perpendicular to first segment of path
newShape[0] = shape3D
repeat for segments t along the path
determine perpendicular plane to t -> pPlane[0]
determine “average direction” of segment t -> d
replicate newShape in direction d -> newShape[1]
rotate newShape[1] pPlane[0] to pPlane[1]
extrude newShape[1] if newShape[0] is 2D
render newShape[1]
pPlane[1] -> pPlane[0]
newShape[1] -> newShape[0]
end repeat
End sweep
This would be relatively easy to implement in OpenSCAD - I’d have to figure out how to do find the direction and perpendicular from the triangle strip, and how to calculate the segment positions in that strip.
A further idea would be a scale function for each segment based on the “width” of the “snake” (length of chord across segment in direction pPlane[0])
Or does CGAL already have something like this, that OpenSCAD just doesn’t expose?
Sorry for length. Could CGAL implement a “Sweep” command (idea from old Super3D program for Macintosh), like OpenSCAD’s linear_extrude, except that would use a custom path?
I’m a complete newbie to CGAL, so I don’t know if there’s a specific place suggestions should go, or if this has been suggested, hashed out, and rejected for some (good) reason before.
I read somewhere about OpenSCAD that “if CGAL doesn’t have it then OpenSCAD doesn’t (natively)”. Hence this suggestion, or the theory that implementing it at the level of CGAL could be more efficient than OpenSCAD.
I don’t know if CGAL (or OpenSCD) can implement “paths” as pure 1D structures (rather than just “very thin 2D “snakes”). The geometry would presumably be something like the following (pseudo-HyperTalk):
This would be relatively easy to implement in OpenSCAD - I’d have to figure out how to do find the direction and perpendicular from the triangle strip, and how to calculate the segment positions in that strip.
A further idea would be a scale function for each segment based on the “width” of the “snake” (length of chord across segment in direction pPlane[0])
Or does CGAL already have something like this, that OpenSCAD just doesn’t expose?