@Anonymous wrote:
This is an attachement where we have to give z value. ....
I still don't understand why it needs to be a 3D Polyline. In new-enough versions, you can just JOIN them all together. The arc part will retain is true curvature. The overall joined object will be a Spline, but the Line parts will still be straight.
But if there is some legitimate reason for breaking up the Arc into line segments, you can use WobblyPline.lsp, with its WPL command, available >here<. You need to use it in a particular way, "unrandomized" as described, thus:
Command: WPL
Path type [new Line(single)/Arc/Circle/Pline(2D)/3dpoly/Spline/Ellipse, or EXisting] <Pline>: EX
Retain or Delete base path [R/D] <D>: {your choice -- I accepted the default with Enter}
To make an EXisting path wobbly,
Select objects: {select the Arc}
Number of segments: 12 {any number you want to try first}
Maximum displacement as percentage of average segment length: 0 {<---this is critical}
That makes a Polyline of line segments along the Arc. With zero randomization, the vertices will be equally spaced and exactly on it. If you don't like the result, and want more or fewer segments, just recall the command and use the PRevious option to have it do it over to the same path object, but with a different number, without your having to select the Arc or specify the zero randomization again:
Command: WPL
Path type [new Line(single)/Arc/Circle/Pline(2D)/3dpoly/Spline/Ellipse, or EXisting/PRevious/Redo] <EXisting>: PR
Retain or Delete base path [R/D] <D>: {Enter to accept default of choice from before}
Number of segments <12>: 24 {give it a different number}
Maximum displacement as percentage of average segment length <0.00>: {Enter to accept default}
[Don't use the Redo option -- that's for when you do use randomization, and it just takes another shot at it with all your previous choices, for a differently-randomized result.]
That makes a LW Polyline, but it follows the Arc's path in whatever 3D orientation it lies in, no matter what your current UCS or view. If you really always need it to be a 3D Polyline for some reason that has not been explained, change this one line in the code:
(if 3Dpath "_.3dpoly" "_.pline"); command type - Pline for all but 3D Polylines
to just this:
"_.3dpoly"
Or, don't change the code, let it make a LWPolyline, and JOIN that to your Lines, which because they're not co-planar will result in a 3DPolyline anyway.
Kent Cooper, AIA