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:
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?
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.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.