XML Format
<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="fasteners">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="rootProduct" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="partMapping" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="transform" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="units" minOccurs="1" maxOccurs="1"/>
<xsd:element ref="pointFastenerGroup" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element ref="lineFastenerGroup" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="rootProduct">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="partMapping">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="part" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="part">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="optional"/>
<xsd:attribute name="occurrencePath" type="xsd:string" use="optional"/>
<xsd:attribute name="featurePublication" type="xsd:string" use="optional"/>
<xsd:attribute name="meshPart" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="transform">
<xsd:complexType>
<xsd:attribute name="origin" type="xsd:string" use="required"/>
<xsd:attribute name="axis1" type="xsd:string" use="required"/>
<xsd:attribute name="axis2" type="xsd:string" use="required"/>
<xsd:attribute name="axis3" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="lengthUnits">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="mm"/>
<xsd:enumeration value="m"/>
<xsd:enumeration value="cm"/>
<xsd:enumeration value="km"/>
<xsd:enumeration value="in"/>
<xsd:enumeration value="ft"/>
<xsd:enumeration value="micron"/>
<xsd:enumeration value="yard"/>
<xsd:enumeration value="mile"/>
<xsd:enumeration value="nm"/>
<xsd:enumeration value="hm"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="units">
<xsd:complexType>
<xsd:attribute name="length" type="lengthUnits" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="couplingType">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="Distributing"/>
<xsd:enumeration value="Kinematic"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="structure">
<xsd:restriction base="xsd:token">
<xsd:enumeration value="Rigid"/>
<xsd:enumeration value="Coupling"/>
<xsd:enumeration value="Solid hex"/>
<xsd:enumeration value="Beam"/>
<xsd:enumeration value="Shell"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:element name="pointFastenerGroup">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="part" minOccurs="1" maxOccurs="10"/>
<xsd:element ref="material" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="point" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element ref="pointFastenerConstruct" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="diameter" type="xsd:double" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="lineFastenerGroup">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="part" minOccurs="1" maxOccurs="10"/>
<xsd:element ref="material" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="line" minOccurs="1" maxOccurs="unbounded"/>
<xsd:element ref="lineFastenerConstruct" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="width" type="xsd:double" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="point">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="location" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="material">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="line">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="pathType" type="xsd:string" use="required"/>
<xsd:attribute name="linePath" type="xsd:string" use="optional"/>
<xsd:sequence>
<xsd:element ref="point" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="constructs">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="pointFastenerConstruct" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element ref="lineFastenerConstruct" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="pointFastenerConstruct">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="structure" type="xsd:string" use="required"/>
<xsd:attribute name="couplingType" type="xsd:string" use="required"/>
<xsd:attribute name="maximumProjectionDistance" type="xsd:double" use="optional"/>
<xsd:attribute name="maximumAngle" type="xsd:double" use="optional"/>
<xsd:attribute name="maximumAngleBetweenAdjacentFaces" type="xsd:double" use="optional"/>
<xsd:attribute name="adjustTolerance" type="xsd:double" use="optional"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="lineFastenerConstruct">
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="required"/>
<xsd:attribute name="structure" type="xsd:string" use="required"/>
<xsd:attribute name="couplingType" type="xsd:string" use="required"/>
<xsd:attribute name="maximumProjectionDistance" type="xsd:string" use="optional"/>
<xsd:attribute name="maximumAngle" type="xsd:string" use="optional"/>
<xsd:attribute name="height" type="xsd:string" use="optional"/>
<xsd:attribute name="spacing" type="xsd:string" use="required"/>
<xsd:attribute name="numberOfElementsAlongWidth" type="xsd:double" use="optional"/>
<xsd:attribute name="numberOfLayers" type="xsd:double" use="optional"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Sample FileA sample XML file is shown below. Elements (tags) and attributes in italics are optional. <fasteners xmlns="sma:fastener"> <rootProduct name="Skateboard"/> <!-- This is the optional product specification. All objects created will be aggregated under this product, and all coordinates are assumed to be with respect to this product--> <partMapping> <!-- This section allows mapping of part occurrence paths to optional IDs that can be used in the weld definitions instead of specifying the occurrence paths every time--> <part id="1" occurrencePath=""/> <part id="2" occurrencePath="Wheel-axle.1!axle"/> <part id="3" occurrencePath="Wheel-axle.1!wheel.1"/> <part id="4" occurrencePath="Wheel-axle.1!wheel.2"/> <part id="5" occurrencePath="Wheel-axle.2!axle"/> <part id="6" occurrencePath="Wheel-axle.2!wheel.1"/> <part id="7" occurrencePath="Wheel-axle.2!wheel.2"/> </partMapping> <transform origin="3.0, 0.0, 0.0" axis1="0.0, 1.0, 0.0" axis2="-1.0, 0.0, 0.0" axis3="0.0, 0.0, 1.0"/> <!-- Optional transform data applied to all coordinates--> <units length="mm"/> <!-- Required, but we can possibly have a default--> <pointFastenerGroup id="1234" diameter="0.1"> <part id="5" featurePublication="FastenerSupport"/> <!-- Refers to mapped ID from the part mapping entries--> <part occurrencePath="Wheel-axle.2!wheel.1"/> <!-- Uses occurrence path directly--> <material id="Steel"/> <point id="101" location="1.0, 2.0, 3.0" orientation="1.0, 1.0, 1.0"/> <!-- orientation is a vector --> <point id="102" location="2.0, 3.0, 4.0"/> <pointFastenerConstruct id="PFC1"/> </pointFastenerGroup> <pointFastenerGroup id="1235" diameter="0.2"> <part id="2"/> <part id="3"/> <part id="4"/> <point id="101" location="1.0, 2.0, 3.0" orientation="2.0, 1.0, 2.0"/> <point id="102" location="2.0, 3.0, 4.0"/> <!-- No point fastener construct defined : the UI defined point fastener template will be used --> </pointFastenerGroup> <lineFastenerGroup id="1236" width="0.2"> <part id="1" meshPart="Board"/> <!-- Refers to mesh part in product --> <part id="2"/> <material id="Material_1236"/> <line id="1" pathType="label" linePath="Skateboard!Line.1"/> <lineFastenerConstruct id="LFC1"/> </lineFastenerGroup> <lineFastenerGroup id="1237" width="0.2"> <part id="1" meshPart="Board"/> <part id="5"/> <material id="Material_1236"/> <line id="2" pathType="Points"> <point id="103" location="5.0, 6.0, 7.0"/> <point id="104" location="6.0, 6.0, 7.0"/> <point id="105" location="7.0, 6.0, 7.0"/> <point id="106" location="8.0, 6.0, 7.0"/> <point id="107" location="9.0, 6.0, 7.0"/> </line> <!-- No point fastener construct defined : the UI defined line fastener template will be used --> </lineFastenerGroup> <constructs> <pointFastenerConstruct id="PFC1" structure="Rigid" couplingType="Kinematic"/> <lineFastenerConstruct id="LFC1" structure="Solid hex" couplingType="Kinematic" spacing="0.005"/> </constructs> </fasteners> | |||||||||