View Full Version : 3D POLYLINES
jetaguy
2009-08-06, 09:10 PM
Is there a lisp out there to put a 3d poly line to a given elevation ?
I have a drawing that the polyline is to be on a given elevation, the problem is that there are zero elevation on some of the nodes. I would like to just click on the line and put all the nodes to a given elevation.
I have looked for a lisp to do this but don't seem to be able to find one,
Thanks
LDD 2004
alanjt
2009-08-09, 01:08 AM
you can do it through the properties menu or type "change"
devitg.89838
2009-08-10, 04:11 AM
Is there a lisp out there to put a 3d poly line to a given elevation ?
I have a drawing that the polyline is to be on a given elevation, the problem is that there are zero elevation on some of the nodes. I would like to just click on the line and put all the nodes to a given elevation.
I have looked for a lisp to do this but don't seem to be able to find one,
Thanks
LDD 2004
You can use FLATTEN from EXPRESS tool , it will set all Z value to 0 , then by CHANGE you can set the new elevation.
Like it so
Command:
Command: CHANGE
Select objects: 1 found
Select objects:
Specify change point or [Properties]: P
Enter property to change
[Color/Elev/LAyer/LType/ltScale/LWeight/Thickness/Material/Annotative]: E
Specify new elevation <0.0000>: 2
Enter property to change
[Color/Elev/LAyer/LType/ltScale/LWeight/Thickness/Material/Annotative]:
You can use FLATTEN from EXPRESS tool , it will set all Z value to 0 , then by CHANGE you can set the new elevation.
Like it so
I know this thread is regarding 3D Polylines, however, be careful with the Express Tools Flatten command in relation to blocks. It bursts each block, placing all linework of the block onto the layer the block was on, and then recreates the block with a the block name + "-flat-#" appended to the name. The new block is also scaled to 1.
lpseifert
2009-08-10, 04:02 PM
I know this thread is regarding 3D Polylines, however, be careful with the Express Tools Flatten command in relation to blocks. It bursts each block, placing all linework of the block onto the layer the block was on, and then recreates the block with a the block name + "-flat-#" appended to the name. The new block is also scaled to 1.
That's why I tried Flatten once, and only once.
devitg.89838
2009-08-10, 07:46 PM
Thus flatten is not a option , sorry .
There are other flatten routines out there. I just don't have a link to any of them.
irneb
2009-08-11, 02:57 PM
I don't think flatten would be the idea. Do you want to basically change the 3dPoly to a 2dPoly on the current UCS? It shouldn't be too difficult.
Basically you get the data by using entsel (to pick the 3dpoly) or ssget (to select several at once). Then using entnext & entget you get the sub-entities (VERTEX) until reaching a SEQEND entity. Each of these Vertex entities has a code 10 which is the XYZ in WCS.
So now you simply recreate a LWPolyline through the PLINE command and pass those points to the command ... the PLINE command ignores the Z value and uses only the X & Y's. You may have to convert from WCS to UCS by using the trans function.
Then you could erase the 3dPoly if you like.
Other way round would be to entmod each VERTEX with a new value for code 10. This you'd calculate by converting from WCS to UCS, changing the z to 0, then converting back from UCS to WCS.
jetaguy
2009-08-17, 05:53 PM
Change works great !!!!
I have never heard of the change comand, 7 yrs on Cad and still learning
I only ever use flatten when I want a zero elevation. I have seen it do the block explosion and found that it can do some weird things that just eat time.
Thank You for the change command. I have to put that in my list of commands that I don't use to often.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.