91
AutoLISP (Vanilla / Visual) / Re: 3d polyline splitting
« Last post by ribarm on May 08, 2024, 09:53:53 AM »And this code is opposite of splitting by adding vertices... It's called "diet3dps" like my latest with lwpolyline that I coded recently...
HTH.
M.R.
Code - Auto/Visual Lisp: [Select]
- (defun c:diet3dps ( / *error* unique getvertices collinear-p group_collinear_pts cmd uf s in pl plx cf vl nvl gg )
- (or (not (vl-catch-all-error-p (vl-catch-all-apply (function vlax-get-acad-object) nil))) (vl-load-com))
- (command-s "_.UNDO" "_E")
- )
- )
- (if uf
- (command-s "_.UCS" "_P")
- )
- )
- (if cmd
- )
- (if m
- )
- )
- (if lst
- (unique
- )
- )
- )
- )
- )
- )
- )
- (and
- )
- )
- (while ptlst
- )
- )
- )
- )
- (if g
- )
- )
- )
- (command-s "_.UNDO" "_E")
- )
- )
- (command-s "_.UNDO" "_BE")
- )
- (command-s "_.UCS" "_W")
- )
- )
- )
- )
- (foreach g gg
- (foreach p g
- )
- )
- (if cf
- )
- (foreach v nvl
- )
- (if cf
- )
- )
- )
- )
- )
- (*error* nil)
- )
HTH.
M.R.