The problem I am having is drawing waterline services perpendicular to a 3D pipe run. Is there and easy way to do this without having to change my 3D polyline to a zero elevation? Lisps?
|
The problem I am having is drawing waterline services perpendicular to a 3D pipe run. Is there and easy way to do this without having to change my 3D polyline to a zero elevation? Lisps?
Try this... I tried it with a 3DPolyline and it seemed to work
Code:;; PLPERP.lsp starts a polyline perpendicular to any 2D curve at ;; the point picked. ;; Allows direct distance entry for first polyline segment, then ;; restores previous ortho setting and snap angle (if any). ;; by Bill Gilliss bill dot gilliss at aya.yale.edu ;; 3/20/2008 ;; Comments and suggestions always welcome. (defun c:plperp ( / e en obj param p1 p2 wp1 sa oldortho oldsnapang oldosmode olderror) (setq oldortho (getvar "orthomode") oldsnapang (getvar "snapang") oldosmode (getvar "osmode") olderror *error* ) (setq e (entsel "Select curve at point to start perpendicular (OSNAPS welcome):")) (setq en (car e) p1 (cadr e)) ;UCS point (setq p1 (osnap p1 "_nea")) (setq obj (vlax-ename->vla-object en)) (setq param (vlax-curve-getParamAtPoint obj (trans p1 1 0))) ;WCS point (setq fderiv (vlax-curve-getFirstDeriv obj param)) (setq sa (+ (* pi 0.5) (angle (trans '(0.0 0.0 0.0) 0 1) (trans fderiv 0 1)))) (setvar "snapang" sa) (setvar "orthomode" 1) (setq p2 (getpoint p1 "\nNext point:")) (setvar "orthomode" oldortho) (setvar "snapang" oldsnapang) (setvar "osmode" oldosmode) (setq *error* olderror) (command "pline" p1 p2) );defun (defun *error* (msg) (setvar "orthomode" oldortho) (setvar "snapang" oldsnapang) (setvar "osmode" oldosmode) (setq *error* olderror) ) (prompt "PLPERP loaded.") (princ)
This lisp seems to be for a curve? I tried it but it's asking me: Select curve at point to start perpendicular (OSNAPS welcome):
You can start by drawing a (2d) polyline from a point (generally a vertex, sometimes a midpoint, etc) on the 3dpoly.
The exact method will vary with circumstances - just remember that the entire 2d polyline will have the same z-value as the first point picked.
Then you can draw one or more segments away from the target polyline and come back to it with a PERpendicular osnap.
I was afraid of that! I was hoping someone had a short cut for me.
am I missing something?
waterline service?
start pline @ approx. water meter location, (osnap perpendicular), snap to 3d pipe line.
you can leave pipe line 3d, and still snap a 2d pline perpendicular to it.
hope this helps
Yes, it allows you to snap to a 3D polyline but it isn't perpendicular on the 2D plane. Try this draw a 3D polyline then make sure the verticies have about 10' or so difference in elevation (z) between them say 890 and 900, then draw a line and snap it perpindicular to the 3D polyline you have just drawn.
when I tested i yesterday my 3d polyline only had about 1' elev. drop.
so the pline appeared to be perpendicluar, but when I increased elev. drop, not perpendicular. duh!
just a thought, make temp layout and draw your services in paperspace, and snap to 3d pipe line in model, using a viewport.
then when done, issue changespace to put services in model space @ 0 elev.
Would changing UCS to match the slope help?