[ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

A forum dedicated to the Draft, Arch and BIM workbenches development.
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors Placement

Postby paullee » Wed Oct 14, 2020 6:58 pm

Thanks ! Good video ! Hope can implement something like this in future :D
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby paullee » Fri Nov 20, 2020 6:26 pm

Whilst I am cleaning up the code, I am trying to add this Automatic Placement Support to e.g.

Arch Equipment
Draft Array ...

The beds / toilets, Arch Equitment, are now told to 'attach to particular wall/sketch segment' at a ' x distance from the edge of wall/sketch segment'. So you have the semantic meaning for disposition of the Equipment which automatically follow the layout.

Would upload the revised ArchEquipment.py later :)

Test_ Link_ ArchWindow_ 04f.FCStd
(402.37 KiB) Downloaded 6 times
phpBB [video]
Screenshot from 2020-11-21 02-19-16.png
Screenshot from 2020-11-21 02-19-16.png (289.04 KiB) Viewed 367 times
Screenshot from 2020-11-21 02-19-28.png
Screenshot from 2020-11-21 02-19-28.png (298.51 KiB) Viewed 367 times
Screenshot from 2020-11-21 02-20-06.png
Screenshot from 2020-11-21 02-20-06.png (250.29 KiB) Viewed 367 times
Screenshot from 2020-11-21 02-20-12.png
Screenshot from 2020-11-21 02-20-12.png (251.76 KiB) Viewed 367 times
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby paullee » Sat Nov 21, 2020 6:31 pm

Below are updated

SketchArch WB / ArchSketchObject.py + ArchEquipment.py Updated
  1. ArchEquipment.py Updated
    ArchEquipment.py
    (17.31 KiB) Downloaded 5 times
  2. SketchArch WB Updated in https://github.com/paullee0/FreeCAD_SketchArch
  3. Or simply replace with below 1 file
    ArchSketchObject.py
    (49.29 KiB) Downloaded 4 times
Test_ Link_ ArchWindow_ 04f.FCStd
(406.13 KiB) Downloaded 5 times

Screenshot from 2020-11-22 02-27-53.png
Screenshot from 2020-11-22 02-27-53.png (293.01 KiB) Viewed 318 times
balrobs
Posts: 124
Joined: Fri Apr 24, 2020 8:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby balrobs » Tue Nov 24, 2020 7:46 am

Hi @paullee,
I find your approach very interesting :)
Time ago I experimented designing a parametric floor plan by using normal sketches ... but ran into a lot of problems :mrgreen:
- Different sketches had to be used for walls with different widths
- Sketches had to be linked to existing wall edges using external geometries
- Installed windows and doors were not adapted to the changed floor plan geometries
This approach was very vulnerable to the topological naming problem, especially if sketches were deleted or changed afterwards. (I was able to reduce this problem considerably by using @realthunder's LinkStage3-branch)
All these problems seems to be addressed by your solution so let me encourage you to keep going on.
BTW using your workbench I noticed a strange behavior .. maybe it's just me who owns something wrong.
After creating a wall from an ArchSketch I can flip a wall segment by using the command "EditWallAllign" just like I would expect it to work.
But afterwards, if I try to edit a width of a wall segment using the command "EditWallWidth" and selecting a specific wall segment, first the wall alignment flips and then several input dialogs are sequentially opened. I would only expect one dialog asking me to modify the respective wall segment width (maybe having the possibility to specify unit dimensions?) without flip action.
Aborting the command and re-executing it again makes it worse. Now even more dialogs will open.
Here is a link to a short video to better explain what I mean:
https://www.dropbox.com/s/8hsp2xsgiirpf ... h.gif?dl=0
Thank you very much for your efforts
@balrobs
My system infos:

Code: Select all

OS: Ubuntu 20.04.1 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: f9104f5884036864d238c4fcdc7d911c5d9bde0e
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: English/United States (en_US)
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby paullee » Tue Nov 24, 2020 3:51 pm

balrobs wrote:
Tue Nov 24, 2020 7:46 am
But afterwards, if I try to edit a width of a wall segment using the command "EditWallWidth" and selecting a specific wall segment, first the wall alignment flips and then several input dialogs are sequentially opened. I would only expect one dialog asking me to modify the respective wall segment width (maybe having the possibility to specify unit dimensions?) without flip action.
Thanks, and maybe I answer this first -

Code: Select all

PRESS [ESC] to Exit  
I am not trained as a programmer and am only a python beginner (reiterated :D) unfortunately, there are lot of things I do not know how to do. I can only make the command ends properly by pressing [ESC] and there is only a note in the Report View. Maybe before someone can help how to make the command end properly by closing the tasks panel, I should add a dialog box to tell how to end these two commands :lol:

So, in the meantime, remember to press [ESC] key to end - even myself forget to do so lots of time.

balrobs wrote:
Tue Nov 24, 2020 7:46 am
- Installed windows and doors were not adapted to the changed floor plan geometries
This approach was very vulnerable to the topological naming problem, especially if sketches were deleted or changed afterwards. (I was able to reduce this problem considerably by using @realthunder's LinkStage3-branch)
All these problems seems to be addressed by your solution so let me encourage you to keep going on.
Then, thanks for testing the experimental WB :D I have explained somewhere about the vision and current implementation and the development direction as an architect. However, the features being experimented had not been fully exposed in the ArchSketch in github for some reasons and limited time. The capabilities to have different Align and Width are 'partially' supported on ordinary Sketch currently (and ArchSketch is in fact currently treated only as ordinary Sketch atm).

Currently, when an edge is deleted in a Sketch / ArchSketch, it would still frustrate the order of Align and Width an user has assigned - 'kind of toponaming problem'. To avoid that problem, there are known to me about 3 approaches, and I implemented one in the WB.
  1. Realthunder's branch
  2. Sketch Semi-Persistent Tag - This is implemented with Abdullah's help but not exposed in the github yet
  3. Abdullah's Part Geometry Extension - so that the information e.g. Align / Width can be store in each edge - I tend to implement this to replace / supplement the 2nd approach
So expect the model to break currently :lol:

And there are other limitation currently. Whilst currently a complex Sketch help me to do e.g. the Villa Savoye layout easily, there will be problem if you want some segment of wall with different materials. And multiple-layer will be another issue. These 2 areas are real challenge for me to code it. And if you have any imagination about the good workflow, maybe you can post here.


Maybe you can also try the new feature to support placing Arch Window/ Door/ Equipment 'parametrically' and post your comments here ?


Thanks in advance !
Screenshot from 2020-11-24 23-57-34.png
Screenshot from 2020-11-24 23-57-34.png (225.5 KiB) Viewed 198 times
User avatar
yorik
Site Admin
Posts: 12064
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels, Belgium
Contact:

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby yorik » Wed Nov 25, 2020 11:11 am

Haven't looked at your code yet, but I'm a little wary about this, in Revit it works that way and more than often you get totally screwed by that mechanism and end up breaking the family to avoid being forced to attach an appliance to a wall, for example. So we should always consider this optional.
That said, it seems like a good idea indeed that on inserting an appliance, you'd be offered the possibility to "hook" it somehow on a wall...
balrobs
Posts: 124
Joined: Fri Apr 24, 2020 8:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby balrobs » Wed Nov 25, 2020 1:15 pm

paullee wrote:
Tue Nov 24, 2020 3:51 pm
...
Thank you @paullee for your very detailed post.
Indeed the ESC-command did the trick. Knowing this your WB works perfect to flip alignments or change wall width.
I'm no coder too, that's why I'm all the more impressed with what you've achieved so far.
I can live well with the current limitations (different materials and multiple layers). These could be implemented in the future when the WB has evolved to get more stable and intuitive.
BTW maybe a simple improvement could be to open the dialog with the actual wall segment width after the user clicked on a specifis wall segment.
I will going on experimenting the new feature to support placing Arch Window/ Door/ Equipment 'parametrically' and post my impressions here.
Thank you again for your effort!
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby paullee » Wed Nov 25, 2020 10:28 pm

balrobs wrote:
Wed Nov 25, 2020 1:15 pm
Indeed the ESC-command did the trick. Knowing this your WB works perfect to flip alignments or change wall width.
One more point about switching Align - there maybe some occasion after you click an edge / segment nothing seem happens, check the Report Window if something like 'Arch Wall has an invalid Shape'.

Don't panic :lol: - The code is not clever enough to catch that and revert automatically, now it usually needs to click the same edge 1 or 2 more to switch the Align back to a mode the Arch Wall produce a Valid Shape as a whole.

balrobs wrote:
Wed Nov 25, 2020 1:15 pm
BTW maybe a simple improvement could be to open the dialog with the actual wall segment width after the user clicked on a specifis wall segment.
I will going on experimenting the new feature to support placing Arch Window/ Door/ Equipment 'parametrically' and post my impressions here.
Thank you again for your effort!
Current width in the dialog box is a good suggestion :) See if I can do that. And look forward to any comments, it's always good to have view on expected workflow from architectural practitioners.
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby paullee » Wed Nov 25, 2020 10:47 pm

yorik wrote:
Wed Nov 25, 2020 11:11 am
Haven't looked at your code yet, but I'm a little wary about this, in Revit it works that way and more than often you get totally screwed by that mechanism and end up breaking the family to avoid being forced to attach an appliance to a wall, for example. So we should always consider this optional.
That said, it seems like a good idea indeed that on inserting an appliance, you'd be offered the possibility to "hook" it somehow on a wall...

Thanks for the comments :)

Indeed it should not be mandatory, it is optional, user can select if or not and which wall to 'hook' to.

BTW, I try to extend the feature to Array (so no need to repeat setting the 'attachment' for a series of objects). Copying similar codes in ArchWindow.py to ArchEquipment.py, simple and working. Trying to copy similar codes to array.py, seems not working. Array.py seems to be more complicated, not aware what attach(), linkSetup() etc. do ?

array.py
(25.19 KiB) Downloaded 1 time
paullee
Posts: 2769
Joined: Wed May 04, 2016 3:58 pm

Re: [ Comments Request ] Intuitive Automatic Windows/Doors + Equipment Placement

Postby paullee » Thu Nov 26, 2020 6:41 pm

balrobs wrote:
Wed Nov 25, 2020 1:15 pm
BTW maybe a simple improvement could be to open the dialog with the actual wall segment width after the user clicked on a specifis wall segment.
It seems turns out to be not that difficult :)

GuiEditWallWidth - Now has Previous Width of the selected edge / wall segment In Dialog Box...

  1. SketchArch WB Updated in https://github.com/paullee0/FreeCAD_SketchArch
  2. Or simply replace with below 1 file
    ArchSketchObject.py
    (49.61 KiB) Downloaded 8 times
Screenshot from 2020-11-27 02-21-37.png
Screenshot from 2020-11-27 02-21-37.png (268.38 KiB) Viewed 407 times
Screenshot from 2020-11-27 02-21-47.png
Screenshot from 2020-11-27 02-21-47.png (272.11 KiB) Viewed 407 times
Screenshot from 2020-11-27 02-21-57.png
Screenshot from 2020-11-27 02-21-57.png (274.64 KiB) Viewed 407 times