delta Posted January 9 Posted January 9 Hi All Im having a little trouble here with something I think is probably straightforward. I have 2 circles of 100 dia that are a random distance apart horozontally and I want to draw a line that that starts 65mm away in the X and -79mm away in the Y from the left circle and finishes -65mm away in the X and -79mm away in the Y. I know the coordinates from cirle to the start of the line and I know the coordinates from the other circle to the end of the line. (65,-79) and (-65,-79) I don't know what the length of the lie is until it is drawn Regards Tony Sample line.pdf Quote
BIGAL Posted January 9 Posted January 9 A couple of ways manually. F8 ortho on, Pick circle center drag mouse down type 79 drag mouse left type 65 repeat other end join last 2 lines erase dummy line. Using a lisp pick circles and use this function to work out new pts. (setq p3 (mapcar '+ p1 (list 65 -79 0.0))) (setq p4 (mapcar '+ p2 (list -65 -79 0.0))) (command "line p3 p4 "") Quote
delta Posted January 10 Author Posted January 10 Thanks Bigal Those 3 lines worked perfectly. Another question if you don't mind? I am using Autolisp to insert and explode 2 blocks (Infil_HL & Infil_HR) Each block consists of 7 lines & 2 arcs ;;;Saves 2 reference points for the location of the top line;;; (setq p1 (getpoint "Pick top hole on LH Staunchon:")) (setq p2 (getpoint "Pick top hole on RH Staunchon:")) ;;;Draws the top line of the infil panel;;; (setq p3 (mapcar '+ p1 (list 65.42 -79.92 0.0))) (setq p4 (mapcar '+ p2 (list -65.42 -79.92 0.0))) (command "line" p3 p4 "") (setq topline (entlast)) ;;;Draws the bottom line of the infil panel;;; (setq p5 (mapcar '+ p1 (list 65.42 -879.92 0.0))) (setq p6 (mapcar '+ p2 (list -65.42 -879.92 0.0))) (command "line" p5 p6 "") (setq bottomline (entlast)) (command "-insert" "Infil_HL" p3 "" "" "") (command "_explode" (entlast)) (command "-insert" "Infil_HR" p4 "" "" "") (command "_explode" (entlast)) This all works perfectly. But What I need to do now is use Autolisp to select all the lines that made up the 2 blocks and "join" them with the first 2 lines that have been drawn I used. See the PDF insert hope you can help Regards Tony Sample Object.pdf Quote
BIGAL Posted January 10 Posted January 10 Probably the easiest way is to look at the inserted block, you drew it so you know the relative co-ordinates of the block, so when you insert at a scale not necessarily 1, you know the Y distance so its easy to join a line to the correct points. The simplest way of the lot for me is draw the object just ask for a point and length and height. Then draw a pline with correct shape, it's not that hard. When you draw a pline you can have straights and arcs as part of the pline. No dwg so no hints about a draw it. 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.