Tarz4n Posted January 9, 2025 Posted January 9, 2025 Hi everyone, I’ve been working on an AutoLISP routine to automate the process of drawing windows in already drawn walls. (interesting for drawing windows on pointclouds, because these walls are not always parallel/orthogonal) The idea is as follows: The routine asks the user to click five points: Points 1 to 4 are used to project lines (representing the reveal and the outer reveal of the window) perpendicular to the nearest polylines (representing the inner and outer walls) on both sides. Point 5 is used to draw a polyline constrained between two lines drawn in the previous steps. This line should also be perpendicular to one of the first four lines. (representing the windowglass itself) All drawn polylines should be placed in one layer "Layer 1". I've tried the coding myself, but I just think it's not my biggest talent... If anyone can help suggest an approach, I’d greatly appreciate it. My ultimate goal is to efficiently create the two daylight openings, two inner openings, and the window itself in the middle, perpendicular to one of the first four lines. Thanks in advance for your help! Quote
BIGAL Posted January 9, 2025 Posted January 9, 2025 Welcome aboard, have a look at this image, the windows cut the wall, in the image a cavity wall of 4 line. Ok without giving out all the secrets, You pick outer line, enter offset from corner, width, height, number of panels and more info. Sorry its part of an overall house plan package yes has a cost. Yes the windows are drawn from a 3d point of view based on info supplied whilst in plan view, but no solids. So if you want to have a go yourself just look at it this way break walls and cap Then draw the window frames. Just do one object at a time. The reason for pick an end when picking outside wall, then nominate distance along is that gives you a direction for your perp lines, I use a get end points and check is the distance from pick point to ends big or small then can work out line angle. (setq ent (entsel "\nPIck object near end ")) (setq pt (cadr ent)) (setq obj2 (vlax-ename->vla-object (car ent))) (setq start (vlax-curve-getstartPoint obj2)) (setq end (vlax-curve-getendPoint obj2)) (setq d1 (distance pt start)) (setq d2 (distance pt end)) (if (> d1 d2) (setq tmp start start end end tmp ) (setq ang (angle start end)) Quote
Tarz4n Posted January 10, 2025 Author Posted January 10, 2025 Hi Bigal, thank you for the help. This is definitely something I can work with! 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.