Jump to content

Array along arc, spline, pline, etc.


rickh

Recommended Posts

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
Link to comment
Share on other sites

  • 1 month later...

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).

Link to comment
Share on other sites

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

Edited by soican
Link to comment
Share on other sites

  • 1 year later...

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...