Jump to content

Recommended Posts

Posted
 have drawings in 3D, existing out of 3D polylines (which DO have a specific slope);
My question is: is there something like the polyline diet but for 3d polylines?
 
There is an example attached, those polylines can (in 2D) be simplified into 2 arcs each.
 
Even if there was a solution to make them out of half of the vertices, it would help a lot.
Because of the many vertices, it takes a lot to process all of the data.
 
Thanks in advance!

simplify 3dpoly.dwg

Posted
12 minutes ago, scj said:

Hallo see my attached example.

Regards

Jochen

www.black-cad.de

simplify 3dpoly_scj.dwg 736.75 kB · 1 download

 Hi

The file looks good!

I'm working with bricscad.
Is it possible to get a *.lsp file? *.vlx is not supported by bricscad :(

 

Posted

If you want half the vertices can just get the all vertice XYZ save start and end then skip every second one, put back the new vertices. VlA-PUT big hint. Look at co-ordsxy.

 

; pline co-ords example
(defun getcoords (ent)
  (vlax-safearray->list
    (vlax-variant-value
      (vlax-get-property
    (vlax-ename->vla-object ent)
    "Coordinates"
      )
    )
  )
)


 
; convert now to xyz
(defun co-ords2xy ()
(if (= xyz 2)
(progn
(setq I 0)
(repeat numb
(setq xy (list (nth i co-ords)(nth (+ I 1) co-ords) ))
(setq co-ordsxy (cons xy co-ordsxy))
(setq I (+ I 2))
)
)
)
)

(defun getlength (ent)
      (vlax-get-property
    (vlax-ename->vla-object ent)
    "Length"
      )
)

(if (= xyz 3)
(progn
(setq I 0)
(repeat numb
(setq xy (list (nth i co-ords)(nth (+ I 1) co-ords)(nth (+ I 2) co-ords) ))
(setq co-ordsxy (cons xy co-ordsxy))
(setq I (+ I 3))
)
)
)

; program starts here 3 for a 3d polyline
(if (= xyz nil)(SETQ XYZ 3))
(setq co-ords (getcoords (car (entsel "\nPlease pick pline"))))
(co-ords2xy)
(princ xy)


(princ)

 

 

  • Like 1
Posted

Yes, Bricscad doesn't support *.vlx - but is supports *des-files (compiled *.lsp especially for Bricscad).

In case of interest contact me via www.black-cad.de

Regards

Jochen

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...