FreeCAD BCF-Plugin development blog

Blog to the development of the BCF FreeCAD plugin.

Representing markup.bcf in UML

Today I mostly finished the UML class diagram in regard to representing the data of the markup.bcf file. One think I found kind of interesing while creating the diagram is that in the BCF-XML-Documentation There is no link between a topic and a comment, so no id of one is stored in the other. That didn't make sense at first because I thought that one markup could have multiple topics, which is not the case.

However one think what is not that obvious to me is the case with the BIMSnippet. On the documentation page it says that: "BimSnippet is an additional file containing information related to one or multiple topics.". This would imply that there would be more topics inside one markup.bcf file, because BimSnippet is, as I understand, also just a node inside markup.bcf.

Regarding the open question from the previous post: How to represent constraints defined in extensions.xsd; I thought about it a little today and came to the conclusion that it would be the best approach to go with the last option I listed. That means that for every node, for which constraints are listed in extensions.xsd, an empty enumeration/class is created which then, during runtime, gets populated with the valid values.

UPDATE (2019-05-13): The inconsistency is resolved. The BimSnippet node just references one file that does not have to be inside the topic folder.