Rotate a line until it's
Well that is it.I am looking for a lisp to do what I have said above.Is it possible? Rotation about a user-specified basepoint? Easy draw a circle, intersectwith only tricky bit is it may have two answers. I take you want a programming answer not a drafting answer.Manually do you really need code ? Circle grip-edit erase all done.
Code wise 2 picks, pick line near rotation point this returns length and correct point, pick pline, draw a circle and use intersectwith rotate line ask is correct press enter else draw 2nd answer. little busy at moment Lee may beat me anyway. Yes LeeMac to rotate about one end of the line until the other end intersects the line.
I agree - the manual method may in fact yield a quicker result:
I think the op should specify more his request:
2 endpoints, and 2 rotation orientations (CW and CCW) = 4 different ways for the code to work. Grr correct that is why the pick of the line near the rotation end of the line, saves extra picks just compare pick pt to the two ends and the shortest distance is the rotation pt.
(setq tp1 (entsel "\nSelect left side inner wall near end : "))(setq tpp1 (entget (car tp1)))(setq pt1 (cdr (assoc 10 tpp1))) (setq pt2 (cdr (assoc 11 tpp1))) (setq pt3 (cadr tp1))(setq wallh (cdr (assoc 39 tpp1))) (setq hts (caddr pt1)) (setq d1 (distance pt1 pt3))(setq d2 (distance pt2 pt3)) (if (> d1 d2) (progn (setq temp pt1) (setq pt1 pt2) (setq pt2 temp) ) )
页:
[1]