|
发表于 2022-7-5 21:10:11
|
显示全部楼层
Yes, its doable, but unfortunately I don't have much time to play with this problem... I would do it differently... I would use (vla-intersectwith) method to obtain all intersections between LWPOLY and other entities or if all entities are LWPOLYS (I would use "plintav.lsp" from PLINETOOLS posted here... In all situations I would then add vertices of intersections to LWPOLY with the same algorithm like "plav.lsp" from PLINETOOLS... Then I would entmake texts numbering vertices of LWPOLY, make list of dotted pairs (cons pt no), where pt is list representing vertex point of LWPOLY and no integer for numbering vertex, then I would write this info into CSV file using (setq f (open "c:/lwvertinfo.csv" "w")) and (write-line) function then (close f)... Then I would just explode LWPOLY into LINES and also entmake texts at each line mid point with its length (if its necessary I would align this texts to line entities using (angle '(0.0 0.0 0.0) (vlax-curve-getfirstderiv lin 0.0)), and for mid point for text insertions I would use (mapcar '/ (mapcar '+ (cdr (assoc 10 (entget lin))) (cdr (assoc 11 (entget lin)))) '(2.0 2.0 2.0)); for length I would just use (distance (cdr (assoc 10 (entget lin))) (cdr (assoc 11 (entget lin))))... |
|