Don't worry, firstly they are good questions and secondly many questions improve the code quality and the own understanding. The following information concerns only Realthunder's FreeCAD version. When I delete the lines of code quoted above, I get the following error message when creating polygon shaped dual mesh elements:paullee wrote: ↑Tue May 31, 2022 5:18 pmThese lines looks interesting, any pointer to explain how does it works in Realthunder's branch. I learned from abdullah there is a Tag in Part.geometry e.g. the geometry in Sketcher, which is 'semi-persistent', curious any relevance here? Thanks again ! Too many questionsCode: Select all
solid.Tag = i # Topological naming approach by realthunder solid.Hasher = App.StringHasher() # Topological naming approach by realthunder solid.Hasher.Threshold=10 # Topological naming approach by realthunder
Code: Select all
16:06:39 <ComplexGeoData> GenerativeDesign.py(153)|ComplexGeoData.cpp(1628): unresolved duplicate element mapping 'Vertex1;:G(Vertex2;K-1);FFC Vertex1165/Vertex1153
He said
The big question now is how to insert the addressed op code to avoid these warnings and accurately name algorithmically generated shapes? I found the answer to this question in Realthunder's excellent asm3-wiki https://github.com/realthunder/asm3-wik ... -Naming.md, where he describes how to correctly name topological shapes according to his approach in order to avoid such errors. The 3 lines of code quoted above can be found in the StringHasher section of the wiki. These lines make the warning message disappear and seem to ensure correct topological naming. I must confess that I have not yet researched further how tag and hasher are used to generate unique names. Do you know anything about this?This 'non fatal' error is due to failure in auto resolving topo name duplicates. The threshold is added because It is potentially expensive to auto resolve as each geometry element produced by each operation needs to have a name whenever possible. The intention is to remind the programmer to insert op code when making shapes to help disambiguation. The log message shows the error is triggered in features.py:1573, but I can't seem to find any code relevant there. Which branch are you using?
By the way, this forum is a great place to keep such links in mind. I had to google a bit again to refind this answer.