Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
hko
Posts: 105
Joined: Thu Apr 23, 2020 10:44 pm

Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by hko »

- I created a draft rectangle and an arch wall out of that (basically a room with four walls represented by a single arch wall)
- I selected a single inside face of the wall (room_report.Wall.Face14 in the attached file, inside face of the "front wall" in the screenshot)
- I created a window using the "Creating from scratch" method documented at https://wiki.freecadweb.org/Arch_Window
-- I used the bottom edge of the Face14 as external geometry and constrained window position to that
- I got a window where I wanted it (the "front wall" in the screenshot)
-- A frame (default window component) was shown in the window and I removed it (I just wanted a hole in the wall for now)

However, I also got a hole in the "rear wall" (or should I say rear part of the arch wall) as shown in the screenshot. That hole did not have a window frame at any point. That is, it was just a hole even before I removed the frame from the window.

Am I doing something wrong or what's going on? The FreeCAD file and the screenshot are attached. I'm using FreeCAD 08854bcc717b89fe437b671edc2098c603ff5dec built from git, running on Kubuntu 19.10.
screenshot
screenshot
room_report_screenshot.png (159.54 KiB) Viewed 1252 times
Attachments
room_report.FCStd
FreeCAD file
(19.47 KiB) Downloaded 33 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by vocx »

hko wrote: Sat May 30, 2020 2:18 am I'm using FreeCAD 08854bcc717b89fe437b671edc2098c603ff5dec built from git, running on Kubuntu 19.10.
Dude, you could just say, version 0.19, the Git commit is hard to trace. Much better is to paste your Std_About information, or the output of App.Version().

The Window has a "Hole Depth" property which you can modify to avoid cutting the back part of the wall. If this property is 0, an automatic calculation is done, but occasionnaly the algorithm will make bad estimations if the distance from one wall to the back wall is too short.
Last edited by vocx on Sat May 30, 2020 12:31 pm, edited 1 time in total.
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: 8552
Joined: Thu Dec 27, 2018 12:28 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by Roy_043 »

If the Hole Depth is set to 0 the biggest dimension of the window (BoundBox?) determines the hole depth. In the OP's case the height is larger than the width and therefore its value (1900) is used for the Hole depth.

Edit: Spelling.
Last edited by Roy_043 on Sun May 31, 2020 8:50 am, edited 1 time in total.
hko
Posts: 105
Joined: Thu Apr 23, 2020 10:44 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by hko »

vocx wrote: Sat May 30, 2020 4:57 am Dude, you could just say, version 0.19, the Git commit is hard to trace. Much better is to paste your Std_About information, or the output of App.Version().
Sorry, I didn't remember that 0.19 is the upcoming version, not the latest stable release.
vocx wrote: Sat May 30, 2020 4:57 am The Window has a "Hole Depth" property which you can modify to avoid cutting the back part of the wall. If this property is 0, an automatic calculation is done, but occasionnaly the algorithm will make bad estimations if the distance from one wall to the back wall is too short.
I see. I expected window hole depth to depend on the wall width. Is it not possible to depend on a property of a host object? If I manually set it to be equivalent to wall width using formula editor and recompute, the window gets duplicated in the object tree. (As a sidenote, might be a good idea to warn about or prevent making such expressions that cause problems.)

If I cut an object from another in the Part workbench, I get a new Cut node in the object tree and the two objects will be children of that. It also seems that one sibling can refer to properties of another. Is there a reason why arch walls and windows are handled in a different way?

Back to the immediate issue: if I set window hole depth to an absolute value, 0.2m in this case, it seems to do what I want (=the other hole disappears). However, I now have a new problem: if I then recompute the wall object, the hole moves in X direction to the corner of the room. This appears to happen because I constrained window sketch position to an external geometry that was an edge of the interior wall face and after recompute there is a new face in place of that, so my constraint now points to some ghost geometry or something, certainly not to any wall face edge anymore.

Is there a way to constrain sketches to a wall face so that they survive object recomputing? I might want to position not just windows but, say, ventilation holes to a certain relative position from wall corner, for example.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by vocx »

hko wrote: Sat May 30, 2020 4:57 pm ... the window gets duplicated in the object tree. (As a sidenote, might be a good idea to warn about or prevent making such expressions that cause problems.)
What?
Is there a way to constrain sketches to a wall face ...
This causes the topological naming problem so it's not recommended.

You have several issues, but it's hard to see. It's better if you attach more images with the problems.
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.
hko
Posts: 105
Joined: Thu Apr 23, 2020 10:44 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by hko »

Ok, let's start with the window duplication. I started with the file in the original post. First I changed window's Hole Depth property to Wall.Depth. The result is shown in this screenshot:
screenshot after changing hole depth
screenshot after changing hole depth
room_report_screenshot1.png (154.92 KiB) Viewed 1166 times

It now displays 0.20m (Wall.Width) in the Hole Depth property as expected. The second hole is still in in the displayed model. Then I selected Wall in the model tree and chose "Recompute object" from the context menu. This is the result:
screenshot after recompute object
screenshot after recompute object
room_report_screenshot2.png (151.9 KiB) Viewed 1166 times

As you can see, there are now two Window nodes in the model tree. I also get a warning: "1035.27 Tree.cpp(292): [ComboView] duplicate child item room_report#Wall.Window"

This does not happen if I use plain "0.20m" value as the Hole Depth property and then recompute the wall object.

vocx wrote: Sat May 30, 2020 6:40 pm This causes the topological naming problem so it's not recommended.
Thanks for the link. I'm somewhat unsure how to best apply the suggestions (for coping with the topological naming problem) for architectural models, but they helped me realize that in this case I can use an edge of a rectangle (that I used as the base of the wall) as external geometry instead of an edge of a wall face and that way the window position survives wall recomputation.
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by vocx »

hko wrote: Sat May 30, 2020 4:57 pm ...
If I cut an object from another in the Part workbench, I get a new Cut node in the object tree and the two objects will be children of that. It also seems that one sibling can refer to properties of another. Is there a reason why arch walls and windows are handled in a different way?
...
The reason is that an Arch Wall is a more complex object that a simple Part Feature created with the Part Workbench. In particular, Arch Windows have a Host property, which is used to determine in which body it is inserted. By adding an expression like the one you introduce, you may be creating a circular dependency, because the wall needs to update its shape based on the window, which at the same time depends on the wall.

The window duplication is probably a strange bug.
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.
CNROBERTS
Posts: 5
Joined: Fri Aug 28, 2020 5:15 pm

Re: Arch: window creates an extra hole in a different part of the wall in addition to the actual window

Post by CNROBERTS »

It is probably as simple as this, when you insert the window in a wall, if there is another wall in close proximity behind it will cut a hole in that wall too. The reason being the hole is set at 0.00 which means automatic and which is actually much bigger than the width of the wall. Solution highlight the widow and in its properties change hole depth to the thickness of the wall or slightly more.
Post Reply