[ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

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: 5134
Joined: Wed May 04, 2016 3:58 pm

[ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by paullee »

In the process of modelling the Villa Savoye, found/re-visit some bugs / inconsistency / area of improvement on ArchWindow.

ArchWindow (/Door) automatically generate very deep opening which usually puncture through adjacent walls.
(This to be further discussed in next post)

When Clone is used over ArchWindow, the behaviour wrt HoleDepth/HolWire is buggy / not consistent.

HoleDepth in Clone of ArchWindow
  1. There are a numbers of Clones of Door, some of them adjacent to a few wall
  2. So a few time, the door automatically puncture hole in adjacent wall which is not desirable
  3. Intuitively, try to set the HoleDepth in the concerned Clones, but then no opening is created then !
  4. PR is submitted - now the HoleDepth setting in the Clones is respected, which would override the Original's HoleDepth (& automatic BoundBox) setting
  5. Of cos, user may set the HoleDepth in the Original, so all Clones automatically use this setting; just override as desired in the Clones
HoleDepth in Clone of ArchWindow
  1. There are HoleWire setting in the Clones also - Ok, settting this in the Clones the opening shape changes
  2. However, when this is a Clone, setting the HoleWire in the Original, DO NOT change the opening shape to the contrary
  3. PR is submitted - the HoleDepth setting in the Original is used now ( if HoleDept in Clones is not set ), the opening shape follow the Original
PR#2915

Screenshot from 2020-01-19 09-32-49.png
Screenshot from 2020-01-19 09-32-49.png (250.16 KiB) Viewed 648 times
Screenshot from 2020-01-19 09-58-37.png
Screenshot from 2020-01-19 09-58-37.png (228.49 KiB) Viewed 648 times
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by paullee »

The main issue in this thread want to discuss / solicit users' idea is the algorithm ArchWindow automatically deduce the hole depth:-

Code: Select all

    def getSubVolume(self,obj,plac=None):

        "returns a subvolume for cutting in a base object"

        # getting extrusion depth
            ...
            if base:
                b = base.Shape.BoundBox
                width = max(b.XLength,b.YLength,b.ZLength)
        
This algorithm for a few occasions generate opening in adjacent nearby walls also. Of cos, with PR in above post, just set HoleDepth in the Clone (or set it in the Original) will fix it.

Just see if anyone have a better algorithm.

Proposal / Discussion :-
  1. First thing to me is the hole depth shall be generated by ArchWall itself (in ArchComponent.processSubShapes)
  2. So the Depth just follow the Wall Width (Thickness), 'just enough'.
  3. But 1mm + Wall Width (Thickness) ?
    (mind that currently the extrusion of opening solid is formed Symmetrically along one face of the door)
  4. getSubVolume() in Window just provide the Profile (if a dedicated subvolume is not provided in the Window object)
  5. Better solution ?
Of cos, my OverrideWidth feature (or getWidhts() ) in ArchWall create problem for myself - as each segment of wall now can have different Width (Thickness) :D
In any rate, I want to add feature later to know which segment of wall (e.g. Wall on polyline Wire, Sketch) a Door / Window is attached to exactly (it is BIM's thinking right?)

Thanks.
Screenshot from 2020-01-19 09-32-07.png
Screenshot from 2020-01-19 09-32-07.png (267.92 KiB) Viewed 645 times
User avatar
Roy_043
Veteran
Posts: 8578
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by Roy_043 »

paullee wrote: Sun Jan 19, 2020 2:05 amArchWindow (/Door) automatically generate very deep opening which usually puncture through adjacent walls.
For this to happen the walls must belong to the same wall object (f.e. as additions).
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by bitacovir »

paullee wrote: Sun Jan 19, 2020 2:40 am But 1mm + Wall Width (Thickness) ?
First, thanks for your submitted PR.

Second, it is true that HoleDepth is annoying, and your suggestion should be the most logic. But, if it is not possible, if you just set up in the code the HoleDepth to something thinner like 700mm as default, it should be enough.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by paullee »

Thanks for the comments :)

@Roy, yes it happens in scenario you says. And in a Draft Rectangle for a Room shape Wall object, and sketch with numerous lines etc. :(

See more comments from anyone else.
User avatar
Roy_043
Veteran
Posts: 8578
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by Roy_043 »

Note that Hole Depth is a property of the window object. So the user can correct it 'manually'.
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by paullee »

yorik wrote: Ping
Ok some idea would like to propose before further experimenting and implementing.

Current Implementation
  1. Only found ArchWindow and ArchRoof has a getSubVolume() which provide a Subtraction Volume
  2. ArchComponent provides a processSubShapes() for all ArchObjects to do Addition / Subtraction
  3. processSubShapes() simply use getSubVolume of its Children (Window/Door, Roof etc.) to obtain the subtraction volume and do the cut as told
Proposed Minor Amendment
  1. ArchComponent processSubShapes() (see below) check if the self/obj is an ArchWall or not
  2. If Positive, it call getSubFace() of its Children Window/Door object to get the Window Opening Outline Face
    [EDIT]
  3. Call getSubVolumeHopeDepth to get the Depth if a manual input HoleDepth is specified in ArchWindow
  4. If not -
  5. It checks the Width or the Max of the OverrideWidth
    (maybe in future can check against the Width of each segment of Wall if applicable)
  6. It extrude the Face into Solid by ( [EDIT] Width/Depth + 1mm) and do the cut
  7. Window/Door object's getSubVolume has part of its code deducing the Cut Wire
  8. These be singled out to become the getSubFace() - for both getSubVolume() of Window and processSubShapes() of ArchComponent to call


Still no idea what to do with the original algorithm

Code: Select all

                b = base.Shape.BoundBox
                width = max(b.XLength,b.YLength,b.ZLength)
Thanks for any idea :)
Last edited by paullee on Fri Jan 24, 2020 1:39 am, edited 1 time in total.
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by bitacovir »

paullee wrote: Thu Jan 23, 2020 8:36 pm
[*]It extrude the Face into Solid by ( Width + 1mm) and do the cut
What will happen with structures with variable width like this one?
WindowWall.FCStd
(22.36 KiB) Downloaded 11 times
FreeCAD_YUatr031kc.png
FreeCAD_YUatr031kc.png (43.02 KiB) Viewed 488 times
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by paullee »

The most easy way to do this is manual input indeed for this scenario - or very complicated algorithm if possible ? :)
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: [ PR + Discussion ] ArchWindow HoleDepth + HoleWire (+ Clone) Behaviours

Post by bitacovir »

paullee wrote: Thu Jan 23, 2020 10:18 pm The most easy way to do this is manual input indeed for this scenario - or very complicated algorithm if possible ? :)
Currently, the window tool can be used for many scenarios where walls are created using multiple objects and part tools (boolean operations). I don't think an algorithm can consider all potential operations and results. Therefore a manual input is necessary.
It would be ideal a system that detect if a wall is a regular wall or a complex one and automatically switch between an simple algorithm to a pre setup holedepth. Anyway, is the depth of the hole in a ratio of the window area now? (bigger window = deeper hole) maybe you just need to fix the ratio to avoid affecting near walls when creating big windows?
WindowWall2.FCStd
(181.04 KiB) Downloaded 13 times
FreeCAD_IUkfGb5fB5.png
FreeCAD_IUkfGb5fB5.png (77.38 KiB) Viewed 459 times
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Post Reply