Why are windows sometimes placed upside down and back to front

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

wearyhacker wrote: Sun Dec 01, 2019 2:12 pm
The screen capture appears to have lost the placement cursor. This shows at the bottom left of the window placement rectangle, as expected

Screenshot from 2019-12-01 12-31-14.png

In this capture the placement cursor is at the top right.
OK, got you about the Window is upside-down and inverted.

@yorik is the main developer of the Arch / BIM workbench, he should be the one know in details what's happening - seem he's extremely busy recent weeks so may need some patient.

In the meantime, just as @yorik had mentioned can do it manually - just create the window 'in the air', then turn on it base sketch, and move and rotate the sketch to the wall position as desired. In the window's Host attirbute to choose the Wall object. Recompute and it should be done. There are a number of discussion how to place a window in the forum.
Screenshot from 2019-12-02 01-49-47.png
Screenshot from 2019-12-02 01-49-47.png (214.83 KiB) Viewed 1564 times
Screenshot from 2019-12-02 01-49-07.png
Screenshot from 2019-12-02 01-49-07.png (221.64 KiB) Viewed 1564 times
Last edited by paullee on Sun Dec 01, 2019 6:03 pm, edited 1 time in total.
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

wearyhacker wrote: Sun Dec 01, 2019 4:44 pm I am losing the will to live on this one. Can someone point me a python snippet that shows me how to get at the data from the original dwire. i.e. the ordered points list and any other info it may contain?

Thanks Roger
select the Dwire object and run in the python console:-

Code: Select all

>>> s=Gui.selection.getselection()[0]
>>> for v in s.Shape.Vertexes:
...   print (v.Point)
... 
Vector (0.0, 1e-14, -300.0)
Vector (11050.0, -6.67e-13, -300.0)
Vector (11050.0, -900.0000000000007, -300.0)
Vector (17500.0, -900.0000000000007, -300.0)
Vector (17500.0, -9750.0, -300.0)
Vector (14100.0, -9750.0, -300.0)
Vector (14100.0, -8102.403808593751, -300.0)
Vector (9494.423828125, -8102.403808593751, -300.0)
Vector (9494.423828125, -9750.0, -300.0)
Vector (6200.0, -9750.0, -300.0)
Vector (6200.0, -8100.0, -300.0)
Vector (-4.96e-13, -8100.0, -300.0)
>>> 
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

paullee wrote: Sun Dec 01, 2019 5:58 pm
wearyhacker wrote: Sun Dec 01, 2019 2:12 pm
The screen capture appears to have lost the placement cursor. This shows at the bottom left of the window placement rectangle, as expected

Screenshot from 2019-12-01 12-31-14.png

In this capture the placement cursor is at the top right.
OK, got you about the Window is upside-down and inverted.

@yorik is the main developer of the Arch / BIM workbench, he should be the one know in details what's happening - seem he's extremely busy recent weeks so may need some patient.

In the meantime, just as @yorik had mentioned can do it manually - just create the window 'in the air', then turn on it base sketch, and move and rotate the sketch to the wall position as desired. In the window's Host attirbute to choose the Wall object. Recompute and it should be done. There are a number of discussion how to place a window in the forum.

Screenshot from 2019-12-02 01-49-47.png
Screenshot from 2019-12-02 01-49-07.png
yorik wrote: Ping
wearyhacker
Posts: 44
Joined: Fri May 18, 2018 9:07 pm

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

Post by wearyhacker »

Thanks for all the help people.

I will try the manual placement approach tomorrow.

Roger
Last edited by wearyhacker on Sun Dec 08, 2019 3:41 pm, edited 1 time in total.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

wearyhacker wrote: Sun Dec 01, 2019 4:18 pm Just noticed that the process I used to cut out the test example has somehow resulted in the wire being converted into a featurePython object. In the original file it was a Part::PartFeature. I have attached a new version which preserves the original object type.

roger
I'm not sure what you mean by this. A Draft_Wire is a Part_Part2DObject (Part::Part2DObject), which is a derived class from Part_Feature (Part::Feature). What is this "featurePython" you mean?

And yes, placing Windows and Doors is sometimes tricky. You can just place it in the wall that you want, and then change the orientation manually later. See Tutorial custom placing of windows and doors.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

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

Post by Roy_043 »

The problem seems related to the position of the Dwire relative to the global origin. If I move the "Ground level wire" so that the global origin is inside it, the problem no longer occurs.
wearyhacker
Posts: 44
Joined: Fri May 18, 2018 9:07 pm

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

Post by wearyhacker »

Roy_043 wrote: Tue Dec 03, 2019 2:46 pm The problem seems related to the position of the Dwire relative to the global origin. If I move the "Ground level wire" so that the global origin is inside it, the problem no longer occurs.
Well, I never would thought of that. I always set the global origin outside the building or to the left most and top most point on the plan I am working on. Thats probably why I have always had problems placing doors and windows!

I have asked before if there was any tool to rebase a complete file by recalculating all the relevant stored points. Never got any answers though :D
Last edited by wearyhacker on Sun Dec 08, 2019 3:42 pm, edited 1 time in total.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

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

Post by Roy_043 »

The issue seems related to the negative y coordinate for the outer faces of both rear facades. For one face the y coordinate is actually almost zero (some sort of rounding error).
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

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

Post by Roy_043 »

I did some more testing to try to pinpoint when this problem, windows are inserted 180 degrees rotated, occurs.

In my tests I have use walls created by starting the Wall command and then clicking two points. So all walls were based on a single line sketch. And prior to inserting the windows the WP was aligned with the correct wall face.

My findings are:
  1. Walls with major faces parallel to the global YZ plane are not affected.
  2. If the face of the wall faces the negative global Y axis the problem does not occur.
  3. In all other cases the first window is inserted correctly, but all subsequent windows are rotated.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18811 (Git)
Build type: Release
Branch: master
Hash: b809867021deb37be1039dab37b9fe1cafab254e
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Dutch/Netherlands (nl_NL)
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

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

Post by Roy_043 »

... The rotation of the window may be due to other parts of FreeCAD. Creating a Draft SetWorkingPlaneProxy shows the same issue:
  1. Create a wall with a face turned in the direction of the positive global Y axis.
  2. Align the WP with that face.
  3. Create a WP Proxy.
  4. Insert a window.
  5. Again align the WP with the face.
  6. Create another WP Proxy.
  7. Result: the last WP Proxy is 180 degrees rotated relative to the first.
Post Reply