Add information for 4DBrix (nControl) Compatibility

Syntax: <FourDBrix>
    <PartType>...</PartType>
    <PartName>...</PartName>
    <OrientationDifference>...</OrientationDifference>
    <ConnectionIndexUsedAsOrigin>...</ConnectionIndexUsedAsOrigin>
</FourDBrix>
Default Value: If there is no <FourDBrix> tag, the part is not compatible with 4DBrix nControl software.

The <OrientationDifference> is optional, if not present its default value is 0 (which mean the part as the same orientation in both software).
The <ConnectionIndexUsedAsOrigin> is optional, if not present its default value is 0.
Description: A set of information used by BlueBrick to convert 4DBrix parts to BlueBrick parts and vice and versa.

BlueBrick can save and load files in 4DBrix nControl format (NCP). Because the part numbers and other information are different between BlueBrick and nControl, BlueBrick needs to have information on how to convert the file when saving or loading a NCP format.

The PartType contains an enumeration value describing the type of part as known by nControl, and corresponding to the 4 top categories in the part library of nControl. This field can only have four values that must be written in all capital letters:

The PartName field contains the part id as known by nControl. It usually has two formats. If the type is a SEGMENT, then the part name is usually an all capital letters string such as, for example, "TS_ADAPTERCONTINUOUSCURVE". And for the other types of part, the part id is a path to a svg file, such as for example "/baseplates/space/3947.svg". To know the part id of a specific part that you can see in nControl, just create a simple NCP file in nControl with only this part on the map, and save the file. Then open this file with a text editor and look for a specific tag in the NCP file. Depending on the type of the part, look for:

The OrientationDifference field contains an angle value express in degree (it can be negative). It can happen that a specific part is not oriented the same way by default in BlueBrick and in nControl, so they won't look like they are turned the same way, even if they have the same angle set in both software. In this field you can add the angle difference between the two softwares. A typical example for this case, is the space baseplate 32x32 with a crater. The crater is in the top right corner in BlueBrick, and in the bottom right corner in nControl. There is a 90° of difference between the two softwares, which you can specify here.

The ConnectionIndexUsedAsOrigin field contains a 0-based local index that indicate which connection is used by a segment as its origin point. This field is then only usefull for part of type SEGMENT, you can ommit it for the other types of part. It correspond to the <segment><origin value="?"/></segment> tag in a NCP file. The index is local, which means it refer to the connection list inside the <segment>...</segment> tag, and not to the connection id in the <node>...</node> list.

However DO NOT USE THIS FIELD, because nControl is currently bugged and if you use an origin different than 0, it creates many edition problems in nControl, even though it seems to do what you expect. I suspect this "origin" feature to have been partially implemented in nControl and never tested with a value different from 0. This field is however present in the BlueBrick XML part file (and is not ignored by BlueBrick) just to be future proof, in case this bug in nControl will be fixed in the future. If you face a case where you would need to use that field, then consider rotating the BlueBrick GIF file to place it in the same orientation as in nControl, and reorder the BlueBrick connection list such as the first connection appearing in the BlueBrick part XML file, is the "origin" connection for nControl, so that the origin index can stay zero.