Add Face.OuterWire and mark Face.Wire as deprecated
This commit is contained in:
parent
3a0067d19a
commit
b0b2509457
|
@ -84,10 +84,17 @@
|
|||
</Attribute>
|
||||
<Attribute Name="Wire" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>The Wire of this face</UserDocu>
|
||||
<UserDocu>The outer wire of this face
|
||||
deprecated -- please use OuterWire</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Wire" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="OuterWire" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>The outer wire of this face</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="OuterWire" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="CenterOfMass" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
|
|
|
@ -548,7 +548,22 @@ Py::Tuple TopoShapeFacePy::getParameterRange(void) const
|
|||
return t;
|
||||
}
|
||||
|
||||
// deprecated
|
||||
Py::Object TopoShapeFacePy::getWire(void) const
|
||||
{
|
||||
try {
|
||||
Py::Object sys_out(PySys_GetObject(const_cast<char*>("stdout")));
|
||||
Py::Callable write(sys_out.getAttr("write"));
|
||||
Py::Tuple arg(1);
|
||||
arg.setItem(0, Py::String("Warning: Wire is deprecated, please use OuterWire\n"));
|
||||
write.apply(arg);
|
||||
}
|
||||
catch (const Py::Exception&) {
|
||||
}
|
||||
return getOuterWire();
|
||||
}
|
||||
|
||||
Py::Object TopoShapeFacePy::getOuterWire(void) const
|
||||
{
|
||||
const TopoDS_Shape& clSh = getTopoShapePtr()->_Shape;
|
||||
if (clSh.IsNull())
|
||||
|
|
Loading…
Reference in New Issue
Block a user