Add First/LastParameter attributes to TopoEdge
This commit is contained in:
parent
efcd60ce0f
commit
bbafe9cb00
|
@ -88,11 +88,23 @@
|
|||
</Attribute>
|
||||
<Attribute Name="ParameterRange" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns a 4 tuple with the parameter range</UserDocu>
|
||||
<UserDocu>Returns a 2 tuple with the parameter range</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="ParameterRange" Type="Tuple"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Curve" ReadOnly="true">
|
||||
<Attribute Name="FirstParameter" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the start value of the parameter range</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="FirstParameter" Type="Float"/>
|
||||
</Attribute>
|
||||
<Attribute Name="LastParameter" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the end value of the parameter range</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="LastParameter" Type="Float"/>
|
||||
</Attribute>
|
||||
<Attribute Name="Curve" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the 3D curve of the edge</UserDocu>
|
||||
</Documentation>
|
||||
|
|
|
@ -660,6 +660,22 @@ Py::Tuple TopoShapeEdgePy::getParameterRange(void) const
|
|||
return t;
|
||||
}
|
||||
|
||||
Py::Float TopoShapeEdgePy::getFirstParameter(void) const
|
||||
{
|
||||
const TopoDS_Edge& e = TopoDS::Edge(getTopoShapePtr()->_Shape);
|
||||
BRepAdaptor_Curve adapt(e);
|
||||
double t = adapt.FirstParameter();
|
||||
return Py::Float(t);
|
||||
}
|
||||
|
||||
Py::Float TopoShapeEdgePy::getLastParameter(void) const
|
||||
{
|
||||
const TopoDS_Edge& e = TopoDS::Edge(getTopoShapePtr()->_Shape);
|
||||
BRepAdaptor_Curve adapt(e);
|
||||
double t = adapt.LastParameter();
|
||||
return Py::Float(t);
|
||||
}
|
||||
|
||||
Py::Object TopoShapeEdgePy::getCenterOfMass(void) const
|
||||
{
|
||||
GProp_GProps props;
|
||||
|
|
Loading…
Reference in New Issue
Block a user