Proposed algorithm for window added in wall, movement

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Proposed algorithm for window added in wall, movement

Post by carlopav »

It will take less than what you think probably ;)
I'm not, as Paullee, a professional developer, and Arch Is a quite difficult Place to start from IMO. So get your hands dirty and have fun!
follow my experiments on BIM modelling for architecture design
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Proposed algorithm for window added in wall, movement

Post by paullee »

From the code @carlopov is developing, he is much much advanced than I am :D

It if fun though, not being a programmer, to do something to fit one's need indeed :lol:
Willi2006
Posts: 18
Joined: Sun Jan 31, 2021 10:56 pm

Re: Proposed algorithm for window added in wall, movement

Post by Willi2006 »

When looking for help for moving walls with their windows I found this thread among several others. If it is still of interest I will try to contribute something to the discussion. Imho there's no need to develop anything. Everything needed is already in FreeCAD. Well it took some time to find it out as FreeCAD offers so much wonderful stuff.

Creating a wall and adding a window is fine, see left in the 3D View. But creating a wall, adding a window and using Draft_Rotate on the wall gives an unexpected result. The wall is rotated, the window not, Wall001 on the right in the 3D View.
WindowWall.png
WindowWall.png (47.05 KiB) Viewed 690 times


Creating a PartDesign_CoordinateSystem for the wall and window allows to move and rotate them together easily.
With Std_Part a Local Coordinate System for the wall and window can be created. Now it's easy to move and rotate wall and window together, Part001 on the right in the 3D View.
WindowWallPart.png
WindowWallPart.png (43.79 KiB) Viewed 690 times


Adding the additonal object Std_Part allows to move the window within the wall and move and rotate the wall and window independently. Imho this is also close to the building process: The wall placed in the building and the window is placed in the wall, not the window is placed in the building.

WindowWall.FCStd
(74.77 KiB) Downloaded 31 times

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Proposed algorithm for window added in wall, movement

Post by carlopav »

Willi2006 wrote: Tue May 11, 2021 9:57 pm When looking for help for moving walls with their windows I found this thread among several others. If it is still of interest I will try to contribute something to the discussion. Imho there's no need to develop anything. Everything needed is already in FreeCAD. Well it took some time to find it out as FreeCAD offers so much wonderful stuff.
I'm Sorry to stalk you all again thesedays, buy I completely agree with you... This path Is the most promising to me, but in the long run would mean to break some backward compatibility. Please check the BIM experimental tools on this, they are aimed to work exactly this way.
Edit: for your information, if i recall correctly also IFC can work this way
follow my experiments on BIM modelling for architecture design
matthijskooijman
Posts: 72
Joined: Thu Mar 25, 2021 10:59 am

Re: Proposed algorithm for window added in wall, movement

Post by matthijskooijman »

Hey folks. I've been investigating moving of hosted objects a lot in the recent days, and now just read this post.

First, responding to the older part of this topic where Evaggelos makes a proposal for introducing a Guest property and using it to move guests along with their host: This feature actually already exists. There is code in place that makes Additions, Subtractions and objects with Host or Hosts move along with their host object (controlled by the MoveWithHost property, by default true for Windows only). However, there seem to be a bunch of bugs in the code that prevent this from working properly in some cases (Oh, I just see that carlopav already pointed this out last year).

One such case is windows inside walls, as Willi2006 reports. This is due to a bug in ArchWall, the MoveWithHost mechanism doesn't work there. For a more detailed exploration of this and related bugs and ideas about fixing it, see this topic

As for the other suggestion by Willi2006, using Part with a local origin to facilitate this movement, I recently found some older discussion that touches upon this, see this post and onwards.
Willi2006
Posts: 18
Joined: Sun Jan 31, 2021 10:56 pm

Re: Proposed algorithm for window added in wall, movement

Post by Willi2006 »

Hi carlopav and matthijskooijman,

thanks for confirming my thoughts and for pointing to some interesting discussions. I'm just a hobby programmer and enthusiastic user of FreeCAD for about 6 months now. Thus I can only understand parts of these discussions.

As far as I understand Arch_Wall is based on Part_Component which makes first the Additions and second the Subtractions. But for a window in a wall first the hole must be made, a subtraction, and second the window added.

I think it's possible to achieve the desired object without having problems with movements by using the boolean operations Part_Fuse, Part_Cut, Part_Common and Part in the appropriate sequence. Anyhow Part_Component is easier to use and more intuitive. But there's no control about the sequence of the boolean operations.
Post Reply