class Detail(MxMyMixin, XmlObjectAdaptator): # <detail id="118" version="2" forbidFlipping="false" width="1" united="false" mx="0" # name="Devant" inLayout="true" seamAllowance="true" my="0"> __attributes__ = ( IntAttribute('id'), IntAttribute('version'), BoolAttribute('forbidFlipping'), IntAttribute('width'), BoolAttribute('united'), StringAttribute('name'), BoolAttribute('inLayout'), BoolAttribute('seamAllowance'), ) ############################################## def __init__(self, modeling, *args, **kwargs): XmlObjectAdaptator.__init__(self, *args, **kwargs) self._modeling = modeling self._nodes = [] ############################################## def append_node(self, node): self._nodes.append(node) ############################################## def iter_on_nodes(self): for node in self._nodes: yield node, self._modeling[node.object_id]
class ModelingItemMixin: __attributes__ = ( IntAttribute('id'), IntAttribute('object_id', 'idObject'), StringAttribute('type'), BoolAttribute('in_use', 'inUse'), )
class DetailNode(XmlObjectAdaptator): # <node idObject="108" type="NodePoint"/> # <node idObject="120" reverse="1" type="NodeSpline"/> __attributes__ = ( IntAttribute('object_id', 'idObject'), StringAttribute('type'), BoolAttribute('reverse'), )
class VisibleRotationMixin: __attributes__ = ( BoolAttribute('visible'), IntAttribute('rotation'), )