;3D Utility EB
;Convert 3d polyline to 2d polyline
;..............................................................................
(defun c:p3p2 (/ eg cl en e nc fp pt)
(princ "\n[Change 3D Polyline to 2D Polyline.]")
(setq e (entsel " Select a 3DPoly: ") ; get the header data
en (car e)
cl (if(=(cdr(assoc 70(entget en)))1)1) ; closed flag 1=yes
p1 (cdr(assoc 10(entget(entnext en))))
p2 (cdr(assoc 10(entget(entnext(entnext en)))))
)
(command "ucs" "3" p1 p2 "")
(setq fp (trans p1 0 1)) ; save first point
; en (entnext en)) ; leave header
(setvar "blipmode" 0)
(command "pline")
(command fp) ; id first vertex
(while (/=(cdr(assoc 0(setq eg(entget(setq en(entnext en))))))"SEQEND")
(setq pt (trans(cdr(assoc 10 eg))0 1))
(if pt (command pt))
(if (and (not pt) cl)(command fp))
);endwhile
(command "")
(command "ucs" "w")
(setvar "blipmode" 1)
(princ)
);end C:P3P2
> I don't recall having used this to see if it works, but here 'tis...
Okay, I'll give it a try, but I'm worried about how long it might take.
Is there no way to trim a 3D Polyline without converting?
Alex
I've not tried this but it works for other 3D entities. Trim doesn't work
because it is a 2D command and you probally get a message like 'entity not
parallel to current UCS'.
Try aligning the UCS to the entity (3D polyline), snapping close to the area on
the line you want to trim. Then draw your trim line and use it as the cutting
edge.
Hope it works!
Mike McGuire
zpmc...@trident.tec.sc.us
>>>>
That routine seems the best approach I know of. Of course, you could do a pedit on 3dpolys to edit the
vertexes, or you could 'stretch' them. but that'd take longer, methinks. Fact is, I generally don't even use
3dpolys for this very reason that they're tough to do as much with.
Try setting your UCS to make the direction of the 3D polyline
and the trim line your current XY working plane.
Steve Young
I was told by someone (can't remember who) that Release 13 was
supposed to address this problem and allow trimming and extending of
3d polylines. I was interested in this since all of our campus mps
are in 3d polys. We haven't gotten R13 on line yet though, so I can't
verify this.
----------------------------------------------------------------------
Lynn Hazelbaker Voice: 405-744-6959
Okla. State Univ. Phys. Plant Fax: 405-744-5159
A-E & Utilities Services Internet: Ly...@pp.okstate.edu
----------------------------------------------------------------------