OK it begins to make sense. So, how do objects reference elements now: by the (old) index names or the (new) mapped names ? For example, when I attach an LCS to elements of a sketch, I can see that the references that are displayed are the (old) index names. Is that only for display ?realthunder wrote: ↑Sun Jul 04, 2021 11:04 pm The new topo names are stored as a string table inside each shape (Part::TopoShape) that maps the encoded name to index. Internally, we still need the index name to access OCC sub-shapes.
When I attach an LCS to a corner of a sketch, I see the following in the Document.xml file (inside the FCStd) :
Code: Select all
<Property name="Support" type="App::PropertyLinkSubList">
<LinkSubList count="3">
<Link obj="Sketch_Part_1" sub="Vertex1" shadow=";g1v1;SKT.Vertex1"/>
<Link obj="Sketch_Part_1" sub="Edge1" shadow=";g1;SKT.Edge1"/>
<Link obj="Sketch_Part_1" sub="Edge5" shadow=";g4;SKT.Edge5"/>
</LinkSubList>
</Property>
Code: Select all
<Property name="Support" type="App::PropertyLinkSubList">
<LinkSubList count="3">
<Link obj="Sketch_Part_1" sub="Vertex3" shadow=";g1v1;SKT.Vertex3"/>
<Link obj="Sketch_Part_1" sub="Edge3" shadow=";g1;SKT.Edge3"/>
<Link obj="Sketch_Part_1" sub="Edge2" shadow=";g4;SKT.Edge2"/>
</LinkSubList>
</Property>
Now, this also changes the data structure of FreeCAD files, therefore I think we should also be careful about what is displayed and saved. May I challenge the "for compatibility reasons" ? Displaying a secondary info (the varying index name) instead of the really important info (the stable mapped name) might seem like a good idea at first glance, but it might bite us in the future.
EDIT: when I open the same file with main FreeCAD, I read the following in Document.xml:
Code: Select all
<Property name="Support" type="App::PropertyLinkSubList">
<LinkSubList count="3">
<Link obj="Sketch_Part_1" sub="Vertex3"/>
<Link obj="Sketch_Part_1" sub="Edge3"/>
<Link obj="Sketch_Part_1" sub="Edge2"/>
</LinkSubList>
</Property>