Keep in mind that 3D polylines have no arcs, so unless he's designing the first highway that has no curves it's not going to work.LOL. I was waiting for that question. I was just answering the general question (2d->3d). Not sure why you would convert a 2d poly to 3d for his stated purpose anyway (unless you don't have a civil package like LDT, SurvCADD, EP, etc) - since you would typically design your vertical there. Maybe we should explain. Rob, since 3D Polylines cannot contain arcs, you have to approximate arcs with a series of chords. I have a routine that will convert a 2d poly to a 3d poly using LDT points (nearest found) to determine the Z elevation for each vertex. Yes, it converts 2D arcs to a series of chords. Very similar to the 'Create By Elevation' routine in LDT, except you don't have to walk each vertex. Code: (defun c:LwpolylineTo3Dpolyline ( / Ent Obj Coordinates Index 3DCoordinates ) (vl-load-com) (if (setq Ent (entsel 'Select a LWPOLYLINE: ')) (if (equal (assoc 0 (entget (car Ent ))) '(0. Code: (defun c:LwpolylineTo3Dpolyline ( / Ent Obj Coordinates Index 3DCoordinates ) (vl-load-com) (if (setq Ent (entsel 'Select a LWPOLYLINE: ')) (if (equal (assoc 0 (entget (car Ent ))) '(0. Code:;;This function loads the extended AutoLISP;;functions provided with Visual LISP.;;The Visual LISP extensions implement ActiveX;;and AutoCAD reactor support through AutoLISP,;;and also provide ActiveX utility and data;;conversion functions, dictionary handling functions,;;and curve measurement functions. There are several ways to convert a three-dimensional polyline (3DPOLYLINE) entity to a standard 2D polyline (LWPOLYLINE): • If you want to just cut-off the Z-coordinates of a 3D polyline (make it appear 2D), use the FLATTEN command (Express Tools) to zero all Z-coordinates. Best feee antivirus for mac 2016. • The FLATSHOT command converts the whole view into a 2D drawing. • You can EXPLODE the 3DPOLYLINE and then PEDIT>Join (PLJOIN) the resulting 2D lines (segments) back to a 2D polyline. I don’t generally have good luck with FLATTEN on the 3D polylines I work with, so I generally stick to option 3. Just make sure you set the elevation of each of the resulting line segments to the same elevation before joining them back into 2D polylines. The second option I haven’t really ever used. However, if anyone has had success with any of these, or uses another method, please comment and let everyone know your method. This entry was posted in, and tagged,,,. Bookmark the. Post navigation. Oct 19, 2009 AutoCAD VBA 2009 Does anyone have a nice little example of how an array can be put in a Class Module? The example should show how that array is used and accessed in a form. Please keep it simple. Convert a 3D Polyline to a LWPolyline? English (USA) (Default).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |