khoshravan Posted June 25, 2011 Posted June 25, 2011 I want to draw a square with a line as its side given. I am looking for a rapid solution, like pressing shift while using rectangle command to make two sides equal. Is there any such a short cut for square? Quote
paulmcz Posted June 25, 2011 Posted June 25, 2011 I use lisp for it (defun c:sq (/ osn aa ip cp1 point) (setq osn (getvar "OSMODE")) (if (= a nil) (setq a 1.0) ) (princ "\n Size < ") (princ a) (princ " > ?? : ") (setq aa (getdist)) (if (= aa nil) (setq a a) (setq a aa) ) (setq ip (getpoint "\n Insertion : ")) (setq cp1 (polar ip 0 a)) (setq point (polar cp1 (* pi 0.5) a)) (command "osmode" 0) (command "rectang" ip point) (setq e1 (entlast)) (setvar "osmode" osn) (command "rotate" e1 "" ip pause) (princ) ) Quote
Cad64 Posted June 25, 2011 Posted June 25, 2011 Try using the POLYGON command. Command sequence: Command: POLYGON Enter number of sides : 4 Specify center of polygon or [Edge]: E Specify first endpoint of edge: Click to select start point on screen Specify second endpoint of edge: Hold Shift and drag out square Edit: Looks like eldon snuck in while I was typing. If you draw squares all the time, you could automate the polygon command like so: (defun c:SQ (/) (command "polygon" "4" "e") (princ) ) Quote
eldon Posted June 25, 2011 Posted June 25, 2011 Perhaps the Forum should have a Pending flag, to show that someone was composing a reply. And to add to your fulsome reply, the second point of the leg can arrived at by dragging out the cursor in the direction, and typing in the length on the keyboard. Quote
BlackBox Posted June 25, 2011 Posted June 25, 2011 Building on Eldon's, and Cad64's posts: Keyboard shortcuts: (defun c:SQ () (c:SQUARE)) (defun c:SQUARE () (command "._polygon" 4 "edge" pause pause)) Toolbar macro: ^C^C^P._polygon;4;"edge";\\ Quote
BlackBox Posted June 25, 2011 Posted June 25, 2011 Perhaps the Forum should have a Pending flag, to show that someone was composing a reply. ... Sounds like a feature at TheSwamp; once you've composed your reply, and hit Post, the site informs you of how many posts have been made while you were typing. Quote
dbroada Posted June 25, 2011 Posted June 25, 2011 ... Sounds like a feature at TheSwamp; once you've composed your reply, and hit Post, the site informs you of how many posts have been made while you were typing.we have that featue on a VW forum. Really annoying st times as I often press submit and walk waay only to come back 30 minutes later to see it still sitting there. Quote
Jack_O'neill Posted June 25, 2011 Posted June 25, 2011 You can do it with the rectangle command too: (defun c:SQ (/) (command "._rectangle" pause "d") (princ) ) Lots of ways to get there from here. Quote
nestly Posted June 25, 2011 Posted June 25, 2011 Rectang with Polar Tracking angle 45 http://screencast.com/t/ibMJxfxgB Quote
Tyke Posted June 25, 2011 Posted June 25, 2011 Rectang with Polar Tracking angle 45 http://screencast.com/t/ibMJxfxgB Nice one nestly. But how can you do that and enter the length of the square's side? How about a parametric block on a palette with a pause for entering the length and an automatic explode? Quote
Cad64 Posted June 25, 2011 Posted June 25, 2011 Nice one nestly. But how can you do that and enter the length of the square's side? Watch your command line. You have options and one of them is "Dimensions". Just hit "D" while you're dragging out the square. Quote
nestly Posted June 25, 2011 Posted June 25, 2011 Nice one nestly. But how can you do that and enter the length of the square's side? I may have misunderstood the question. I thought the OP wanted to use an existing line to define the size of the square. Honestly, when I want to draw a rectangle with known dimensions, I just type RECTANG X,Y Quote
Tyke Posted June 25, 2011 Posted June 25, 2011 Watch your command line. You have options and one of them is "Dimensions". Just hit "D" while you're dragging out the square. But is that not the length of the diagonal and not the side? Quote
Cad64 Posted June 25, 2011 Posted June 25, 2011 No, it's the "Dimensions" of the rectangle. Did you try it? It prompts you for the length and width, not the diagonal distance. Quote
Tyke Posted June 25, 2011 Posted June 25, 2011 No, it's the "Dimensions" of the rectangle. Did you try it? It prompts you for the length and width, not the diagonal distance. Yup, I just tried it and you are correct, you have to enter width and height. Sorry Quote
nestly Posted June 25, 2011 Posted June 25, 2011 Typing "D" is only necessary if Dynamic Input is turned off, otherwise you can just type the x and y after picking the first corner. Quote
Jack_O'neill Posted June 25, 2011 Posted June 25, 2011 With rectangle, you pick a start point, it then offers [Area/Dimensions/Rotation]. If you hit D it says "specify length for rectangles" so you enter whatever length, then it asks for the length. Again, enter the dimension you want. Then you pick to determine which direction it goes (right or left of your start point). --edit--i gotta learn to type faster!! Quote
Tyke Posted June 25, 2011 Posted June 25, 2011 --edit--i gotta learn to type faster!! nestly has got everybody today . Hey nestly tell us what you have as a keyboard, or do use speech-to-text? Quote
Jack_O'neill Posted June 25, 2011 Posted June 25, 2011 Now you know why all my common notes and such on drawings are blocks I insert! 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.