Lippens Infra Posted June 17, 2020 Posted June 17, 2020 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 Quote
scj Posted June 17, 2020 Posted June 17, 2020 Hallo see my attached example. Regards Jochen www.black-cad.de simplify 3dpoly_scj.dwg 1 Quote
Lippens Infra Posted June 17, 2020 Author Posted June 17, 2020 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 Quote
BIGAL Posted June 18, 2020 Posted June 18, 2020 This should help https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/weed-autolisp-selecting-all-polylines/td-p/3017484 Quote
Lippens Infra Posted June 18, 2020 Author Posted June 18, 2020 3 hours ago, BIGAL said: This should help https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/weed-autolisp-selecting-all-polylines/td-p/3017484 All of the mentioned solutions work for a 2D polyline or convert my 3D polyline to a 2D one. The slope of my polyline is important. Quote
BIGAL Posted June 18, 2020 Posted June 18, 2020 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) 1 Quote
scj Posted June 18, 2020 Posted June 18, 2020 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 Quote
Recommended Posts
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.