Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Offset 3dPolyline

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
3986 Views, 7 Replies

Offset 3dPolyline

Is there any way to offset a 3dpolyline? I can't just copy it to one side, I need to have it offset.
Any help will be great
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: Anonymous

See demo:
[code]
(defun C:demo ()
(vl-load-com)
(if (setq en (car (entsel "\n >> Select 3dpoly >> ")))
(progn

(setq obj (vlax-ename->vla-object en))
(setq ofd (getreal "\nEnter distance to offset\n"))
(if
(vlax-method-applicable-p obj 'Offset)
(vlax-invoke obj 'Offset ofd)
(alert "Offset method do not support \nfor this object type!"))))
(princ)
)
(C:demo)
[/code]

To see all properies and methods use this :

(vlax-dump-object (vlax-ename->vla-object (car (entsel))) T)

~'J'~
Message 3 of 8
Anonymous
in reply to: Anonymous

It isn't perfect, but if that can be enough.
Message 4 of 8
Anonymous
in reply to: Anonymous

Here's a start for you....
[code]
(defun c:offset3d (/ coords doc idx newcoords newpoly obj offdist offs space
ss tmp tmpcoords)
(setq doc (vla-get-activedocument (vlax-get-acad-object))
space (if (= (getvar "cvport") 1)
(vla-get-paperspace doc)
(vla-get-modelspace doc)
)
offdist (getdist "\nOffset distance, (negative to left, positive to right):
")
)
(while (setq ss (ssget ":S" '((0 . "POLYLINE")(-4 . "&=")(70 . 8))))
(setq obj (vlax-ename->vla-object (ssname ss 0))
coords (vlax-get obj 'coordinates)
)
(setq tmp (vlax-invoke space 'addpolyline coords)
offs (vlax-invoke tmp 'offset offdist)
)
(setq tmpcoords (vlax-get (car offs) 'coordinates)
idx 0
newcoords nil)
(if (= (length coords) (length tmpcoords))
(progn
(repeat (length coords)
(if (= (rem idx 3) 2)
(setq newcoords (append newcoords (list (nth idx coords))))
(setq newcoords (append newcoords (list (nth idx tmpcoords))))
)
(setq idx (1+ idx))
)
(setq newpoly (vlax-invoke space 'add3dpoly newcoords))
(vla-put-layer newpoly (vla-get-layer obj))
(vla-put-color newpoly (vla-get-color obj))
(vla-put-linetype newpoly (vla-get-linetype obj))
)
(princ "\n....Unable to offset that 3dPoly.")
)
(vla-delete tmp)
(vla-delete (car offs))
)
(princ)
)
[/code]
wrote in message news:5164996@discussion.autodesk.com...
Is there any way to offset a 3dpolyline? I can't just copy it to one side, I
need to have it offset.
Any help will be great
Message 5 of 8
Anonymous
in reply to: Anonymous

Hello Mr. Johndm
It is possible to offset 3D Polyline, using various manual techniques, but
to make that task easier, we have a command
called "GT_3DOffset" in our product "GeoTools". You may want to give this a
try and see for yourself.

The GT_3DOFFSET command is used to offset 3d polylines. With this command,
you can now offset 3d polylines in exactly the same manner as 2d polylines.


--
Sanjay Jamalpur
- Four Dimension Technologies
[www.4d-technologies.com]
- Get GeoTools, Work smarter: www.4d-technologies.com/geotools
- Free Lisp downloads @ TechCenter: www.4d-technologies.com/techcenter

wrote in message news:5164996@discussion.autodesk.com...
Is there any way to offset a 3dpolyline? I can't just copy it to one side, I
need to have it offset.
Any help will be great
Message 6 of 8
Anonymous
in reply to: Anonymous

Dear sir,

My name is g.srinivas working as cad operator in youtelecom India private limited, sir Iam trying get information about 3d poly line join and offset.But I got only 3d poly line offset lisp only.so Iam requesting you sir please if you have any lisp about 3d poly line joinnig please Inform me sir ,

Please kindly accept my letter ,Please send me reply as soon as possible.


withregards,

g.srinivas
Message 7 of 8
Anonymous
in reply to: Anonymous

Have a look at
wwwblack-cad.de
try out PEDIT3D
Good luck
Jochen

schrieb im Newsbeitrag news:6208121@discussion.autodesk.com...
Dear sir,

My name is g.srinivas working as cad operator in youtelecom
India private limited, sir Iam trying get information about 3d poly line
join and offset.But I got only 3d poly line offset lisp only.so Iam
requesting you sir please if you have any lisp about 3d poly line joinnig
please Inform me sir ,

Please kindly accept my letter ,Please send me reply as soon as possible.


withregards,

g.srinivas
Message 8 of 8
Anonymous
in reply to: Anonymous

Srinivas,

If you wish to consider a small add-on tool, look up GeoTools:

http://www.4d-technologies.com

We have tools for joining 3d polylines as well as 3d offset and 250
additional ones.

Regards
Rakesh Rao
Bangalore, India


"gsrinivas" wrote in message news:6208121@discussion.autodesk.com...
Dear sir,

My name is g.srinivas working as cad operator in youtelecom
India private limited, sir Iam trying get information about 3d poly line
join and offset.But I got only 3d poly line offset lisp only.so Iam
requesting you sir please if you have any lisp about 3d poly line joinnig
please Inform me sir ,

Please kindly accept my letter ,Please send me reply as soon as possible.


withregards,

g.srinivas

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost