Visual LISP, AutoLISP and General Customization
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Line from origin to object centers
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
greenj1 wrote:Kent once again thankyou, this works perfectly on the circles I have tested it on.
However my circles have to be converted into 3D polylines. The lisp does not seem to work on them !
I assumed they would have an inserition point or centre and it would work the same way.
Any suggestions ?
No, they don't have a defined center or insertion point, just a string of vertices, and AutoCAD doesn't have any way to know directly whether they all fall on a common circular path. But if they're geometrically regular, a center can be calculated. This:
http://cadtips.cadalyst.com/2d-editing/convert-reg
contains a method to do that. Appropriate parts could be transferred, but it would make the code a lot longer.
On the other hand, if the conversion to 3DPolylines is done by something that always does it in the same way, e.g. it always makes a regular polygon with the same number of vertices [or even just always an even number of vertices] in each conversion, then we can assume some of what that routine tests for, and a much simpler way could be devised to calculate their centers. Are they regular in some predictable way?
Re: Line from origin to object centers
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
They dont seem to have any common propoerties. They start as circles then I import them into 3ds max and use bend and spherify modifers to turn the 2d layout into a spherical arrangement, then back into CAD where they become 3D polylines.
I guess I need to find an object which will retain a centre point or insertion point whne transfered between the two program. perhapes a point/node. Il see what I can find. Any suggestions welcome. Thanks for your help so far.
Re: Line from origin to object centers
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I found a MAXscript which placed point at the center of each spline (3d polylines in CAD) and bingo your lisp worked perfectly. Many thanks ! ![]()


