![]() "AAAHH works nicely with polylines as long as you are in the function. (entmod (subst (cons 11 (trans end_point 1 0)) (assoc 11 (entget perp_line)) (entget perp_line))) (distance from_point (cadr grread_result)) (if (minusp (sin (- (angle from_point (cadr grread_result)) line_angle))) (/= (car grread_result) 3) 3 = point selected (while (and (setq grread_result (grread T 12 0)) control cursor, no error on ESC, normal crosshairs ![]() Line_angle (angle '(0 0 0) first_derivative) get the slope (setq perp_line (entlast) store the initial line "LINE") (cons 10 from_point) (cons 11 from_point))) (list from_object (vlax-curve-getParamAtPoint from_object from_point)) (setq first_derivative (vl-catch-all-apply (setq from_point (vlax-curve-getclosestpointto from_object from_point)) (setq from_object (car from_object)) get the entity part (setq from_point (cadr from_object)) get the point part (if (and (setq from_object (entsel "\nSelect curve at point to start the perpendicular line.")) (defun c:perpl (/ from_object from_point first_derivative line_angle loop perp_line grread_result end_point str) To use esnaps/osnaps with this function use a shift/right-click esnap/osnap selection. I do not recall where I found it or who wrote it. Here is a routine that works in both Autocad and Bricscad. The 'less than' should be a override indicating that the string is specifying an angle, but apparently Bricscad does not support this. ![]() The c:perpl routine adds a 'less than' character to a string representing the angle perpendicular to the curve at the selected point, then passes that string to the line command. I just tested the c:perpl code again and found that it works in Autocad but not in Bricscad. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |