Message 1 of 8
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear Sir,
Please find the attached sample drawing.
I want to Arc and Line joining programming.
Solved! Go to Solution.
Dear Sir,
Please find the attached sample drawing.
I want to Arc and Line joining programming.
Solved! Go to Solution.
if they were closed, they could be joined with JOIN.
Now when zooming in they are not closed, which point should the program take?
Arc, Line or in the middle?
done by
removing all the straight segments - select similar
convert all arc segments to pl
mpedit add type with 80 fuzz
all done
Right. Since 2025 introduced so cool tool to blockify repetitive geometries... it would be an easy job to do. Unless... wait, it's not a chair or sink.. so it might not work. Who knows, it's experimental.
provided that
1. arcs and 2d-polylines were generated with some software
2. user has not changed any of those
and no extra sorting is needed, check this starting one.
you need to select paired arcs and 2d-plines and that's it.
(defun c:make_oval (/ arc_line_sset less_more_list more_less_list)
(if (setq arc_line_sset (ssget '((0 . "polyline,arc"))))
(progn
(foreach object (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex arc_line_sset))))
(cond
((= "AcDbArc" (vla-get-objectname object))
(if (< (vla-get-startangle object) (vla-get-endangle object))
(setq less_more_list (cons object less_more_list))
(setq more_less_list (cons object more_less_list))
)
)
(t)
)
)
(if (and less_more_list
more_less_list
(= (length less_more_list) (length more_less_list))
)
(progn
(mapcar '(lambda (<arc> >arc<) (vla-put-closed (vla-addlightweightpolyline (vla-get-block (vla-get-activelayout (vla-get-activedocument (vlax-get-acad-object))))
(vlax-safearray-fill (vlax-make-safearray vlax-vbdouble '(0 . 7))
(apply 'append (mapcar '(lambda (point) (mapcar '+ '(0 0) point))
(list (vlax-get <arc> 'startpoint) (vlax-get <arc> 'endpoint)
(vlax-get >arc< 'startpoint) (vlax-get >arc< 'endpoint)
)
)
)
)
)
:vlax-true
)
(vla-setbulge (vlax-ename->vla-object (entlast)) 0 1)
(vla-setbulge (vlax-ename->vla-object (entlast)) 2 1)
)
less_more_list
more_less_list
)
(command "_erase" arc_line_sset "")
)
)
)
)
)