Stitching lines

I want to create an extension which can be used for leather workers to create stitching lines that run parallel to other lines and curves. I have looked through the API documentation and haven’t found a way to create a custom line style, or stipple. I would also need to be able to specify the distance between the marks. The stitch line that runs parallel to the sketch line also needs to be shortened on both ends equal to the distance between the stitch line and the sketch line. I can’t find a way to “shorten” the line in this way. I suppose I could use transforms for lines, but it will become complicated for curves. Another thought was to create a new entity for each stitch mark, but I suspect this will not be very effecient. Anyone know if there is a way to do either of these things?

have a look at the code for Tig’s Smart Offset

if you gave the offset a unique material, you could then collect, divide and process spacings…

john

Doesn’t sound like you would need a 3D program like SKetchup for this. Microsoft Visio is 2D, has user definable line styles and a good offset tool. Arcs are true arcs not a collection of line segments, and when you offset an arc you get another true arc.

SketchUp does not have lines. It has edges. (This is why you do not find custom linestyles like CAD apps have.)

I agree with Barry, this sounds like a job for a 2D CAD application with a scripting environment. LibreCAD perhaps, QCAD, etc. Most of them have some kind of scripting language.