-
Notifications
You must be signed in to change notification settings - Fork 4
DesignFML
A floor plan design is described in FML as a combination of <design>, <asset>, <object>, <area> and <line> tags. The structure of these tags is shown below. See the ProjectFML page for more information on how to describe a complete project in FML.
<design>
...
<assets type="array">
<asset id="string">
...
</asset>
</assets>
<objects type="array">
<object>
<asset refid="string"/>
...
</object>
</objects>
<areas type="array">
<area>
<area refid="string"/>
...
</area>
</areas>
<lines type="array">
<line>
<asset refid="string"/>
...
</line>
</lines>
</design>A design always start with a <design> tag. Depending on if you are importing or exporting a design, the number of child tags can vary. Please note that all the measurements are in meters.
<design>
<name>string</name>
</design><design>
<id>int</id>
<name>string</name>
<design-type>string</design-type> options: save, save_as, save_and_mail
<thumb-url>string</thumb-url>
<created-at>date</created_at>
<updated-at>date</updated-at>
<project-id>int</project-id> only present when exporting a stand alone design
<floor-id>int</floor-id> only present when exporting a stand alone design
</design>The <assets type="array"> tag contains a list of all the assets used in the design. There are three kinds of assets: objects (like furniture elements), textures (patterns used for area’s) and lines (like hedges, fences etc). The <assets type="array"> tag doesn’t have to be present when importing a plan, but it won’t do any damage.
<asset id="string"> for example id="e123"
<name>string</name>
<url2d>string</url2d>
<url3d>string</url3d>
<layer>int</layer>
<filter-value>string</filter-value> [optional]
</asset><asset id="string"> for example id="t123"
<name>string</name>
<color>string</color> for example #ffffff
<url2d>string</url2d>
</asset><asset id="string"> for example id="l123"
<type>string</type>
<color>string</color> for example #ffffff
<url2d>string</url2d>
<thickness>float</thickness>
</asset>Furniture elements are described as <object> tags. It has the following child tags:
<object> <asset refid="string"/> for example: refid="e123" <type>string</type> options: furniture, text, opening <color>string</color> for example: #ffffff [optional] <points>float float float</points> x y z coordinates of the object <size>float float float</size> <rotation>float float float</rotation> [optional] <mirrored>bool bool bool</mirrored> [optional] <locked>bool</locked> </object>
The <points>, <size>, <rotation> and <mirrored> tags all have three values. These are the x y z values of each specific tag, space separated.
You can find all the Floorplanner objects with refid’s on this objects overview page
Text labels are objects but with a different structure.
<object>
<text>string</text>
<font-family>string</font-family>
<font-size>int</font-size>
<font-color>string</font-color> for example: #ff0000
<font-bold>bool</font-bold> [optional]
<font-italic>bool</font-italic> [optional]
<font-underline>bool</font-underline> [optional]
<font-outline>bool</font-outline> [optional]
<background-color>string</background-color> for example: #ff0000
<background-alpha>int</background-alpha>
</object>To be continued
Lines like dimension lines, hedges and fences are described as <line> tags. It has the following child tags:
<line> <asset refid="string"/> for example: refid="l123" [optional] <type>string</type> <points>float float float float float float float float float</points> [last 3 points are optional] <color>number</color> for example: #ffffff [optional] <thickness>float</thickness> [optional] <height>float</height> [optional] <custom-text>string</custom-text> [optional] </line>
The <points> tag contains 6 or 9 values. The first 3 represent the start x y z coordinates of a line, the second 3 represent the end x y z coordinates of a line and the last 3 represent the curve x y z coordinates of a line.
You can find all the Floorplanner lines with refid’s and types on this lines overview page
Areas like rooms and other surfaces are described as <area> tags. It has the following child tags:
<line> <asset refid="string"/> for example: refid="t123" [optional] <type>string</type> options: generated_area, custom_area <points>float float float float float float float float float, float float float float float float float float float, ...</points> [last 3 points of each line segment are optional] <color>number</color> for example: #ffffff <rotation>float float float</rotation> [optional] </line>
The points of an area are described as a combination of line segments. These line segments are comma separated. See the <points> tag of a <line> tag for more information about the structure of the coordinates.
You can find all the Floorplanner textures an area can have with refid’s on this texture overview page