Why are windows sometimes placed upside down and back to front

A forum dedicated to the Draft, Arch and BIM workbenches development.
User avatar
yorik
Site Admin
Posts: 11840
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Why do arch wall segements sometimes have inside and outside reversed.

Postby yorik » Fri Dec 06, 2019 5:08 pm

There are different issues here, so it's not easy to sort things out.

Basically the wall alignment works like this: You have a baseline only, which can be positioned any possible way in space. So it's not possible to tell which side is left or right. So what we try is to figure out a normal direction. When we have a baseline and a normal direction (basically a perpendicular direction to it, which indicates "the up side"), then we can consistently tell where left and right are, given the direction of the baseline. This is a very basic vector math cross product operation.

Obviously, if the direction of the baseline OR the normal is flipped, the right and left sides change. So indeed the direction in which you draw wall segments is important.

The normal direction can not always be guessed. If you have a (non-linear) polyline, for example, the normal direction is easy. But for a single line, there are 360° possible normal directions.

The wall object does a very simple guess in that last case, basically picking the one from these 360 that points upwards on the Z axis. But it can fail for any number of reasons too.

At the end I would say this: It fails often, indeed, many walls get inverted left/right sides, but it's a solid system that makes the walls behave consistently even if you move or rotate them in any possible position, allowing to use walls not only for "classical", vertical walls, but any other situation where you'd require a wall-like object. I think overall the system is valid.

Maybe we could refine it, though. For example, check against the current working plane at wall creation, try to guess better, an store somewhere if the above rule needs to be inverted
wearyhacker
Posts: 41
Joined: Fri May 18, 2018 9:07 pm

Re: Why are windows sometimes placed upside down and back to front

Postby wearyhacker » Fri Dec 06, 2019 6:27 pm

My original wall was based on a simple orthagonal dwire in the xy plane with aligned with the x and y axes. As such I would expect all the face normal vectors of the wall to have the simple normalised formats 1,0,0, 0,1,0 or 0,0,1. Hovever what I see when things go wrong are working planes with rotational axes 1/√3,1/√3,1/√3. My suspicion would fall on floating points
errors, especially comparison with zero straddle. If you are interested, have a look at this excellent web site https://floating-point-gui.de, the xkcd link is a corker.

Roger
Last edited by wearyhacker on Sun Dec 08, 2019 3:43 pm, edited 2 times in total.
User avatar
Roy_043
Posts: 1208
Joined: Thu Dec 27, 2018 12:28 pm

Re: Why do arch wall segements sometimes have inside and outside reversed.

Postby Roy_043 » Fri Dec 06, 2019 6:55 pm

@yorik
I have to admit that I do not understand how there can be confusion about what is 'up' when you have an extruded wall with a normal property. But the problem that prompted this discussion: some windows are inserted 180 degrees rotated (upside down) may (indeed) be a different issue than the topic title suggests. The current behavior (see my previous 2 posts) is a bit strange IMO.

You mention that Walls should have some flexibility regarding their position in 3D space. But at the moment walls can only be based on pre-made sketches if they are parallel to the global XY plane.
wearyhacker
Posts: 41
Joined: Fri May 18, 2018 9:07 pm

Re: Why are windows sometimes placed upside down and back to front

Postby wearyhacker » Fri Dec 06, 2019 7:09 pm

I propose we change the thread title to "Why are windows sometimes placed upside down and back to front". As long as forum can still still track the thread. At least it would allow me to remove the type from my original version.
Last edited by wearyhacker on Sun Dec 08, 2019 3:43 pm, edited 1 time in total.
User avatar
Roy_043
Posts: 1208
Joined: Thu Dec 27, 2018 12:28 pm

Re: Why do arch wall segments sometimes have inside and outside reversed.

Postby Roy_043 » Sun Dec 08, 2019 1:01 pm

Roy_043 wrote:
Fri Dec 06, 2019 6:55 pm
You mention that Walls should have some flexibility regarding their position in 3D space. But at the moment walls can only be based on pre-made sketches if they are parallel to the global XY plane.
I'll start a new topic to discuss this issue.
Last edited by Roy_043 on Sun Dec 08, 2019 4:05 pm, edited 1 time in total.
carlopav
Posts: 1185
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Why do arch wall segements sometimes have inside and outside reversed.

Postby carlopav » Sun Dec 08, 2019 3:31 pm

wearyhacker wrote:
Fri Dec 06, 2019 7:09 pm
I propose we change the thread title to "Why are windows sometimes placed upside down and back to front".
You should be able to do it editing your first post
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Posts: 1208
Joined: Thu Dec 27, 2018 12:28 pm

Re: Why are windows sometimes placed upside down and back to front

Postby Roy_043 » Mon Dec 09, 2019 1:59 pm

About the new topic title: "Why are windows sometimes placed upside down and back to front".
I can only confirm the upside down problem. The issue does not seem to involve back to front placement. In the image the door on the left was inserted first. The 2nd door was inserted 180 degrees rotated (upside down) but not back to front.
Attachments
2nd_Door_180degrees_Rotated.png
2nd_Door_180degrees_Rotated.png (9.24 KiB) Viewed 115 times