Base: add Python number protocol support to Placement/Rotation

This commit is contained in:
Zheng, Lei
2019-09-03 17:38:15 +08:00
committed by wmayer
parent d6ad2f09c0
commit ff3ec0c7fd
6 changed files with 408 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
@@ -118,5 +119,11 @@ Placement(Base, Axis, Angle) -- define position and rotation
</Documentation>
<Parameter Name="Matrix" Type="Object" />
</Attribute>
<ClassDeclarations>public:
PlacementPy(const Placement &amp; pla, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Placement(pla),T){}
Placement value() const
{ return *(getPlacementPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>