ZZombie Posted June 16, 2009 Posted June 16, 2009 Hi, new to these forums, so hello Here is what I need at the moment, attempting something which seems really difficult: 1) Picking a start point 2) Picking a rectangular area from that point Here is where it gets tricky 3) From the rectangular area, calculate a number of rectangles to be drawn in the area selected based on the following (only going in the x direction, from left to right): - Height based off of the area selected (or perhaps make another line to input the height by selecting or inputting) - # of rectangles to be drawn (Input by user) - Inputting a number to determine spacing between each rectangle, also to be used for an offset to the inside of the selected area. If anyone could help with even 1 line of code, or some pointers as to how i should go about this, it would be greatly appreciated. I am not looking for a complete routine, actually attempting to code most of this myself, I don't want to feel like im entirely taking someone elses work Quote
David Bethel Posted June 16, 2009 Posted June 16, 2009 Hi, new to these forums, so hello Here is what I need at the moment, attempting something which seems really difficult: 1) Picking a start point (initget1) (setq p1 (getpoint "\nSelect First Point: )) 2) Picking a rectangular area from that point (initget 1) (setq p2 (getcorner p1 "\nSelect Other Corner: )) Here is where it gets tricky 3) From the rectangular area, calculate a number of rectangles to be drawn in the area selected based on the following (only going in the x direction, from left to right): (initget 7) (setq d1 (getdist p1 "\nDistance)) The lines in red could help you start. -David Quote
BIGAL Posted June 18, 2009 Posted June 18, 2009 heres the code for a box ; draw a box note angles are in radians 90=1.5708 (setq pt1 (getpoint "\nPick bottom left")) (setq len (getreal "\nEnter length")) (setq wid (getreal "\nEnter Width")) (setq pt2 (polar pt1 1.5708 wid)) (setq pt3 (polar pt2 0.0 len)) (setq pt4 (polar pt3 4.712 wid)) (command "line" pt1 pt2 pt3 pt4 "C" "") "repeat" as required resetting pt1 now equals pt4 (setq pt1 pt4) 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.