Jump to content

Recommended Posts

Posted (edited)

Hello All,

 

First off, Thanks for this site and everyone that posts on it....I have recieved a lot of great info just reading through forums.

 

This routine arrays selected objects along an arc, spline, pline, helix, at offsets, rotations, etc...

 

-edit- User selects object(s), basepoint of object(s), array path, starting end of path, option to rotate object(s) relative to path - at user defined angle, offset distance, and using Divide or Measure methods of spacing. For Measure option, last option is to place another object at end of path or not.

 

 

-edit- code updated. Added Max Spacing option. Provide "max spacing" distance, and it calculates the maximum equal spacing between objects along the array path.

array-path-2d.pdf

array-path-3d.pdf

ARRAY_PATHS.lsp

Edited by rickh
code updated
  • 1 month later...
Posted

Why it dosn't work? I see unknown command "MOCORO". May be I'v given wrong commands:?

i did not understand "starting end of path"

Posted

For MOCORO, it is an Express tool. For "starting end of path," it is asking for one end of the line, spline, etc. to start the array from. For example, if I draw a line from left to right, I can choose to start the array path from the left end or right end of the line (this makes a difference if using the 'measure' option, and it defines the positive/negative offset side). Maybe my choice of wording is confusing....open to suggestions.

 

I'm not an Express tools guru, so I can't help much in finding the MOCORO command other than searching around online (I only heard about it from AlanJT).

Posted (edited)

Yes...I've understood it, when my colleague used your lisp successfully on AutoCad with Express tool...thanks, good thing)

Edited by soican
  • 1 year later...
Posted

Can i make the array line perpendicular to the arc or spline?

Posted

Can i make the array line perpenducular to the arc, spline or pline?

Posted

yes. If you draw a line vertical, it will be perpendicular with a 0 "relative rotation angle". If you draw a line horizontal, you can enter 90 as the relative rotation and it will be perpendicular. Just think that the x-axis (vector really) is the zero rotation of the object you are arraying, and the direction of your array path (the tangent direction along the path) is also zero rotation. So when you array, assuming you chose Yes to "rotate objects relative to path," the two zeros will align and then any rotation you enter will be from that angle.

 

Take a look at the array-path-2d.pdf in the original post. One of the pics shows a "relative rotation" of 15 degrees applied. Those pics should give an idea of how it works.

Posted

Hi,

 

maybe you could transform objects to be copied into blocks and use the command divide for the path:

 

command: divide...select object to divide...choose the path...Enter the number of segments or [block]...choose B for Block...enter name of block...Align block with object? [Yes/No] ...yes...and finally...Enter the number of segments:...

 

be careful at the insertion point of the block.

Posted
Can i make the array line perpenducular to the arc, spline or pline?

Try codes from attachment, don't remember how them works :)

 

excerpted.txt

Posted

Thanks a lot guy... i works nicely... But Still puzzled with the MOCORO command.... some PC in my lab dont work... unknown command.

  • 1 month later...
  • 11 months later...
Posted

Great lisp, is there any way to adjust it so it takes the averag of specified length start and end angle so the end angle along a spline or similar connects with the previous object?

 

SNAG_Program-0202.jpg

SNAG_Program-0202.jpg

Posted

Hi Pyrohamish,

That is a very good suggestion.

I'll try to think of a way to incorporate that, but no promises on a quick return. It would be a significant addition to the existing code because of the way the geometry works for that case. You would need to enter 2 basepoints (the 2 ends of the chain link in your example), and both points would need to intersect the array path. On a line, easy...on an arc, easy (just a chord calculation and offset). But where a line changes to a curve across a link, or along a spline, ellipse, etc. that's tricky. The code would need to find where a radius drawn from the first point (radius = the length between the 2 basepoints) intersects the path, and use that as the second point on the array path. So it's not only the angle that is changing. The spacing between points along the array path would also change. I'll definitely be thinking about it, but I don't know how long it will be before I can even get to play with (pretty busy at work lately).

 

 

fyi, if it's mostly a visual thing, you can try using the centerpoint of the chainlink as your basepoint instead of the end of the chainlink. That would array it along the path closer to the desired result (because the tangent will be in the center). Obviously that's not a precise placement...just a little closer.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...