ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
alafr
Posts: 46
Joined: Sat Jan 18, 2020 8:40 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by alafr »

@paullee: I tested again the ArchSketch workbench, and here are my conclusions:
  • ✓ It's definitely a nice concept that will speed up wall modeling, when they are many different wall widths on the same floor.
  • ✓ The wall segments are now nicely joined together at the corners / intersections.
  • ✗ The commands "Edit Wall Segment Width" and "Edit Wall Segment Align" work with Sketch object but not with ArchSketch.
    The reason appears to be these lines:

    Code: Select all

    if Draft.getType(self.targetArchSketch) == 'Sketch':
    in ArchSketchObject.py, lines 225, 239, 322 and 341
    It works if i change them to:

    Code: Select all

    if Draft.getType(self.targetArchSketch) in ['ArchSketch', 'Sketch']:
  • ✗ The wall widths are not stable if I delete an edge in the Sketch.
    It appears the use of the persistent Tags and Part Geometry Extensions are not yet implemented (getSortedClustersEdgesWidth and getSortedClustersEdgesAlign both return None):

    Code: Select all

     def getSortedClustersEdgesWidth(self, fp):					
    										
          '''  This method check the SortedClusters-isSame-(flat)List		
               find the corresponding edgesWidth					
               and make a list of (WidthX, WidthX+1 ...) '''			
    										
          '''  Options of data to store width (& other) information conceived	
    										
               1st Option - Use self.widths: a Dict of { EdgeX : WidthX, ...}	
                            But when Sketch is edit with some edges deleted, the	
                            edges indexes change, the widths stored become wrong	
    										
               2nd Option - Use abdullah's edge geometry				
                            .... bugs found, not working				
    										
               3rd Option - Use self.EdgeTagDictSync				
                            .... convoluted object sync, restoreOnLoad '''		
          return None
    Realthunder's branch doesn't improve the topological stability in this case (there is no App::PropertyLinkSub where it could update the edge numbers).
  • ✗ If I close the sketch without the escape key, it asks twice for the width afterwards (there is already an open issue related to this problem on Github).
paullee
Veteran
Posts: 5135
Joined: Wed May 04, 2016 3:58 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by paullee »

Surprise to have someone look into this ! Bear with the 'codes' as I am not a programmer and just start reading some fundamental on-line tutorial about python :oops:

Currently, it should help individual Width and Align. Personally I find Draft Wire (no arc) pretty hard to edit and know the dimensions, but find Sketch comparatively easy to change and have dimensional constraints. It also by design group a bunch of edges. So I work with the latter at some point.

alafr wrote: Sun Apr 05, 2020 10:12 am
  • ✗ The commands "Edit Wall Segment Width" and "Edit Wall Segment Align" work with Sketch object but not with ArchSketch.
    ...
    It works if i change them to:

    Code: Select all

    if Draft.getType(self.targetArchSketch) in ['ArchSketch', 'Sketch']:
Yes you found it. I came across that earlier and correct locally, just did no update the github :lol:

alafr wrote: Sun Apr 05, 2020 10:12 am
  • ✗ The wall widths are not stable if I delete an edge in the Sketch.
    It appears the use of the persistent Tags and Part Geometry Extensions are not yet implemented (getSortedClustersEdgesWidth and getSortedClustersEdgesAlign both return None):

    Code: Select all

     def getSortedClustersEdgesWidth(self, fp):					
    										
          '''  This method check the SortedClusters-isSame-(flat)List		
               find the corresponding edgesWidth					
               and make a list of (WidthX, WidthX+1 ...) '''			
    										
          '''  Options of data to store width (& other) information conceived	
    										
               1st Option - Use self.widths: a Dict of { EdgeX : WidthX, ...}	
                            But when Sketch is edit with some edges deleted, the	
                            edges indexes change, the widths stored become wrong	
    										
               2nd Option - Use abdullah's edge geometry				
                            .... bugs found, not working				
    										
               3rd Option - Use self.EdgeTagDictSync				
                            .... convoluted object sync, restoreOnLoad '''		
          return None
    Realthunder's branch doesn't improve the topological stability in this case (there is no App::PropertyLinkSub where it could update the edge numbers).
For the wall widths be stable, indeed need either 3rd Option, i.e. 'Semi-Persistent Tag' (I implemented that locally), or 2nd Option potentially, Part Geometry Extension (@abdullah should have fixed 'the bug', just I find no gap to further test and switch the method :oops: ). @Realthunder's implementation (SketchExport) was something before I ever start reading some python tutorial and I am not sure if that help or need to wait until his 'toponaming solution' get merged, I think it had not been.

For 1st Option, it 'works' with common Sketch - but as you find, deleting an edge would frustrate the order. Instead of deleting an edge, turning an edge to Construction Mode will preserve the Width/ Align information order, or this (editing Width / Align) needs to be the 'last thing' to do. But this is, again, for 'demonstration of the concept purpose' only, I put a reminder somewhere (where is it ?). So it contradict the basic concept of this 'WB' - it should allow design development so one should be able to edit and change anything at any time unlike doing an as-built drawing. It doesn't make sense to work with all these 'extra steps / precautionary measures'.

You can look into the Villa Savoye or Carpenter Centre Models, I had used extensively ArchSketch. Just that whilst I fixed some bugs, I introduced some other bugs, and this needs a numbers of other cryptic 'precautionary measures' that make this non-productive for others atm.


I upload the 'WB' (if it qualify :) ) on one hand as an exercise working with github and on the other if someone would be interested to test the concept, and thanks !

alafr wrote: Sun Apr 05, 2020 10:12 am
  • ✗ If I close the sketch without the escape key, it asks twice for the width afterwards (there is already an open issue related to this problem on Github).
Yes again, this is my best python + FC knowledge :oops:

I look at a numbers of others codes cutting and pasting a looooong time into this.... I had not yet found the time to see how to code otherwise - the Issue in Github is another exercise I try to learn how to use Github, so beginner in Python + Github :D

For me, I am testing it in building the models (Villa Savoye, Carpenter Centre etc.) with a view to iron out the workflow best for concept sketching, design development, whilst on the other hand trying if I can learn better code to assist. I am pretty happy with the some improvement in the workflow as i modelled the Villa Savoye etc. But obviously there are a lot of areas to answer.

See if you have better idea and implement that for Arch / BIM WB !
paullee
Veteran
Posts: 5135
Joined: Wed May 04, 2016 3:58 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by paullee »

p.s.

I quick make a few ArchSketches representing a structural framework, they are 'attached' together by 'internal method' of ArchSketch with a few clicks.

And I imagine as commented in your thread the ArchStructure can build all members instead of just 1 - just like the way ArchWall is based on a Sketch.

Screenshot from 2020-04-05 23-13-12.png
Screenshot from 2020-04-05 23-13-12.png (185.83 KiB) Viewed 1315 times
Screenshot from 2020-04-05 23-13-16.png
Screenshot from 2020-04-05 23-13-16.png (163.78 KiB) Viewed 1315 times
Attachments
Test_ ArchSketch_ 27_ StructuralFrame_01.FCStd
(12.62 KiB) Downloaded 55 times
alafr
Posts: 46
Joined: Sat Jan 18, 2020 8:40 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by alafr »

I'm working on a command that will automatically create all the Arch Structures from a selection of edges (It's almost ready but there is a bug in my code with the placement of the ArchSketch__VerticalFrame_Link object).
arch_multiple_structures.png
arch_multiple_structures.png (71.48 KiB) Viewed 1301 times
paullee wrote: Sun Apr 05, 2020 3:27 pm p.s.

I quick make a few ArchSketches representing a structural framework, they are 'attached' together by 'internal method' of ArchSketch with a few clicks.

And I imagine as commented in your thread the ArchStructure can build all members instead of just 1 - just like the way ArchWall is based on a Sketch.
A 3-dimensional structural frame like that, will need the StartOffset and EndOffset options, otherwise it won't be possible to have nice connections between all the beams and columns. (this is from the Arch Structure thread):
alafr wrote: Sun Mar 22, 2020 6:34 pm - I'm thinking to add StartOffset and EndOffset options (allowing positive or negative values), these options would trim or extend the extrusion path by the specified distance. In the screencast I align the Structures by offsetting them, but in a case like that, it would be better to keep them centered on the extrusion path, and align them by extending the horizontal beam at both ends and trimming the vertical columns at their top.
Arch Structure objects have many properties, so it will be quite complex to implement all of them in ArchSketch. I think it's better (at least for the moment, until ArchSketch becomes stable enough) to keep them as distinct objects...
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by carlopav »

alafr wrote: Mon Apr 06, 2020 10:38 am I'm working on a command that will automatically create all the Arch Structures from a selection of edges (It's almost ready but there is a bug in my code with the placement of the ArchSketch__VerticalFrame_Link object).
Nice to see you improving the structure tool. May I suggest you, when you post a screenshot, to let us see also the document Tree? this really help understanding the 3d view better :)
follow my experiments on BIM modelling for architecture design
alafr
Posts: 46
Joined: Sat Jan 18, 2020 8:40 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by alafr »

carlopav wrote: Mon Apr 06, 2020 12:30 pm Nice to see you improving the structure tool. May I suggest you, when you post a screenshot, to let us see also the document Tree? this really help understanding the 3d view better :)
Here it is:
arch_multiple_structures_tree.png
arch_multiple_structures_tree.png (73.99 KiB) Viewed 1281 times
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by carlopav »

Well done! very nice to have it! (BTW) I was thinking about doing the same with walls when based on archSketches... (To produce multiple wall objects, every one of them related to a sketch segment).
This boost editability a lot I think!
follow my experiments on BIM modelling for architecture design
paullee
Veteran
Posts: 5135
Joined: Wed May 04, 2016 3:58 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by paullee »

alafr wrote: Mon Apr 06, 2020 10:38 am
A 3-dimensional structural frame like that, will need the StartOffset and EndOffset options, otherwise it won't be possible to have nice connections between all the beams and columns. (this is from the [url=https://forum.freecadweb.org/viewtopic. ... 8&start=30]Arch Structure
Yes, ArchPipe has something similar :)
paullee
Veteran
Posts: 5135
Joined: Wed May 04, 2016 3:58 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by paullee »

carlopav wrote: Mon Apr 06, 2020 12:56 pm Well done! very nice to have it! (BTW) I was thinking about doing the same with walls when based on archSketches... (To produce multiple wall objects, every one of them related to a sketch segment).
This boost editability a lot I think!
This is contrary to what i try to do :)

Just want to ask what is your idea ?

Thanks.
paullee
Veteran
Posts: 5135
Joined: Wed May 04, 2016 3:58 pm

Re: ArchSketch + ArchWall ( Multiple Width / Individual Align ) = Building Layout Object

Post by paullee »

alafr wrote: Sun Apr 05, 2020 10:12 am
  • ✗ The commands "Edit Wall Segment Width" and "Edit Wall Segment Align" work with Sketch object but not with ArchSketch.
    The reason appears to be these lines:

    Code: Select all

    if Draft.getType(self.targetArchSketch) == 'Sketch':
    in ArchSketchObject.py, lines 225, 239, 322 and 341
    It works if i change them to:

    Code: Select all

    if Draft.getType(self.targetArchSketch) in ['ArchSketch', 'Sketch']:
Previously if a Wall is based on ArchSketch, it doesn't work even with above correction though there will no no error. I just add some codes to make it fallback to treat an ArchSketch as an ordinary Sketch before corresponding methods get cleaned up and fixed.
Post Reply