Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with a Lisp to insert "slots" onto a Polyline

9 REPLIES 9
Reply
Message 1 of 10
Andrew_Sumich
1138 Views, 9 Replies

Help with a Lisp to insert "slots" onto a Polyline

Can anybody help me with a lisp routine that would draw polyline slots around a supplied polyline.

See attached "Test.dwg for small sample of a much bigger project.

Basicly I have a polyline on Draw Layer and need to add slots(another polyline) 12mm wide and of varing lengths around the polyline on the cut layer.

at present I am doing it manualy and it takes forever.

 

The slots need to be between 100 - 300mm long Idealy and either straight or curved to fit shape of polyline to be slotted.

 

Please help

9 REPLIES 9
Message 2 of 10
Kent1Cooper
in reply to: Andrew_Sumich

[Stuck back here in 2004, I can't open your drawing, but I'd like to see what you have in mind.  A .jpg/.tif/.gif/.png image would do as well as a .dxf or back-drafted .dwg.]

Kent Cooper, AIA
Message 3 of 10
Anonymous
in reply to: Kent1Cooper

Kent, You should download the drawing converter from AutoDesk, it's free, so you can open drawings from other versions if you'd like.  Didn't know if you were aware of it.  You probably have helped me in the past so returning the favor.

Message 4 of 10
Kent1Cooper
in reply to: Anonymous


@Anonymous wrote:

Kent, You should download the drawing converter from AutoDesk, it's free, so you can open drawings from other versions if you'd like.  Didn't know if you were aware of it. ....


No, I wasn't.  Thanks for the tip -- I'll look into that.

Kent Cooper, AIA
Message 5 of 10
Andrew_Sumich
in reply to: Kent1Cooper

Hi Kent,

 

Sorry I forgot you needed them in 2004 format.

A bit more information - the file is being used by a plotter to cut out the slots in a sheet of fabric.

The cutting head can only handle a minumim radius of 30mm.

 

any help is much apreciated.

 

Regards,

 

Andrew

Message 6 of 10
Kent1Cooper
in reply to: Andrew_Sumich


@Andrew_Sumich wrote:

Can anybody help me with a lisp routine that would draw polyline slots around a supplied polyline.

See attached "Test.dwg for small sample of a much bigger project.

....


So I loaded up the DWG TrueView program, and was able to view, and also to convert and open, the drawing.

 

I think you're going to need to provide a lot more information.  Some of the slots seem to have an edge that lies pretty much along the larger Polyline, but some only roughly/approximately do.  Most have opposite edges that at least look like they're parallel to the edge that's along the larger Polyline, but some clearly don't, especially [but not only] the two that are chords across the curve.  Those two each have two arc segments and an intermediate line segment roughly along the larger Polyline, whereas the others all have one arc segment for that edge.  There are lots of different lengths for both the slots and the portions of the larger Polyline without slots.  The portions without slots are in some cases basically straight stretches [even if they're made up of multiple segments], but in other cases they are curved, and sometimes include more significant-looking changes in direction or in degree of curvature.  Some slots have end line segments that seem pretty much perpendicular to their longer edges, but some have very different angles.  Three of the slots are Blocks, which when exploded yield Polylines of all line segments, but the rest [even some along what look like pretty straight stretches, and except for the two chorded ones] use arc segments for their long edges.  They're all drawn to the right of the larger Polyline from the point of view of its local direction [inside on the larger outline, outside on the hole in the 'a'], but that may be a coincidence.

 

In short, I'm having a hard time seeing any standard(s) by which to decide how to tell a routine what to do.  Can you spell some out?

Kent Cooper, AIA
Message 7 of 10
Andrew_Sumich
in reply to: Kent1Cooper

Hi Kent,

 

To fill you in the file is used to mark out a sign on grass.

The part file I supplied is only a small section of a sign about 24m long and 6m wide.

We plot the file onto fabric which is layed out and then they spray paint over to form a series of marks to join together to form the shape.

The Paramiters of the Slots we cut out are:

 

1 they are 12mm wide

2 they are between 100 and 300mm long

3 If they are curved they have a minimum of a 30mm Radius

4 The distance between the slots will vary depending on whether the parent poly line is straight or curved.

 

The more slots we put the longer the plotter takes to produce the panel so we need enought to be able to follow the shape but not too much.

 

The slots are always on the "inside" of a polyline but this side could be chosen at the start of the comand.

 

The parent polyline is a series of line segments but for the plotter it is easier / quicker to cut a curve that aproximates the lines.

 

hope this makes things a bit clearer.

 

Let me know if you need more information.

 

Cheers

 

Andrew

Message 8 of 10

If the slots look a bit all over the place and random it's because I am adding them all individually / manually and normally in a big hurry so if the slot is a few mm off I dont bother adjusting and just move on.
Speed is also the reason for the block. It's some times faster to insert a lot of blocks then explode them than draw a lot of poly's. It also means I can use measure to insert them all at once on uniform shapes. But this is no good on the more complicated shapes.
Message 9 of 10
stevor
in reply to: Andrew_Sumich

Your problem is common.

If you check, here by search, or google, you will see many applications that use a pline to automatically do things along its length.

If you learn to communicate better, eg, correctly, then the offered solutions will be better.

Provide a short list of the rules for the geometry, and no more.

 

S
Message 10 of 10
Andrew_Sumich
in reply to: stevor

Gee Stevor thanks for your Helpful reply.

 

I came to this forum for a solution to my problem not to be berated and be littled.

 

Note 1: I have already trawled through the forums to find a solution and none will what I need hence my post. If you are aware of one I have missed in my search please point me in the right direction.

 

Note 2: I'm sorry if I have not explained my self completely I thought if somebody thought they could provide a solution I could easily provide more information as required. Not being a programer I have no Idea of the complete information needed.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost