Files
create/src/Base/PlacementPy.xml
Zheng, Lei 3fcbf71fb5 Base: misc patches
Convenience macros/function (in Interpreter.h)

* FC_PY_GetObject/Callable(), look for callables in a python object,
  which will be used in future patch to improve performance in various
  python observer/features.

* pyCall(WithKeywords)(), helper function to invoke the callable

Matrix4D:

* hasScale(), check if there is any scale in the transformation. If so,
  further check if the scale is uniform or not. This will be used in
  future patch for Part::TopoShape to decide which type of transform to
  apply.

Placement:

* translate/rotate(), new convenience API

Rotation:

* isSame/multiVec(), new convenience API

Polygon2d:

* Intersect(), GetCenter(), new convenience API.

FlagToggler:

* New class for exception safe flag toggling, similar to StateLocker
  but with template (actually, FlagToggler is added earlier by me).

BitsetLocker:

* New class for exception manipulation of a std::bitset variable.
2019-08-17 14:52:08 +02:00

117 lines
3.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PyObjectBase"
Name="PlacementPy"
Twin="Placement"
TwinPointer="Placement"
Include="Base/Placement.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>Placement
A placement defines an orientation (rotation) and a position (base) in 3D space.
It is used when no scaling or other distortion is needed.
The following constructors are supported:
Placement() -- empty constructor
Placement(Placement) -- copy constructor
Placement(Matrix) -- 4D matrix consisting of rotation and translation
Placement(Base, Rotation) -- define position and rotation
Placement(Base, Rotation,Center) -- define position and rotation with center
Placement(Base, Axis, Angle) -- define position and rotation
</UserDocu>
<DeveloperDocu>Placement</DeveloperDocu>
</Documentation>
<Methode Name="copy" Const="true">
<Documentation>
<UserDocu>
copy()
Returns a copy of this Placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="move">
<Documentation>
<UserDocu>
move(Vector)
Move the placement along the vector
</UserDocu>
</Documentation>
</Methode>
<Methode Name="translate">
<Documentation>
<UserDocu>
translate(Vector)
alias to move(), to be compatible with TopoShape.translate()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="rotate">
<Documentation>
<UserDocu>
rotate(center,axis,degree) - rotate the current placement around center and axis with degree
This method is compatible with TopoShape.rotate()
</UserDocu>
</Documentation>
</Methode>
<Methode Name="multiply" Const="true">
<Documentation>
<UserDocu>
multiply(Placement)
Multiply this placement with another placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="multVec" Const="true">
<Documentation>
<UserDocu>
multVector(Vector) -> Vector
Compute the transformed vector using the placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="toMatrix" Const="true">
<Documentation>
<UserDocu>
toMatrix()
convert the placement to a matrix representation
</UserDocu>
</Documentation>
</Methode>
<Methode Name="inverse" Const="true">
<Documentation>
<UserDocu>
inverse() -> Placement
compute the inverse placement
</UserDocu>
</Documentation>
</Methode>
<Methode Name="isIdentity" Const="true">
<Documentation>
<UserDocu>
isIdentity() -> Bool
returns True if the placement has no displacement and no rotation
</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Base" ReadOnly="false">
<Documentation>
<UserDocu>Vector to the Base Position of the Placement</UserDocu>
</Documentation>
<Parameter Name="Base" Type="Object" />
</Attribute>
<Attribute Name="Rotation" ReadOnly="false">
<Documentation>
<UserDocu>Orientation of the placement expressed as rotation</UserDocu>
</Documentation>
<Parameter Name="Rotation" Type="Object" />
</Attribute>
</PythonExport>
</GenerateModel>