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
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
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
). @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
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
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 !