rickh Posted December 5, 2011 Posted December 5, 2011 (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 November 28, 2014 by rickh code updated Quote
soican Posted February 1, 2012 Posted February 1, 2012 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" Quote
rickh Posted February 1, 2012 Author Posted February 1, 2012 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). Quote
soican Posted February 1, 2012 Posted February 1, 2012 (edited) Yes...I've understood it, when my colleague used your lisp successfully on AutoCad with Express tool...thanks, good thing) Edited February 2, 2012 by soican Quote
LibertyOne Posted February 2, 2012 Posted February 2, 2012 AutoCAD 2012 now has a path array... http://cad-notes.com/2011/03/autocad-2012-new-array-commands/ ...which by no means should keep you from programimg your own command. Quote
nikzamri Posted October 28, 2013 Posted October 28, 2013 Can i make the array line perpendicular to the arc or spline? Quote
nikzamri Posted October 28, 2013 Posted October 28, 2013 Can i make the array line perpenducular to the arc, spline or pline? Quote
rickh Posted October 28, 2013 Author Posted October 28, 2013 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. Quote
marmo Posted October 28, 2013 Posted October 28, 2013 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. Quote
fixo Posted October 28, 2013 Posted October 28, 2013 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 Quote
nikzamri Posted October 29, 2013 Posted October 29, 2013 Thanks a lot guy... i works nicely... But Still puzzled with the MOCORO command.... some PC in my lab dont work... unknown command. Quote
pyrohamish Posted November 26, 2014 Posted November 26, 2014 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? Quote
rickh Posted November 28, 2014 Author Posted November 28, 2014 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. Quote
Recommended Posts
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.