designing/moving windows in a house

Started by bobl, June 18, 2014, 03:31:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

prl

Ok bobl, you're swimming fine, though perhaps in circles using a mix of the breast and butterfly strokes.  Time for a macro detour.

Below is a simple macro that can be the basis for a good portion of your house.  Put the macro in your macro folder.  To run the macro, hit the command line and type cube 10.  It will draw a solid cube 10x10x10.  Now for the beauty.  You're don't really care what size the cube is because now you are going to select it and open the infobox and in the bounding box fields, change the values to what you want.  Now make all the various rectangular parts for your house like this and assemble it.

Quote'Program:  cube.d3m  (draws a 3d box solid)

precision 15

x1 = 0
y1 = 0
z1 = 0

rx$=sys$(0)

if rx$="" then input "Enter size", rx$

x=val(rx$)


>box
{
<pointxyz [x1, y1, z1]
<pointxyz [x1+x, y1+x, z1+x]
}


END

bobl

WOW
I program in Powerbasic a lot and am delighted to see this probably very powerful facility in Designcad. That macro works like a dream and looks like a very elegant solution to what I'm trying to do. I look forward to learning about these as I get more comfortable.
Thank you very much for the education!


bobl

#77
I'd like to know how you subtract a triangular prism from the box created via cube
using the box's outline as a guide to draw the triangle to be extruded
i.e. if I do this....
then the prism is then part of the box so can't be subtracted from the latter.
Is there a simple way of still drawing the triangle against the box but making appear as a different component so that it can be subtracted?

If not...I'll just draw it separately and position it. I could do with the practice anyway.

prl

Quote from: bobl on June 26, 2014, 05:53:23 AM
I'd like to know how you subtract a triangular prism from the box created via cube

Bob, you're on the right track.  There are MANY ways to do the same thing in DesignCAD.  Here is a quickroof (triangular solid) movie.  It uses the "plane" command, a couple of gravity snaps, a midpoint snap, and the famous "extrude" command.

https://dl.dropboxusercontent.com/u/81411430/DesignCAD/quickroof.swf.html

bobl

#79
That's great.
Thanks very much indeed!
Edit:
My word...yes that's a much faster way of achieving a roof.
Thanks a lot!

prl

Bob, many ways so little time.  That works fine for gables.  Hip and dutch hips a bit more slicing and dicing, but with primary solids (cubes) and a bit of basiccad magic, DesignCAD Can! do anything.

bobl

I'm starting to believe that and am delighted that designcad incorporates a basic-like language.
Thanks...I've got the overhanging rafters to show too.

bobl

#82
I can position two identical boxes by their corners now so that they form a column but...
if the boxes have different widths and depths (height irrelevant)
I still haven't got how you position one box on another that their faces and centres align.
Do I need basiccad?
Do I need handles i.e. the red things that resize and seem to extend through every centre?
Also I've looked for a shortcut for centre of gravity snap but can't find one and...
even if I could...
wouldn't it bury one box about half-way down (i.e. into the C of G) the other if I moved one close and hit such a shortcut.
Any help much appreciated.

Rob S

If I wanted to stick one box face centred against another box face, I would firt draw a diagonal line across the face of the destination box, and another across the face of the second box

Then, I would set the handle of the box to be moved on the midpoint of this diagonal, start the move command, and snap the handle to the midpoint of the diagonal on the destination box.

Then, you can delete the diagonal lines.

In practice I suspect it would be rare to want mid-face to mid-face moves

More likely you would know the distance offset up and over of one corner of the box to be placed against the other.

In this case, you would set a handle on the box to be moved, start the move command by clicking on the handle, and then use point-relative (shortcut single-quote" with the "reference point" option, and enter the offset distances, then "OK" and snap to the corner from which the offsets are taken.
User since forever

bobl

#84
Thank you very much for answering my question and for offering a more realistic scenario and solution.
I think I understand the first method but don't quite grasp the second one.
I'll draw a picture and post in a minute or two if that's ok.

Edit: back again!
I'd really appreciate it if you could just explain that again re A, B and C imagining that...
A is -5 -5 from B in the x and z directions and you don't quite know where C is in relation to A or B.
How would you put C on A your way 'cos at the moment I'd need to draw the line to get the point but it looks like you're doing it without.

bobl

#85
I just moved C onto B and then did another move straight after using point relative to -5,0,-5 and it worked. Is that what you mean? I used gravity snap to postion on C and to move C onto B...then just relied on the point relative dialog to move C onto A i.e. as if the line and A weren't already there.
It never occured to me to do it in "two".

Wow....Yes I've just done what you've explained and see how it works now
i.e.
start the move,
-5,0,-5 in point relative dialog with reference point clicked,
Move to C close to B and gravity click
and C jumps -5,0,-5 from B to A
I see that reference point in the point relative dialog came after 2000 pro and is in 17.
I really appreciate you showing me that way 'cos I've wanted to do that a few times today.

DrollTroll

#86
If I understand your intent correctly, you want to move the top box so that Corner C is at point A.

Method 1:

Assume "A" is not marked, but we know its offset from "B"

First select Box "C" at the desired corner (simply gravity snap to that corner to select it there).

Press 'M' to initiate the Move command. Make sure that "From Reference Point" is unchecked in the Move dialog.

Initiate Point Relative. Make sure that  "Reference Point" is selected in Point Relative. Enter the desired offsets from B, click OK.

Point Relative is still waiting for you to indicate the reference point, so now Gravity Snap to B.

Method 2:
Assume "A" is marked.
Gravity snap to point C to select the Box.
Move command.
Gravity snap to point A.

Now, if Point C is not actually on the top box, but just a reference point from which to move it:

Method 3 (assumes A not marked, but offset from B known):
Select the top Box.
Ctrl-H, gravity-snap to C, Enter to finish setting handles.
M to start the Move command (uncheck the bottom checkbox in the dialog)
Point Relative "Reference Point" option selected. Enter desired offsets from B, click OK.
Gravity snap to B.
25 years with DesignCAD

bobl

#87
>If I understand your intent correctly
Yes you're bang on and that recipe worked perfectly in 17.
Thank you very much for the confirmation.
I was in 2000 at the time which has no reference point checkbox in the point relative dialog so...
I just used 2 gravity snaps either side of a Move command to move C onto A and then Move with a point relative to enter B's offsets from A to move C there.
It worked fine too.

After I managed to do that I wondered about the other thing I wanted to do i.e. whether I could use point relative in conjunction witht the red resize handles to precisely grow/shrink things. I see that if you put the cursor over the ends of the resize handle lines you get a white two way arrow.
When I saw this I brought up a point relative and entered the offset and it seemed to work fine
judging by my test dimension.
My question is....
Do you have to be any more accurate with the mouse once you see the white two way arrow or does seeing the white two-way arrow mean you've been accurate enough with the mouse. I think yes.

DrollTroll

#88
I can't answer that definitively, sorry. I've had reports that the resizing handles may not, in some circumstances, be as accurate as one might wish.

This may simply be due to someone gravity-snapping to the wrong points, I don't know for certain.

*EDIT* Seems to work ok in simple cases. Start the resize operation, use Point Relative (reference), snap to a reference point.

If it's a simple enough shape, I typically select the object, turn on Point Select Mode, drag-select the points I want to adjust (this turns them solid blue), Gravity-snap to one of them, and use Point Relative to move those points.
25 years with DesignCAD

bobl

#89
Ok thanks very much for pointing that out.
As long as I know...I can make sure I test each time or just size things right to start with.
Edit:
I missed the above recipes first time through your post.
I'll have a play with those. They looks very useful.
Again....Thank you.