How to draw parallel lines
-
Dear all,
I’m working on a school project. I’m developing a 3D model using Sketchup through Ruby extension. I want to draw a parallel line for a curved line.
The curved line was drawn using Ruby API command
entities.add edges
. The points of the curved line were provided by a Ruby array.
Now I want to draw a parallel line for this curved line. Do you have any suggestions please?
Thank you -
Smustard.com's
offset.rb
adds an '.offset
' methods faces/edges/arcs/curves etc. That should give you some ideas at least...My ExtrudeEdgesByOffset tool also has some similar code that you could think about - however the easy way to offset edges is if they belong to a face, and are therefore definitely coplanar...
Instead of
entities.add_edges(array)
you might be better usingentities.add_curve(array)
to make the offsetting easier, if you want separate edges later you can always explode the curves in code...
Advertisement