Jump to content

Query on creating door openings


Clifford169

Recommended Posts

I'm hoping someone can give me some help with this. We do measured surveys and draw all our surveys ourselves using standard autocad commands. We use a brief amount of blocks for standard kitchen/sanitary units, but otherwise we will draw things to their measured dimensions (to the nearest 5mm).

 

I'm constantly looking to improve our drawing methods and speed, and am currently focusing on door openings. My idea is that we are able to draw a circle, where the diameter would be the opening of a door. That circle would then break the polyline at either end and convert it into a separate line that would be in our 'CEILING' layer. Ideally then, I would be able to offset this new line at the thickness of the wall/door opening and draw a 'BUILDING' line between the ends of the two ceiling lines.

 

This would be a good starting point for what I'm looking for. Any advice on something that can do this for me or if there is an easier alternative that'd be much appreciated!

Link to comment
Share on other sites

One thing you can use instead of breaking the lines is to use a wipeout. It will blank out everything and create a mask. Just make sure that your lines are on top of it in drawing order.

Link to comment
Share on other sites

Pretty easy think of it like this pick left side door point, pick to right, enter door width, pick inner skin. Break and draw a door. I did not post any code as I dont want to do it twice. Post a sample dwg. I am pretty sure that some one will post "draw door" code.

 

Look at this image it has windows and doors cut into inner and outer skins done the way I described.

3dhouse.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Just to update, I've found another tool by Lee Mac that will cater to my needs.

 

http://www.lee-mac.com/objectbreak.html

 

I'm using the 'BRKO' command (changed to BKO for ease) within this to break the 'inners' of our doors and place what was a wall line into ceiling layer. Is there an easy way to extend this to allow the changed line to then request an offset command?

Link to comment
Share on other sites

Yea, I appreciate that what I'm after is a bit niche... The image below should show what I'm trying to get from and to (the final stage being the finished product, I'm happy to get to the 4th stage).

 

10zz3wk.png

Link to comment
Share on other sites

Had a little time to play with this, so thought I'd give you some code to try out.

Again, not pretty, no error checking, etc.

 

(defun c:test (/ clyr dwidth wwidth ln lnpt1 lnpt2 pt pt1 pt2 crc doorln offln sideln1 sideln2 sideln3 sideln4 offang offpt1 offpt2 newang newpt)

   (setq clyr (getvar "CLAYER"))
   (setq dwidth (getreal "\nEnter Door Width: "))
   (setq wwidth (getreal "\nEnter Wall Width: "))
   (setq pt (getpoint "\nSelect Point for Circle: "))

       (command "._circle" pt (/ dwidth 2))

   (setq ln (nentselp pt))
   (setq crc (entsel "\nSelect Circle on Wall Side: "))

       (command "._trim" ln "" crc "")
       (command "._trim" crc "" ln "")

   (setq lnpt1 (polar pt (cdr (assoc 50 (entget (car crc)))) (/ dwidth 2)))
   (setq lnpt2 (polar pt (cdr (assoc 51 (entget (car crc)))) (/ dwidth 2)))

   (entdel (car crc))

   (setq sideln1 (nentselp lnpt1))
   (setq sideln2 (nentselp lnpt2))

       (setvar "CLAYER" "ceiling")

       (command "._offset" wwidth sideln1 (cadr crc) "")

   (setq sideln3 (entlast))

       (command "._offset" wwidth sideln2 (cadr crc) "")

   (setq sideln4 (entlast))

       (entmakex (list (cons 0 "LINE")
                       (cons 10 lnpt1)
                       (cons 11 lnpt2)))

   (setq doorln (entlast))

       (command "._offset" wwidth doorln (cadr crc) "")

   (setq offln (entlast))

   (setq offang (angle (cdr (assoc 10 (entget doorln)))(cdr (assoc 10 (entget offln)))))
   (setq offpt1 (cdr (assoc 10 (entget offln))))
   (setq offpt2 (cdr (assoc 11 (entget offln))))

       (setvar "CLAYER" "building")

       (entmakex (list (cons 0 "LINE")
                       (cons 10 (cdr (assoc 10 (entget doorln))))
                       (cons 11 (cdr (assoc 10 (entget offln))))))

       (entmakex (list (cons 0 "LINE")
                       (cons 10 (cdr (assoc 11 (entget doorln))))
                       (cons 11 (cdr (assoc 11 (entget offln))))))

       (setvar "CLAYER" "door")

   (setq pt1 (getpoint "\nSelect Hinge Point: "))
   (setq pt3 (polar pt1 offang dwidth))

       (command "._pline" "_non" pt1 pt3 "")

   (setq newang (angle pt lnpt1))

   (setq newpt (polar pt1 (- newang offang) dwidth))

 (if (equal pt1 offpt2 0.000001)
       (command "._arc" pt3 "_C" pt1 offpt1)
       (command "._arc" offpt2 "_C" pt1 pt3)
 )

       (setvar "CLAYER" clyr)

 (princ)

)

Link to comment
Share on other sites

Just had the time to give this a good test run sorry!

 

Yes it's coming together, just a few problems with the final placing of the door swing, it'll only exist on the offset side of the door. Also, is it possible to have the distances input in the model space rather than the command bar? Just a personal habit more than anything else.

 

Thanks so much for your help so far, it's much appreciated!

Link to comment
Share on other sites

If a door in the drawing always look the same, isn't it an option to make it a dynamic block?

 

If you have an block for 'standard kitchen/sanitary units', i guess an door can be used in a similar way right? (besides the look the only variable is width and height, seems perfect for an dynamic block).

Link to comment
Share on other sites

If a door in the drawing always look the same, isn't it an option to make it a dynamic block?

 

If you have an block for 'standard kitchen/sanitary units', i guess an door can be used in a similar way right? (besides the look the only variable is width and height, seems perfect for an dynamic block).

 

I've had the suggestion of dynamic blocks given to me before but I've never used them and we don't use them in my office. Is there a good 'how to' guide you could direct me to? Much appreciated ^^

Link to comment
Share on other sites

You are missing out a lot when you try to 'standarize' your workprocess. Dynamic blocks (or at least the dynamic elements) are a helpfull tool.

 

They (for the 'trained') are easy to setup, but are even faster to learn.

 

i do not have the time to explain, but i guess youtube tutorials will be helpfull on this part.

 

i made a simple 3D example of an door.

 

door.dwg

 

If that is what you are looking for in the end it's pretty easy to make and only requires 1 dynamic element.

Link to comment
Share on other sites

You are missing out a lot when you try to 'standarize' your workprocess. Dynamic blocks (or at least the dynamic elements) are a helpfull tool.

 

They (for the 'trained') are easy to setup, but are even faster to learn.

 

i do not have the time to explain, but i guess youtube tutorials will be helpfull on this part.

 

i made a simple 3D example of an door.

 

[ATTACH]61051[/ATTACH]

 

If that is what you are looking for in the end it's pretty easy to make and only requires 1 dynamic element.

 

I understand the basic concept of a dynblock, I just know there's a lot of variables to each of our doors.

The dims we measure are:

- Outers (both sides of door architraves)

- Inners (door opening)

- Thickness through door

- Floor to head height (F-H)

 

Also, for some doors the architrave may be wider on one side than on the other.

 

Would all of these be able to be encompassed in one dynblock? I essentially trying to reduce the number of commands/keystrokes/clicks required to draw each door.

Link to comment
Share on other sites

I tweaked my previously posted code to allow for the door swing on either side, and input to a popup window, but with the other variables you've mentioned It looks as if you'd be much better off with dynamic blocks. Can't help you with that as I use BricsCAD and they haven't got dynamic block creation in their software as of yet.

 

As OMEGA-ThundeR says, I'd give dynamic blocks a try. We used some where I previously worked, but currently my work is all one-offs, so I don't miss them.

 

Good luck!

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...