Part: remove trailing whitespace
This commit is contained in:
@@ -124,14 +124,14 @@ PartExport void getPyShapes(PyObject *obj, std::vector<TopoShape> &shapes) {
|
||||
return;
|
||||
if(PyObject_TypeCheck(obj,&Part::TopoShapePy::Type))
|
||||
shapes.push_back(*static_cast<TopoShapePy*>(obj)->getTopoShapePtr());
|
||||
else if (PyObject_TypeCheck(obj, &GeometryPy::Type))
|
||||
else if (PyObject_TypeCheck(obj, &GeometryPy::Type))
|
||||
shapes.emplace_back(static_cast<GeometryPy*>(obj)->getGeometryPtr()->toShape());
|
||||
else if(PySequence_Check(obj)) {
|
||||
Py::Sequence list(obj);
|
||||
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
|
||||
if (PyObject_TypeCheck((*it).ptr(), &(Part::TopoShapePy::Type)))
|
||||
shapes.push_back(*static_cast<TopoShapePy*>((*it).ptr())->getTopoShapePtr());
|
||||
else if (PyObject_TypeCheck((*it).ptr(), &GeometryPy::Type))
|
||||
else if (PyObject_TypeCheck((*it).ptr(), &GeometryPy::Type))
|
||||
shapes.emplace_back(static_cast<GeometryPy*>(
|
||||
(*it).ptr())->getGeometryPtr()->toShape());
|
||||
else
|
||||
@@ -622,7 +622,7 @@ public:
|
||||
" transformation matrix\n"
|
||||
"* retType: 0: return TopoShape,\n"
|
||||
" 1: return (shape,subObj,mat), where subObj is the object referenced in 'subname',\n"
|
||||
" and 'mat' is the accumulated transformation matrix of that sub-object.\n"
|
||||
" and 'mat' is the accumulated transformation matrix of that sub-object.\n"
|
||||
" 2: same as 1, but make sure 'subObj' is resolved if it is a link.\n"
|
||||
"* refine: refine the returned shape"
|
||||
);
|
||||
@@ -885,7 +885,7 @@ private:
|
||||
{
|
||||
PyObject *shape;
|
||||
Py::List list;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "O", &shape))
|
||||
if (!PyArg_ParseTuple(args.ptr(), "O", &shape))
|
||||
throw Py::Exception();
|
||||
auto theShape = static_cast<Part::TopoShapePy*>(shape)->getTopoShapePtr()->getShape();
|
||||
for (TopExp_Explorer ex(theShape, TopAbs_FACE); ex.More(); ex.Next()) {
|
||||
@@ -2063,7 +2063,7 @@ private:
|
||||
try {
|
||||
if (useFontSpec) {
|
||||
#ifdef FC_OS_WIN32
|
||||
// Windows doesn't do Utf8 by default and FreeType doesn't do wchar.
|
||||
// Windows doesn't do Utf8 by default and FreeType doesn't do wchar.
|
||||
// this is a hacky work around.
|
||||
// copy fontspec to Ascii temp name
|
||||
std::string tempFile = Base::FileInfo::getTempFileName(); //utf8/ascii
|
||||
@@ -2314,15 +2314,15 @@ private:
|
||||
PyObject *noElementMap = Py_False;
|
||||
PyObject *refine = Py_False;
|
||||
short retType = 0;
|
||||
static char* kwd_list[] = {"obj", "subname", "mat",
|
||||
static char* kwd_list[] = {"obj", "subname", "mat",
|
||||
"needSubElement","transform","retType","noElementMap","refine",nullptr};
|
||||
if (!PyArg_ParseTupleAndKeywords(args.ptr(), kwds.ptr(), "O!|sO!O!O!hO!O!", kwd_list,
|
||||
&App::DocumentObjectPy::Type, &pObj, &subname, &Base::MatrixPy::Type, &pyMat,
|
||||
&App::DocumentObjectPy::Type, &pObj, &subname, &Base::MatrixPy::Type, &pyMat,
|
||||
&PyBool_Type,&needSubElement,&PyBool_Type,&transform,&retType,
|
||||
&PyBool_Type,&noElementMap,&PyBool_Type,&refine))
|
||||
throw Py::Exception();
|
||||
|
||||
App::DocumentObject *obj =
|
||||
App::DocumentObject *obj =
|
||||
static_cast<App::DocumentObjectPy*>(pObj)->getDocumentObjectPtr();
|
||||
App::DocumentObject *subObj = nullptr;
|
||||
Base::Matrix4D mat;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConicPy"
|
||||
Name="ArcOfCirclePy"
|
||||
Name="ArcOfCirclePy"
|
||||
PythonName="Part.ArcOfCircle"
|
||||
Twin="GeomArcOfCircle"
|
||||
TwinPointer="GeomArcOfCircle"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomArcOfCircle"
|
||||
TwinPointer="GeomArcOfCircle"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/ArcOfConicPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -55,10 +55,10 @@ std::string ArcOfCirclePy::representation() const
|
||||
|
||||
std::stringstream str;
|
||||
str << "ArcOfCircle (";
|
||||
str << "Radius : " << fRad << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << "Radius : " << fRad << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << ")";
|
||||
|
||||
return str.str();
|
||||
@@ -66,7 +66,7 @@ std::string ArcOfCirclePy::representation() const
|
||||
|
||||
PyObject *ArcOfCirclePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ArcOfCirclePy and the Twin object
|
||||
// create a new instance of ArcOfCirclePy and the Twin object
|
||||
return new ArcOfCirclePy(new GeomArcOfCircle);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ int ArcOfCirclePy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
|
||||
Py::Float ArcOfCirclePy::getRadius() const
|
||||
{
|
||||
return Py::Float(getGeomArcOfCirclePtr()->getRadius());
|
||||
return Py::Float(getGeomArcOfCirclePtr()->getRadius());
|
||||
}
|
||||
|
||||
void ArcOfCirclePy::setRadius(Py::Float arg)
|
||||
@@ -151,5 +151,5 @@ PyObject *ArcOfCirclePy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfCirclePy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -238,5 +238,5 @@ PyObject *ArcOfConicPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfConicPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConicPy"
|
||||
Name="ArcOfEllipsePy"
|
||||
Name="ArcOfEllipsePy"
|
||||
PythonName="Part.ArcOfEllipse"
|
||||
Twin="GeomArcOfEllipse"
|
||||
TwinPointer="GeomArcOfEllipse"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomArcOfEllipse"
|
||||
TwinPointer="GeomArcOfEllipse"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/ArcOfConicPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
@@ -20,7 +20,7 @@
|
||||
<UserDocu>The major radius of the ellipse.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="MajorRadius" Type="Float"/>
|
||||
</Attribute>
|
||||
</Attribute>
|
||||
<Attribute Name="MinorRadius" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>The minor radius of the ellipse.</UserDocu>
|
||||
|
||||
@@ -51,23 +51,23 @@ std::string ArcOfEllipsePy::representation() const
|
||||
Standard_Real fMinRad = ellipse->MinorRadius();
|
||||
Standard_Real u1 = trim->FirstParameter();
|
||||
Standard_Real u2 = trim->LastParameter();
|
||||
|
||||
|
||||
gp_Dir normal = ellipse->Axis().Direction();
|
||||
gp_Dir xdir = ellipse->XAxis().Direction();
|
||||
|
||||
|
||||
gp_Ax2 xdirref(loc, normal); // this is a reference XY for the ellipse
|
||||
|
||||
|
||||
Standard_Real fAngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal);
|
||||
|
||||
|
||||
|
||||
std::stringstream str;
|
||||
str << "ArcOfEllipse (";
|
||||
str << "MajorRadius : " << fMajRad << ", ";
|
||||
str << "MajorRadius : " << fMajRad << ", ";
|
||||
str << "MinorRadius : " << fMinRad << ", ";
|
||||
str << "AngleXU : " << fAngleXU << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << ")";
|
||||
|
||||
return str.str();
|
||||
@@ -75,7 +75,7 @@ std::string ArcOfEllipsePy::representation() const
|
||||
|
||||
PyObject *ArcOfEllipsePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ArcOfEllipsePy and the Twin object
|
||||
// create a new instance of ArcOfEllipsePy and the Twin object
|
||||
return new ArcOfEllipsePy(new GeomArcOfEllipse);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ int ArcOfEllipsePy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All checks failed
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"ArcOfEllipse constructor expects an ellipse curve and a parameter range");
|
||||
@@ -116,7 +116,7 @@ int ArcOfEllipsePy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
|
||||
Py::Float ArcOfEllipsePy::getMajorRadius() const
|
||||
{
|
||||
return Py::Float(getGeomArcOfEllipsePtr()->getMajorRadius());
|
||||
return Py::Float(getGeomArcOfEllipsePtr()->getMajorRadius());
|
||||
}
|
||||
|
||||
void ArcOfEllipsePy::setMajorRadius(Py::Float arg)
|
||||
@@ -126,7 +126,7 @@ void ArcOfEllipsePy::setMajorRadius(Py::Float arg)
|
||||
|
||||
Py::Float ArcOfEllipsePy::getMinorRadius() const
|
||||
{
|
||||
return Py::Float(getGeomArcOfEllipsePtr()->getMinorRadius());
|
||||
return Py::Float(getGeomArcOfEllipsePtr()->getMinorRadius());
|
||||
}
|
||||
|
||||
void ArcOfEllipsePy::setMinorRadius(Py::Float arg)
|
||||
@@ -149,5 +149,5 @@ PyObject *ArcOfEllipsePy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfEllipsePy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConicPy"
|
||||
Name="ArcOfHyperbolaPy"
|
||||
Name="ArcOfHyperbolaPy"
|
||||
PythonName="Part.ArcOfHyperbola"
|
||||
Twin="GeomArcOfHyperbola"
|
||||
TwinPointer="GeomArcOfHyperbola"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomArcOfHyperbola"
|
||||
TwinPointer="GeomArcOfHyperbola"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/ArcOfConicPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
@@ -20,7 +20,7 @@
|
||||
<UserDocu>The major radius of the hyperbola.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="MajorRadius" Type="Float"/>
|
||||
</Attribute>
|
||||
</Attribute>
|
||||
<Attribute Name="MinorRadius" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>The minor radius of the hyperbola.</UserDocu>
|
||||
|
||||
@@ -51,23 +51,23 @@ std::string ArcOfHyperbolaPy::representation() const
|
||||
Standard_Real fMinRad = hyperbola->MinorRadius();
|
||||
Standard_Real u1 = trim->FirstParameter();
|
||||
Standard_Real u2 = trim->LastParameter();
|
||||
|
||||
|
||||
gp_Dir normal = hyperbola->Axis().Direction();
|
||||
gp_Dir xdir = hyperbola->XAxis().Direction();
|
||||
|
||||
|
||||
gp_Ax2 xdirref(loc, normal); // this is a reference XY for the hyperbola
|
||||
|
||||
|
||||
Standard_Real fAngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal);
|
||||
|
||||
|
||||
|
||||
std::stringstream str;
|
||||
str << "ArcOfHyperbola (";
|
||||
str << "MajorRadius : " << fMajRad << ", ";
|
||||
str << "MajorRadius : " << fMajRad << ", ";
|
||||
str << "MinorRadius : " << fMinRad << ", ";
|
||||
str << "AngleXU : " << fAngleXU << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << ")";
|
||||
|
||||
return str.str();
|
||||
@@ -75,7 +75,7 @@ std::string ArcOfHyperbolaPy::representation() const
|
||||
|
||||
PyObject *ArcOfHyperbolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ArcOfHyperbolaPy and the Twin object
|
||||
// create a new instance of ArcOfHyperbolaPy and the Twin object
|
||||
return new ArcOfHyperbolaPy(new GeomArcOfHyperbola);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ int ArcOfHyperbolaPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All checks failed
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"ArcOfHyperbola constructor expects an hyperbola curve and a parameter range");
|
||||
@@ -116,7 +116,7 @@ int ArcOfHyperbolaPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
|
||||
Py::Float ArcOfHyperbolaPy::getMajorRadius() const
|
||||
{
|
||||
return Py::Float(getGeomArcOfHyperbolaPtr()->getMajorRadius());
|
||||
return Py::Float(getGeomArcOfHyperbolaPtr()->getMajorRadius());
|
||||
}
|
||||
|
||||
void ArcOfHyperbolaPy::setMajorRadius(Py::Float arg)
|
||||
@@ -126,7 +126,7 @@ void ArcOfHyperbolaPy::setMajorRadius(Py::Float arg)
|
||||
|
||||
Py::Float ArcOfHyperbolaPy::getMinorRadius() const
|
||||
{
|
||||
return Py::Float(getGeomArcOfHyperbolaPtr()->getMinorRadius());
|
||||
return Py::Float(getGeomArcOfHyperbolaPtr()->getMinorRadius());
|
||||
}
|
||||
|
||||
void ArcOfHyperbolaPy::setMinorRadius(Py::Float arg)
|
||||
@@ -149,5 +149,5 @@ PyObject *ArcOfHyperbolaPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfHyperbolaPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConicPy"
|
||||
Name="ArcOfParabolaPy"
|
||||
Name="ArcOfParabolaPy"
|
||||
PythonName="Part.ArcOfParabola"
|
||||
Twin="GeomArcOfParabola"
|
||||
TwinPointer="GeomArcOfParabola"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomArcOfParabola"
|
||||
TwinPointer="GeomArcOfParabola"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/ArcOfConicPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -50,22 +50,22 @@ std::string ArcOfParabolaPy::representation() const
|
||||
Standard_Real fFocal = parabola->Focal();
|
||||
Standard_Real u1 = trim->FirstParameter();
|
||||
Standard_Real u2 = trim->LastParameter();
|
||||
|
||||
|
||||
gp_Dir normal = parabola->Axis().Direction();
|
||||
gp_Dir xdir = parabola->XAxis().Direction();
|
||||
|
||||
|
||||
gp_Ax2 xdirref(loc, normal); // this is a reference XY for the parabola
|
||||
|
||||
|
||||
Standard_Real fAngleXU = -xdir.AngleWithRef(xdirref.XDirection(),normal);
|
||||
|
||||
|
||||
|
||||
std::stringstream str;
|
||||
str << "ArcOfParabola (";
|
||||
str << "Focal : " << fFocal << ", ";
|
||||
str << "Focal : " << fFocal << ", ";
|
||||
str << "AngleXU : " << fAngleXU << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << "), ";
|
||||
str << "Parameter : (" << u1 << ", " << u2 << ")";
|
||||
str << ")";
|
||||
|
||||
return str.str();
|
||||
@@ -73,7 +73,7 @@ std::string ArcOfParabolaPy::representation() const
|
||||
|
||||
PyObject *ArcOfParabolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ArcOfParabolaPy and the Twin object
|
||||
// create a new instance of ArcOfParabolaPy and the Twin object
|
||||
return new ArcOfParabolaPy(new GeomArcOfParabola);
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ int ArcOfParabolaPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All checks failed
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"ArcOfParabola constructor expects an parabola curve and a parameter range");
|
||||
@@ -114,7 +114,7 @@ int ArcOfParabolaPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
|
||||
Py::Float ArcOfParabolaPy::getFocal() const
|
||||
{
|
||||
return Py::Float(getGeomArcOfParabolaPtr()->getFocal());
|
||||
return Py::Float(getGeomArcOfParabolaPtr()->getFocal());
|
||||
}
|
||||
|
||||
void ArcOfParabolaPy::setFocal(Py::Float arg)
|
||||
@@ -137,5 +137,5 @@ PyObject *ArcOfParabolaPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfParabolaPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="BaseClassPy"
|
||||
Name="AttachEnginePy"
|
||||
Twin="AttachEngine"
|
||||
TwinPointer="AttachEngine"
|
||||
Include="Mod/Part/App/Attacher.h"
|
||||
FatherInclude="Base/BaseClassPy.h"
|
||||
Namespace="Attacher"
|
||||
<PythonExport
|
||||
Father="BaseClassPy"
|
||||
Name="AttachEnginePy"
|
||||
Twin="AttachEngine"
|
||||
TwinPointer="AttachEngine"
|
||||
Include="Mod/Part/App/Attacher.h"
|
||||
FatherInclude="Base/BaseClassPy.h"
|
||||
Namespace="Attacher"
|
||||
Constructor="true"
|
||||
Delete="true"
|
||||
FatherNamespace="Base">
|
||||
|
||||
@@ -275,7 +275,7 @@ App::PropertyPlacement& AttachExtension::getPlacement() const {
|
||||
}
|
||||
|
||||
PyObject* AttachExtension::getExtensionPyObject() {
|
||||
|
||||
|
||||
if (ExtensionPythonObject.is(Py::_None())){
|
||||
// ref counter is set to 1
|
||||
ExtensionPythonObject = Py::Object(new AttachExtensionPy(this),true);
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
protected:
|
||||
void extensionOnChanged(const App::Property* /*prop*/) override;
|
||||
virtual void extHandleChangedPropertyName(Base::XMLReader &reader, const char* TypeName, const char* PropName);
|
||||
|
||||
|
||||
App::PropertyPlacement& getPlacement() const;
|
||||
|
||||
public:
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="DocumentObjectExtensionPy"
|
||||
Name="AttachExtensionPy"
|
||||
Twin="AttachExtension"
|
||||
TwinPointer="AttachExtension"
|
||||
Include="Mod/Part/App/AttachExtension.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="App/DocumentObjectExtensionPy.h"
|
||||
<PythonExport
|
||||
Father="DocumentObjectExtensionPy"
|
||||
Name="AttachExtensionPy"
|
||||
Twin="AttachExtension"
|
||||
TwinPointer="AttachExtension"
|
||||
Include="Mod/Part/App/AttachExtension.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="App/DocumentObjectExtensionPy.h"
|
||||
FatherNamespace="App">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="DeepSOIC" EMail="vv.titov@gmail.com" />
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<UserDocu>
|
||||
setTrihedronMode(point,direction)
|
||||
Sets a fixed trihedron to perform the sweeping.
|
||||
All sections will be parallel.
|
||||
All sections will be parallel.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
@@ -58,15 +58,15 @@
|
||||
<UserDocu>
|
||||
setAuxiliarySpine(wire, CurvilinearEquivalence, TypeOfContact)
|
||||
Sets an auxiliary spine to define the Normal.
|
||||
|
||||
|
||||
CurvilinearEquivalence = bool
|
||||
For each Point of the Spine P, an Point Q is evalued on AuxiliarySpine.
|
||||
If CurvilinearEquivalence=True Q split AuxiliarySpine with the same length ratio than P split Spine.
|
||||
|
||||
|
||||
* OCC before 6.7
|
||||
TypeOfContact = bool
|
||||
True = keep Contact
|
||||
|
||||
|
||||
* OCC >= 6.7
|
||||
TypeOfContact = long
|
||||
0: No contact
|
||||
@@ -182,7 +182,7 @@
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
setMaxDegree(int degree)
|
||||
Define the maximum V degree of resulting surface.
|
||||
Define the maximum V degree of resulting surface.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
|
||||
@@ -46,7 +46,7 @@ using namespace Part;
|
||||
|
||||
PyObject *BRepOffsetAPI_MakePipeShellPy::PyMake(struct _typeobject *, PyObject *args, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of BRepOffsetAPI_MakePipeShellPy and the Twin object
|
||||
// create a new instance of BRepOffsetAPI_MakePipeShellPy and the Twin object
|
||||
PyObject* obj;
|
||||
if (!PyArg_ParseTuple(args, "O!",&(TopoShapePy::Type),&obj))
|
||||
return nullptr;
|
||||
@@ -459,7 +459,7 @@ PyObject* BRepOffsetAPI_MakePipeShellPy::simulate(PyObject *args)
|
||||
return nullptr;
|
||||
|
||||
try {
|
||||
TopTools_ListOfShape list;
|
||||
TopTools_ListOfShape list;
|
||||
this->getBRepOffsetAPI_MakePipeShellPtr()->Simulate(nbsec, list);
|
||||
|
||||
Py::List shapes;
|
||||
@@ -484,5 +484,5 @@ PyObject *BRepOffsetAPI_MakePipeShellPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int BRepOffsetAPI_MakePipeShellPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -395,7 +395,7 @@ PyObject* BezierCurvePy::interpolate(PyObject * args)
|
||||
int nb_pts = constraints.size();
|
||||
if (nb_pts < 2)
|
||||
Standard_Failure::Raise("not enough points given");
|
||||
|
||||
|
||||
TColStd_Array1OfReal params(1, nb_pts);
|
||||
if (par) {
|
||||
Py::Sequence plist(par);
|
||||
@@ -413,7 +413,7 @@ PyObject* BezierCurvePy::interpolate(PyObject * args)
|
||||
params(idx+1) = (double)idx/((double)nb_pts-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int num_poles = 0;
|
||||
for (Py::Sequence::iterator it1 = constraints.begin(); it1 != constraints.end(); ++it1) {
|
||||
Py::Sequence row(*it1);
|
||||
|
||||
@@ -201,14 +201,14 @@
|
||||
in the u parametric direction, and between V1 and V2 in the v
|
||||
parametric direction.
|
||||
U1, U2, V1, and V2 can be outside the bounds of this surface.
|
||||
|
||||
|
||||
-- U1 and U2 isoparametric Bezier curves, segmented between
|
||||
V1 and V2, become the two bounds of the surface in the v
|
||||
parametric direction (0. and 1. u isoparametric curves).
|
||||
-- V1 and V2 isoparametric Bezier curves, segmented between
|
||||
U1 and U2, become the two bounds of the surface in the u
|
||||
parametric direction (0. and 1. v isoparametric curves).
|
||||
|
||||
|
||||
The poles and weights tables are modified, but the degree of
|
||||
this surface in the u and v parametric directions does not
|
||||
change.U1 can be greater than U2, and V1 can be greater than V2.
|
||||
|
||||
@@ -48,7 +48,7 @@ std::string BezierSurfacePy::representation() const
|
||||
|
||||
PyObject *BezierSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of BezierSurfacePy and the Twin object
|
||||
// create a new instance of BezierSurfacePy and the Twin object
|
||||
return new BezierSurfacePy(new GeomBezierSurface);
|
||||
}
|
||||
|
||||
@@ -673,35 +673,35 @@ Py::Long BezierSurfacePy::getUDegree() const
|
||||
{
|
||||
Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
return Py::Long(surf->UDegree());
|
||||
return Py::Long(surf->UDegree());
|
||||
}
|
||||
|
||||
Py::Long BezierSurfacePy::getVDegree() const
|
||||
{
|
||||
Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
return Py::Long(surf->VDegree());
|
||||
return Py::Long(surf->VDegree());
|
||||
}
|
||||
|
||||
Py::Long BezierSurfacePy::getMaxDegree() const
|
||||
{
|
||||
Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
return Py::Long(surf->MaxDegree());
|
||||
return Py::Long(surf->MaxDegree());
|
||||
}
|
||||
|
||||
Py::Long BezierSurfacePy::getNbUPoles() const
|
||||
{
|
||||
Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
return Py::Long(surf->NbUPoles());
|
||||
return Py::Long(surf->NbUPoles());
|
||||
}
|
||||
|
||||
Py::Long BezierSurfacePy::getNbVPoles() const
|
||||
{
|
||||
Handle(Geom_BezierSurface) surf = Handle(Geom_BezierSurface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
return Py::Long(surf->NbVPoles());
|
||||
return Py::Long(surf->NbVPoles());
|
||||
}
|
||||
|
||||
PyObject *BezierSurfacePy::getCustomAttributes(const char* /*attr*/) const
|
||||
@@ -711,5 +711,5 @@ PyObject *BezierSurfacePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int BezierSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ bool BodyBase::isAfter(const App::DocumentObject *feature, const App::DocumentOb
|
||||
}
|
||||
|
||||
void BodyBase::onBeforeChange (const App::Property* prop) {
|
||||
|
||||
|
||||
//Tip can't point outside the body, hence no base feature tip
|
||||
/*// If we are changing the base feature and tip point to it reset it
|
||||
if ( prop == &BaseFeature && BaseFeature.getValue() == Tip.getValue() && BaseFeature.getValue() ) {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="PartFeaturePy"
|
||||
Name="BodyBasePy"
|
||||
Twin="BodyBase"
|
||||
TwinPointer="BodyBase"
|
||||
Include="Mod/Part/App/BodyBase.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/PartFeaturePy.h"
|
||||
<PythonExport
|
||||
Father="PartFeaturePy"
|
||||
Name="BodyBasePy"
|
||||
Twin="BodyBase"
|
||||
TwinPointer="BodyBase"
|
||||
Include="Mod/Part/App/BodyBase.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/PartFeaturePy.h"
|
||||
FatherNamespace="Part">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
|
||||
|
||||
@@ -44,7 +44,7 @@ PyObject *BodyBasePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int BodyBasePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ChFi2d_AnaFilletAlgoPy"
|
||||
PythonName="Part.ChFi2d.AnaFilletAlgo"
|
||||
Twin="ChFi2d_AnaFilletAlgo"
|
||||
TwinPointer="ChFi2d_AnaFilletAlgo"
|
||||
Include="ChFi2d_AnaFilletAlgo.hxx"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
FatherNamespace="Base"
|
||||
Constructor="true"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ChFi2d_ChamferAPIPy"
|
||||
PythonName="Part.ChFi2d.ChamferAPI"
|
||||
Twin="ChFi2d_ChamferAPI"
|
||||
TwinPointer="ChFi2d_ChamferAPI"
|
||||
Include="ChFi2d_ChamferAPI.hxx"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
FatherNamespace="Base"
|
||||
Constructor="true"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ChFi2d_FilletAPIPy"
|
||||
PythonName="Part.ChFi2d.FilletAPI"
|
||||
Twin="ChFi2d_FilletAPI"
|
||||
TwinPointer="ChFi2d_FilletAPI"
|
||||
Include="ChFi2d_FilletAPI.hxx"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
FatherNamespace="Base"
|
||||
Constructor="true"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ChFi2d_FilletAlgoPy"
|
||||
PythonName="Part.ChFi2d.FilletAlgo"
|
||||
Twin="ChFi2d_FilletAlgo"
|
||||
TwinPointer="ChFi2d_FilletAlgo"
|
||||
Include="ChFi2d_FilletAlgo.hxx"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
FatherNamespace="Base"
|
||||
Constructor="true"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ConicPy"
|
||||
Name="CirclePy"
|
||||
Name="CirclePy"
|
||||
PythonName="Part.Circle"
|
||||
Twin="GeomCircle"
|
||||
TwinPointer="GeomCircle"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomCircle"
|
||||
TwinPointer="GeomCircle"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/ConicPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -49,9 +49,9 @@ std::string CirclePy::representation() const
|
||||
|
||||
std::stringstream str;
|
||||
str << "Circle (";
|
||||
str << "Radius : " << fRad << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << ")";
|
||||
str << "Radius : " << fRad << ", ";
|
||||
str << "Position : (" << loc.X() << ", "<< loc.Y() << ", "<< loc.Z() << "), ";
|
||||
str << "Direction : (" << dir.X() << ", "<< dir.Y() << ", "<< dir.Z() << ")";
|
||||
str << ")";
|
||||
|
||||
return str.str();
|
||||
@@ -59,7 +59,7 @@ std::string CirclePy::representation() const
|
||||
|
||||
PyObject *CirclePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of CirclePy and the Twin object
|
||||
// create a new instance of CirclePy and the Twin object
|
||||
Handle(Geom_Circle) circle = new Geom_Circle(gp_Circ());
|
||||
return new CirclePy(new GeomCircle(circle));
|
||||
}
|
||||
@@ -164,7 +164,7 @@ int CirclePy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Py::Float CirclePy::getRadius() const
|
||||
{
|
||||
Handle(Geom_Circle) circle = Handle(Geom_Circle)::DownCast(getGeomCirclePtr()->handle());
|
||||
return Py::Float(circle->Radius());
|
||||
return Py::Float(circle->Radius());
|
||||
}
|
||||
|
||||
void CirclePy::setRadius(Py::Float arg)
|
||||
@@ -180,5 +180,5 @@ PyObject *CirclePy::getCustomAttributes(const char* ) const
|
||||
|
||||
int CirclePy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="GeometrySurfacePy"
|
||||
Name="ConePy"
|
||||
<PythonExport
|
||||
Father="GeometrySurfacePy"
|
||||
Name="ConePy"
|
||||
PythonName="Part.Cone"
|
||||
Twin="GeomCone"
|
||||
TwinPointer="GeomCone"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometrySurfacePy.h"
|
||||
Twin="GeomCone"
|
||||
TwinPointer="GeomCone"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometrySurfacePy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -48,7 +48,7 @@ std::string ConePy::representation() const
|
||||
|
||||
PyObject *ConePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ConePy and the Twin object
|
||||
// create a new instance of ConePy and the Twin object
|
||||
return new ConePy(new GeomCone);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ Py::Float ConePy::getRadius() const
|
||||
{
|
||||
Handle(Geom_ConicalSurface) s = Handle(Geom_ConicalSurface)::DownCast
|
||||
(getGeomConePtr()->handle());
|
||||
return Py::Float(s->RefRadius());
|
||||
return Py::Float(s->RefRadius());
|
||||
}
|
||||
|
||||
void ConePy::setRadius(Py::Float arg)
|
||||
@@ -169,7 +169,7 @@ Py::Float ConePy::getSemiAngle() const
|
||||
{
|
||||
Handle(Geom_ConicalSurface) s = Handle(Geom_ConicalSurface)::DownCast
|
||||
(getGeomConePtr()->handle());
|
||||
return Py::Float(s->SemiAngle());
|
||||
return Py::Float(s->SemiAngle());
|
||||
}
|
||||
|
||||
void ConePy::setSemiAngle(Py::Float arg)
|
||||
@@ -259,7 +259,7 @@ PyObject *ConePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int ConePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="GeometryCurvePy"
|
||||
Name="ConicPy"
|
||||
PythonName="Part.Conic"
|
||||
Twin="GeomConic"
|
||||
TwinPointer="GeomConic"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometryCurvePy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -234,5 +234,5 @@ PyObject *ConicPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ConicPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="GeometrySurfacePy"
|
||||
Name="CylinderPy"
|
||||
<PythonExport
|
||||
Father="GeometrySurfacePy"
|
||||
Name="CylinderPy"
|
||||
PythonName="Part.Cylinder"
|
||||
Twin="GeomCylinder"
|
||||
TwinPointer="GeomCylinder"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometrySurfacePy.h"
|
||||
Twin="GeomCylinder"
|
||||
TwinPointer="GeomCylinder"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometrySurfacePy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -49,7 +49,7 @@ std::string CylinderPy::representation() const
|
||||
|
||||
PyObject *CylinderPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of CylinderPy and the Twin object
|
||||
// create a new instance of CylinderPy and the Twin object
|
||||
return new CylinderPy(new GeomCylinder);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ Py::Float CylinderPy::getRadius() const
|
||||
{
|
||||
Handle(Geom_CylindricalSurface) cyl = Handle(Geom_CylindricalSurface)::DownCast
|
||||
(getGeomCylinderPtr()->handle());
|
||||
return Py::Float(cyl->Radius());
|
||||
return Py::Float(cyl->Radius());
|
||||
}
|
||||
|
||||
void CylinderPy::setRadius(Py::Float arg)
|
||||
@@ -244,7 +244,7 @@ PyObject *CylinderPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int CylinderPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -57,12 +57,12 @@ TopoDS_Shape Datum::getShape() const
|
||||
return sh.getShape();
|
||||
}
|
||||
|
||||
App::DocumentObject *Datum::getSubObject(const char *subname,
|
||||
App::DocumentObject *Datum::getSubObject(const char *subname,
|
||||
PyObject **pyObj, Base::Matrix4D *pmat, bool transform, int depth) const
|
||||
{
|
||||
// For the sake of simplicity, we don't bother to check for subname, just
|
||||
// return the shape as it is, because a datum object only holds shape with
|
||||
// one single geometry element.
|
||||
// one single geometry element.
|
||||
(void)subname;
|
||||
(void)depth;
|
||||
|
||||
@@ -75,7 +75,7 @@ App::DocumentObject *Datum::getSubObject(const char *subname,
|
||||
Base::PyGILStateLocker lock;
|
||||
PY_TRY {
|
||||
TopoShape ts(getShape().Located(TopLoc_Location()));
|
||||
if(pmat && !ts.isNull())
|
||||
if(pmat && !ts.isNull())
|
||||
ts.transformShape(*pmat,false,true);
|
||||
*pyObj = Py::new_reference_to(shape2pyshape(ts.getShape()));
|
||||
return const_cast<Datum*>(this);
|
||||
|
||||
@@ -46,7 +46,7 @@ std::string EllipsePy::representation() const
|
||||
|
||||
PyObject *EllipsePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of EllipsePy and the Twin object
|
||||
// create a new instance of EllipsePy and the Twin object
|
||||
return new EllipsePy(new GeomEllipse);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ int EllipsePy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Py::Float EllipsePy::getMajorRadius() const
|
||||
{
|
||||
Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast(getGeomEllipsePtr()->handle());
|
||||
return Py::Float(ellipse->MajorRadius());
|
||||
return Py::Float(ellipse->MajorRadius());
|
||||
}
|
||||
|
||||
void EllipsePy::setMajorRadius(Py::Float arg)
|
||||
@@ -140,7 +140,7 @@ void EllipsePy::setMajorRadius(Py::Float arg)
|
||||
Py::Float EllipsePy::getMinorRadius() const
|
||||
{
|
||||
Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast(getGeomEllipsePtr()->handle());
|
||||
return Py::Float(ellipse->MinorRadius());
|
||||
return Py::Float(ellipse->MinorRadius());
|
||||
}
|
||||
|
||||
void EllipsePy::setMinorRadius(Py::Float arg)
|
||||
@@ -152,7 +152,7 @@ void EllipsePy::setMinorRadius(Py::Float arg)
|
||||
Py::Float EllipsePy::getFocal() const
|
||||
{
|
||||
Handle(Geom_Ellipse) ellipse = Handle(Geom_Ellipse)::DownCast(getGeomEllipsePtr()->handle());
|
||||
return Py::Float(ellipse->Focal());
|
||||
return Py::Float(ellipse->Focal());
|
||||
}
|
||||
|
||||
Py::Object EllipsePy::getFocus1() const
|
||||
@@ -176,5 +176,5 @@ PyObject *EllipsePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int EllipsePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ void ExtrusionHelper::makeDraft(const TopoDS_Shape& shape,
|
||||
// methods like checking the center of mass etc. don't help us here.
|
||||
// As solution we build a prism with every wire, then subtract every prism from each other.
|
||||
// If the moment of inertia changes by a subtraction, we have an inner wire prism.
|
||||
//
|
||||
//
|
||||
// first build the prisms
|
||||
std::vector<TopoDS_Shape> resultPrisms;
|
||||
TopoDS_Shape singlePrism;
|
||||
|
||||
@@ -54,7 +54,7 @@ App::DocumentObjectExecReturn *FeatureGeometrySet::execute()
|
||||
result.setShape(result.fuse(sh));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Shape.setValue(result);
|
||||
|
||||
return App::DocumentObject::StdReturn;
|
||||
|
||||
@@ -122,7 +122,7 @@ void Box::Restore(Base::XMLReader &reader)
|
||||
prop->setStatusValue(status.to_ulong());
|
||||
}
|
||||
if (prop && strcmp(prop->getTypeId().getName(), TypeName) == 0) {
|
||||
if (!prop->testStatus(App::Property::Transient)
|
||||
if (!prop->testStatus(App::Property::Transient)
|
||||
&& !status.test(App::Property::Transient)
|
||||
&& !status.test(App::Property::PropTransient)
|
||||
&& !(getPropertyType(prop) & App::Prop_Transient))
|
||||
|
||||
@@ -65,7 +65,7 @@ App::DocumentObjectExecReturn *Circle::execute(void)
|
||||
{
|
||||
gp_Circ circle;
|
||||
circle.SetRadius(this->Radius.getValue());
|
||||
|
||||
|
||||
BRepBuilderAPI_MakeEdge clMakeEdge(circle, Base::toRadians<double>(this->Angle1.getValue()),
|
||||
Base::toRadians<double>(this->Angle2.getValue()));
|
||||
const TopoDS_Edge& edge = clMakeEdge.Edge();
|
||||
|
||||
@@ -121,7 +121,7 @@ App::DocumentObjectExecReturn *MultiCommon::execute()
|
||||
// Let's call algorithm computing a fuse operation:
|
||||
BRepAlgoAPI_Common mkCommon(resShape, *it);
|
||||
// Let's check if the fusion has been successful
|
||||
if (!mkCommon.IsDone())
|
||||
if (!mkCommon.IsDone())
|
||||
throw BooleanException("Intersection failed");
|
||||
resShape = mkCommon.Shape();
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
Section();
|
||||
|
||||
App::PropertyBool Approximation;
|
||||
|
||||
|
||||
/** @name methods override Feature */
|
||||
//@{
|
||||
/// recalculate the Feature
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConic2dPy"
|
||||
Name="ArcOfCircle2dPy"
|
||||
PythonName="Part.Geom2d.ArcOfCircle2d"
|
||||
Twin="Geom2dArcOfCircle"
|
||||
TwinPointer="Geom2dArcOfCircle"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -48,7 +48,7 @@ std::string ArcOfCircle2dPy::representation() const
|
||||
|
||||
PyObject *ArcOfCircle2dPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ArcOfCirclePy and the Twin object
|
||||
// create a new instance of ArcOfCirclePy and the Twin object
|
||||
return new ArcOfCircle2dPy(new Geom2dArcOfCircle);
|
||||
}
|
||||
|
||||
@@ -132,5 +132,5 @@ PyObject *ArcOfCircle2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfCircle2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="Curve2dPy"
|
||||
Name="ArcOfConic2dPy"
|
||||
PythonName="Part.Geom2d.ArcOfConic2d"
|
||||
Twin="Geom2dArcOfConic"
|
||||
TwinPointer="Geom2dArcOfConic"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -117,5 +117,5 @@ PyObject *ArcOfConic2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfConic2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConic2dPy"
|
||||
Name="ArcOfEllipse2dPy"
|
||||
PythonName="Part.Geom2d.ArcOfEllipse2d"
|
||||
Twin="Geom2dArcOfEllipse"
|
||||
TwinPointer="Geom2dArcOfEllipse"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
@@ -20,7 +20,7 @@
|
||||
<UserDocu>The major radius of the ellipse.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="MajorRadius" Type="Float"/>
|
||||
</Attribute>
|
||||
</Attribute>
|
||||
<Attribute Name="MinorRadius" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>The minor radius of the ellipse.</UserDocu>
|
||||
|
||||
@@ -70,7 +70,7 @@ int ArcOfEllipse2dPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ int ArcOfEllipse2dPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All checks failed
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"ArcOfEllipse2d constructor expects an ellipse curve and a parameter range");
|
||||
@@ -120,5 +120,5 @@ PyObject *ArcOfEllipse2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfEllipse2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConic2dPy"
|
||||
Name="ArcOfHyperbola2dPy"
|
||||
PythonName="Part.Geom2d.ArcOfHyperbola2d"
|
||||
Twin="Geom2dArcOfHyperbola"
|
||||
TwinPointer="Geom2dArcOfHyperbola"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
@@ -20,7 +20,7 @@
|
||||
<UserDocu>The major radius of the hyperbola.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="MajorRadius" Type="Float"/>
|
||||
</Attribute>
|
||||
</Attribute>
|
||||
<Attribute Name="MinorRadius" ReadOnly="false">
|
||||
<Documentation>
|
||||
<UserDocu>The minor radius of the hyperbola.</UserDocu>
|
||||
|
||||
@@ -70,7 +70,7 @@ int ArcOfHyperbola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ int ArcOfHyperbola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All checks failed
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"ArcOfHyperbola constructor expects an hyperbola curve and a parameter range");
|
||||
@@ -121,5 +121,5 @@ PyObject *ArcOfHyperbola2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfHyperbola2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ArcOfConic2dPy"
|
||||
Name="ArcOfParabola2dPy"
|
||||
PythonName="Part.Geom2d.ArcOfParabola2d"
|
||||
Twin="Geom2dArcOfParabola"
|
||||
TwinPointer="Geom2dArcOfParabola"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/ArcOfConic2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -70,7 +70,7 @@ int ArcOfParabola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ int ArcOfParabola2dPy::PyInit(PyObject* args, PyObject* /*kwds*/)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All checks failed
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"ArcOfParabola2d constructor expects an parabola curve and a parameter range");
|
||||
@@ -111,5 +111,5 @@ PyObject *ArcOfParabola2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int ArcOfParabola2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -622,28 +622,28 @@ Py::Long BSplineCurve2dPy::getDegree() const
|
||||
{
|
||||
Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->Degree());
|
||||
return Py::Long(curve->Degree());
|
||||
}
|
||||
|
||||
Py::Long BSplineCurve2dPy::getMaxDegree() const
|
||||
{
|
||||
Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->MaxDegree());
|
||||
return Py::Long(curve->MaxDegree());
|
||||
}
|
||||
|
||||
Py::Long BSplineCurve2dPy::getNbPoles() const
|
||||
{
|
||||
Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->NbPoles());
|
||||
return Py::Long(curve->NbPoles());
|
||||
}
|
||||
|
||||
Py::Long BSplineCurve2dPy::getNbKnots() const
|
||||
{
|
||||
Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->NbKnots());
|
||||
return Py::Long(curve->NbKnots());
|
||||
}
|
||||
|
||||
Py::Object BSplineCurve2dPy::getStartPoint() const
|
||||
@@ -666,14 +666,14 @@ Py::Object BSplineCurve2dPy::getFirstUKnotIndex() const
|
||||
{
|
||||
Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->FirstUKnotIndex());
|
||||
return Py::Long(curve->FirstUKnotIndex());
|
||||
}
|
||||
|
||||
Py::Object BSplineCurve2dPy::getLastUKnotIndex() const
|
||||
{
|
||||
Handle(Geom2d_BSplineCurve) curve = Handle(Geom2d_BSplineCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->LastUKnotIndex());
|
||||
return Py::Long(curve->LastUKnotIndex());
|
||||
}
|
||||
|
||||
Py::List BSplineCurve2dPy::getKnotSequence() const
|
||||
@@ -736,17 +736,17 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
|
||||
double weight1 = 0;
|
||||
double weight2 = 0;
|
||||
double weight3 = 0;
|
||||
|
||||
|
||||
static char* kwds_interp[] = {"Points", "DegMax", "Continuity", "Tolerance", "DegMin", "ParamType", "Parameters",
|
||||
"LengthWeight", "CurvatureWeight", "TorsionWeight", nullptr};
|
||||
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|isdisOddd",kwds_interp,
|
||||
&obj, °Max,
|
||||
&continuity, &tol3d, °Min,
|
||||
&continuity, &tol3d, °Min,
|
||||
&parType, &par,
|
||||
&weight1, &weight2, &weight3))
|
||||
return nullptr;
|
||||
|
||||
|
||||
try {
|
||||
Py::Sequence list(obj);
|
||||
TColgp_Array1OfPnt2d pnts(1,list.size());
|
||||
@@ -759,7 +759,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
|
||||
if (degMin > degMax) {
|
||||
Standard_Failure::Raise("DegMin must be lower or equal to DegMax");
|
||||
}
|
||||
|
||||
|
||||
GeomAbs_Shape c;
|
||||
std::string str = continuity;
|
||||
if (str == "C0")
|
||||
@@ -778,7 +778,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
|
||||
c = GeomAbs_CN;
|
||||
else
|
||||
c = GeomAbs_C2;
|
||||
|
||||
|
||||
if (weight1 || weight2 || weight3) {
|
||||
// It seems that this function only works with Continuity = C0, C1 or C2
|
||||
if (!(c == GeomAbs_C0 || c == GeomAbs_C1 || c == GeomAbs_C2)) {
|
||||
@@ -796,7 +796,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
|
||||
return nullptr; // goes to the catch block
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (par) {
|
||||
Py::Sequence plist(par);
|
||||
TColStd_Array1OfReal parameters(1,plist.size());
|
||||
@@ -805,7 +805,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
|
||||
Py::Float f(*it);
|
||||
parameters(index++) = static_cast<double>(f);
|
||||
}
|
||||
|
||||
|
||||
Geom2dAPI_PointsToBSpline fit(pnts, parameters, degMin, degMax, c, tol3d);
|
||||
Handle(Geom2d_BSplineCurve) spline = fit.Curve();
|
||||
if (!spline.IsNull()) {
|
||||
@@ -817,7 +817,7 @@ PyObject* BSplineCurve2dPy::approximate(PyObject *args, PyObject *kwds)
|
||||
return nullptr; // goes to the catch block
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Approx_ParametrizationType pt;
|
||||
std::string pstr = parType;
|
||||
if (pstr == "Uniform")
|
||||
@@ -1278,5 +1278,5 @@ PyObject* BSplineCurve2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int BSplineCurve2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -341,21 +341,21 @@ Py::Long BezierCurve2dPy::getDegree() const
|
||||
{
|
||||
Handle(Geom2d_BezierCurve) curve = Handle(Geom2d_BezierCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->Degree());
|
||||
return Py::Long(curve->Degree());
|
||||
}
|
||||
|
||||
Py::Long BezierCurve2dPy::getMaxDegree() const
|
||||
{
|
||||
Handle(Geom2d_BezierCurve) curve = Handle(Geom2d_BezierCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->MaxDegree());
|
||||
return Py::Long(curve->MaxDegree());
|
||||
}
|
||||
|
||||
Py::Long BezierCurve2dPy::getNbPoles() const
|
||||
{
|
||||
Handle(Geom2d_BezierCurve) curve = Handle(Geom2d_BezierCurve)::DownCast
|
||||
(getGeometry2dPtr()->handle());
|
||||
return Py::Long(curve->NbPoles());
|
||||
return Py::Long(curve->NbPoles());
|
||||
}
|
||||
|
||||
Py::Object BezierCurve2dPy::getStartPoint() const
|
||||
@@ -381,5 +381,5 @@ PyObject *BezierCurve2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int BezierCurve2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="Conic2dPy"
|
||||
Name="Circle2dPy"
|
||||
PythonName="Part.Geom2d.Circle2d"
|
||||
Twin="Geom2dCircle"
|
||||
TwinPointer="Geom2dCircle"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/Conic2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -164,7 +164,7 @@ PyObject* Circle2dPy::getCircleCenter(PyObject *args)
|
||||
Py::Float Circle2dPy::getRadius() const
|
||||
{
|
||||
Handle(Geom2d_Circle) circle = Handle(Geom2d_Circle)::DownCast(getGeom2dCirclePtr()->handle());
|
||||
return Py::Float(circle->Radius());
|
||||
return Py::Float(circle->Radius());
|
||||
}
|
||||
|
||||
void Circle2dPy::setRadius(Py::Float arg)
|
||||
@@ -180,5 +180,5 @@ PyObject *Circle2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int Circle2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="Curve2dPy"
|
||||
Name="Conic2dPy"
|
||||
PythonName="Part.Geom2d.Conic2d"
|
||||
Twin="Geom2dConic"
|
||||
TwinPointer="Geom2dConic"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -111,5 +111,5 @@ PyObject *Conic2dPy::getCustomAttributes(const char* ) const
|
||||
|
||||
int Conic2dPy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ length([uMin,uMax,Tol]) -> Float</UserDocu>
|
||||
</Methode>
|
||||
<Methode Name="parameterAtDistance">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
|
||||
<UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
|
||||
parameterAtDistance([abscissa, startingParameter]) -> Float the</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
|
||||
@@ -230,7 +230,7 @@ PyObject* Curve2dPy::toShape(PyObject *args)
|
||||
return Py::new_reference_to(shape2pyshape(edge));
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ int Ellipse2dPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Py::Float Ellipse2dPy::getMajorRadius() const
|
||||
{
|
||||
Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(getGeom2dEllipsePtr()->handle());
|
||||
return Py::Float(ellipse->MajorRadius());
|
||||
return Py::Float(ellipse->MajorRadius());
|
||||
}
|
||||
|
||||
void Ellipse2dPy::setMajorRadius(Py::Float arg)
|
||||
@@ -140,7 +140,7 @@ void Ellipse2dPy::setMajorRadius(Py::Float arg)
|
||||
Py::Float Ellipse2dPy::getMinorRadius() const
|
||||
{
|
||||
Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(getGeom2dEllipsePtr()->handle());
|
||||
return Py::Float(ellipse->MinorRadius());
|
||||
return Py::Float(ellipse->MinorRadius());
|
||||
}
|
||||
|
||||
void Ellipse2dPy::setMinorRadius(Py::Float arg)
|
||||
@@ -152,7 +152,7 @@ void Ellipse2dPy::setMinorRadius(Py::Float arg)
|
||||
Py::Float Ellipse2dPy::getFocal() const
|
||||
{
|
||||
Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(getGeom2dEllipsePtr()->handle());
|
||||
return Py::Float(ellipse->Focal());
|
||||
return Py::Float(ellipse->Focal());
|
||||
}
|
||||
|
||||
Py::Object Ellipse2dPy::getFocus1() const
|
||||
@@ -176,5 +176,5 @@ PyObject *Ellipse2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int Ellipse2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?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="Geometry2dPy"
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="Geometry2dPy"
|
||||
PythonName="Part.Geom2d.Geometry2d"
|
||||
Twin="Geometry2d"
|
||||
TwinPointer="Geometry2d"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
Twin="Geometry2d"
|
||||
TwinPointer="Geometry2d"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
FatherNamespace="Base"
|
||||
Constructor="true"
|
||||
Delete="true">
|
||||
|
||||
@@ -185,5 +185,5 @@ PyObject *Geometry2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int Geometry2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ int Hyperbola2dPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Py::Float Hyperbola2dPy::getMajorRadius() const
|
||||
{
|
||||
Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(getGeom2dHyperbolaPtr()->handle());
|
||||
return Py::Float(hyperbola->MajorRadius());
|
||||
return Py::Float(hyperbola->MajorRadius());
|
||||
}
|
||||
|
||||
void Hyperbola2dPy::setMajorRadius(Py::Float arg)
|
||||
@@ -140,7 +140,7 @@ void Hyperbola2dPy::setMajorRadius(Py::Float arg)
|
||||
Py::Float Hyperbola2dPy::getMinorRadius() const
|
||||
{
|
||||
Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(getGeom2dHyperbolaPtr()->handle());
|
||||
return Py::Float(hyperbola->MinorRadius());
|
||||
return Py::Float(hyperbola->MinorRadius());
|
||||
}
|
||||
|
||||
void Hyperbola2dPy::setMinorRadius(Py::Float arg)
|
||||
@@ -152,7 +152,7 @@ void Hyperbola2dPy::setMinorRadius(Py::Float arg)
|
||||
Py::Float Hyperbola2dPy::getFocal() const
|
||||
{
|
||||
Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(getGeom2dHyperbolaPtr()->handle());
|
||||
return Py::Float(hyperbola->Focal());
|
||||
return Py::Float(hyperbola->Focal());
|
||||
}
|
||||
|
||||
Py::Object Hyperbola2dPy::getFocus1() const
|
||||
@@ -176,5 +176,5 @@ PyObject *Hyperbola2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int Hyperbola2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="Curve2dPy"
|
||||
Name="Line2dPy"
|
||||
PythonName="Part.Geom2d.Line2d"
|
||||
Twin="Geom2dLine"
|
||||
TwinPointer="Geom2dLine"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -101,7 +101,7 @@ int Line2dPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -221,5 +221,5 @@ PyObject *Line2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int Line2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="Curve2dPy"
|
||||
Name="Line2dSegmentPy"
|
||||
PythonName="Part.Geom2d.Line2dSegment"
|
||||
Twin="Geom2dLineSegment"
|
||||
Twin="Geom2dLineSegment"
|
||||
TwinPointer="Geom2dLineSegment"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/Curve2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -153,7 +153,7 @@ int Line2dSegmentPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ PyObject* Line2dSegmentPy::setParameterRange(PyObject *args)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
Py::Object Line2dSegmentPy::getStartPoint() const
|
||||
@@ -307,5 +307,5 @@ PyObject *Line2dSegmentPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int Line2dSegmentPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -131,5 +131,5 @@ PyObject *OffsetCurve2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int OffsetCurve2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="Conic2dPy"
|
||||
Name="Parabola2dPy"
|
||||
PythonName="Part.Geom2d.Parabola2d"
|
||||
Twin="Geom2dParabola"
|
||||
TwinPointer="Geom2dParabola"
|
||||
Include="Mod/Part/App/Geometry2d.h"
|
||||
Namespace="Part"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/Geom2d/Conic2dPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -62,13 +62,13 @@ int Parabola2dPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
Py::Float Parabola2dPy::getFocal() const
|
||||
{
|
||||
Handle(Geom2d_Parabola) curve = Handle(Geom2d_Parabola)::DownCast(getGeometry2dPtr()->handle());
|
||||
return Py::Float(curve->Focal());
|
||||
return Py::Float(curve->Focal());
|
||||
}
|
||||
|
||||
void Parabola2dPy::setFocal(Py::Float arg)
|
||||
{
|
||||
Handle(Geom2d_Parabola) curve = Handle(Geom2d_Parabola)::DownCast(getGeometry2dPtr()->handle());
|
||||
curve->SetFocal((double)arg);
|
||||
curve->SetFocal((double)arg);
|
||||
}
|
||||
|
||||
Py::Object Parabola2dPy::getFocus() const
|
||||
@@ -91,5 +91,5 @@ PyObject *Parabola2dPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int Parabola2dPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?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="BuildPlateSurfacePy"
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="BuildPlateSurfacePy"
|
||||
PythonName="Part.GeomPlate.BuildPlateSurfacePy"
|
||||
Twin="GeomPlate_BuildPlateSurface"
|
||||
TwinPointer="GeomPlate_BuildPlateSurface"
|
||||
Include="GeomPlate_BuildPlateSurface.hxx"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
Twin="GeomPlate_BuildPlateSurface"
|
||||
TwinPointer="GeomPlate_BuildPlateSurface"
|
||||
Include="GeomPlate_BuildPlateSurface.hxx"
|
||||
Namespace="Part"
|
||||
FatherInclude="Base/PyObjectBase.h"
|
||||
FatherNamespace="Base"
|
||||
Constructor="true"
|
||||
Delete="true">
|
||||
|
||||
@@ -194,7 +194,7 @@ void Geom2dPoint::Restore(Base::XMLReader &reader)
|
||||
// get the value of my Attribute
|
||||
X = reader.getAttributeAsFloat("X");
|
||||
Y = reader.getAttributeAsFloat("Y");
|
||||
|
||||
|
||||
// set the read geometry
|
||||
setPoint(Base::Vector2d(X,Y));
|
||||
}
|
||||
@@ -296,14 +296,14 @@ bool Geom2dCurve::closestParameter(const Base::Vector2d& point, double &u) const
|
||||
std::cout << e.GetMessageString() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Geom2dCurve::closestParameterToBasicCurve(const Base::Vector2d& point, double &u) const
|
||||
{
|
||||
Handle(Geom2d_Curve) c = Handle(Geom2d_Curve)::DownCast(handle());
|
||||
|
||||
|
||||
if (c->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve))){
|
||||
Handle(Geom2d_TrimmedCurve) tc = Handle(Geom2d_TrimmedCurve)::DownCast(handle());
|
||||
Handle(Geom2d_Curve) bc = tc->BasisCurve();
|
||||
@@ -316,14 +316,14 @@ bool Geom2dCurve::closestParameterToBasicCurve(const Base::Vector2d& point, doub
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
std::cout << e.GetMessageString() << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
else {
|
||||
return this->closestParameter(point, u);
|
||||
}
|
||||
@@ -1060,7 +1060,7 @@ void Geom2dArcOfCircle::Restore(Base::XMLReader &reader)
|
||||
Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value();
|
||||
Handle(Geom2d_Circle) tmpcircle = Handle(Geom2d_Circle)::DownCast(tmpcurve->BasisCurve());
|
||||
Handle(Geom2d_Circle) circle = Handle(Geom2d_Circle)::DownCast(this->myCurve->BasisCurve());
|
||||
|
||||
|
||||
circle->SetCirc2d(tmpcircle->Circ2d());
|
||||
this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter());
|
||||
}
|
||||
@@ -1211,7 +1211,7 @@ void Geom2dEllipse::Restore(Base::XMLReader& reader)
|
||||
RestoreAxis(reader, axis);
|
||||
MajorRadius = reader.getAttributeAsFloat("MajorRadius");
|
||||
MinorRadius = reader.getAttributeAsFloat("MinorRadius");
|
||||
|
||||
|
||||
try {
|
||||
GCE2d_MakeEllipse mc(axis, MajorRadius, MinorRadius);
|
||||
if (!mc.IsDone())
|
||||
@@ -1357,7 +1357,7 @@ void Geom2dArcOfEllipse::Save(Base::Writer &writer) const
|
||||
{
|
||||
// save the attributes of the father class
|
||||
Geom2dCurve::Save(writer);
|
||||
|
||||
|
||||
Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(this->myCurve->BasisCurve());
|
||||
|
||||
gp_Elips2d e = ellipse->Elips2d();
|
||||
@@ -1393,15 +1393,15 @@ void Geom2dArcOfEllipse::Restore(Base::XMLReader &reader)
|
||||
GCE2d_MakeEllipse mc(axis, MajorRadius, MinorRadius);
|
||||
if (!mc.IsDone())
|
||||
throw Base::CADKernelError(gce_ErrorStatusText(mc.Status()));
|
||||
|
||||
|
||||
GCE2d_MakeArcOfEllipse ma(mc.Value()->Elips2d(), u, v);
|
||||
if (!ma.IsDone())
|
||||
throw Base::CADKernelError(gce_ErrorStatusText(ma.Status()));
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value();
|
||||
Handle(Geom2d_Ellipse) tmpellipse = Handle(Geom2d_Ellipse)::DownCast(tmpcurve->BasisCurve());
|
||||
Handle(Geom2d_Ellipse) ellipse = Handle(Geom2d_Ellipse)::DownCast(this->myCurve->BasisCurve());
|
||||
|
||||
|
||||
ellipse->SetElips2d(tmpellipse->Elips2d());
|
||||
this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter());
|
||||
}
|
||||
@@ -1619,7 +1619,7 @@ void Geom2dArcOfHyperbola::Save(Base::Writer &writer) const
|
||||
{
|
||||
// save the attributes of the father class
|
||||
Geom2dCurve::Save(writer);
|
||||
|
||||
|
||||
Handle(Geom2d_Hyperbola) hh = Handle(Geom2d_Hyperbola)::DownCast(this->myCurve->BasisCurve());
|
||||
|
||||
gp_Hypr2d h = hh->Hypr2d();
|
||||
@@ -1655,15 +1655,15 @@ void Geom2dArcOfHyperbola::Restore(Base::XMLReader &reader)
|
||||
GCE2d_MakeHyperbola mc(axis, MajorRadius, MinorRadius);
|
||||
if (!mc.IsDone())
|
||||
throw Base::CADKernelError(gce_ErrorStatusText(mc.Status()));
|
||||
|
||||
|
||||
GCE2d_MakeArcOfHyperbola ma(mc.Value()->Hypr2d(), u, v);
|
||||
if (!ma.IsDone())
|
||||
throw Base::CADKernelError(gce_ErrorStatusText(ma.Status()));
|
||||
|
||||
|
||||
Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value();
|
||||
Handle(Geom2d_Hyperbola) tmphyperbola = Handle(Geom2d_Hyperbola)::DownCast(tmpcurve->BasisCurve());
|
||||
Handle(Geom2d_Hyperbola) hyperbola = Handle(Geom2d_Hyperbola)::DownCast(this->myCurve->BasisCurve());
|
||||
|
||||
|
||||
hyperbola->SetHypr2d(tmphyperbola->Hypr2d());
|
||||
this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter());
|
||||
}
|
||||
@@ -1844,7 +1844,7 @@ void Geom2dArcOfParabola::Save(Base::Writer &writer) const
|
||||
{
|
||||
// save the attributes of the father class
|
||||
Geom2dCurve::Save(writer);
|
||||
|
||||
|
||||
Handle(Geom2d_Parabola) hp = Handle(Geom2d_Parabola)::DownCast(this->myCurve->BasisCurve());
|
||||
gp_Parab2d p = hp->Parab2d();
|
||||
gp_Ax22d axis = p.Axis();
|
||||
@@ -1878,7 +1878,7 @@ void Geom2dArcOfParabola::Restore(Base::XMLReader &reader)
|
||||
GCE2d_MakeParabola mc(axis, Focal);
|
||||
if (!mc.IsDone())
|
||||
throw Base::CADKernelError(gce_ErrorStatusText(mc.Status()));
|
||||
|
||||
|
||||
GCE2d_MakeArcOfParabola ma(mc.Value()->Parab2d(), u, v);
|
||||
if (!ma.IsDone())
|
||||
throw Base::CADKernelError(gce_ErrorStatusText(ma.Status()));
|
||||
@@ -1886,7 +1886,7 @@ void Geom2dArcOfParabola::Restore(Base::XMLReader &reader)
|
||||
Handle(Geom2d_TrimmedCurve) tmpcurve = ma.Value();
|
||||
Handle(Geom2d_Parabola) tmpparabola = Handle(Geom2d_Parabola)::DownCast(tmpcurve->BasisCurve());
|
||||
Handle(Geom2d_Parabola) parabola = Handle(Geom2d_Parabola)::DownCast(this->myCurve->BasisCurve());
|
||||
|
||||
|
||||
parabola->SetParab2d(tmpparabola->Parab2d());
|
||||
this->myCurve->SetTrim(tmpcurve->FirstParameter(), tmpcurve->LastParameter());
|
||||
}
|
||||
@@ -1966,7 +1966,7 @@ void Geom2dLine::Save(Base::Writer &writer) const
|
||||
Base::Vector2d Pos = getPos();
|
||||
Base::Vector2d Dir = getDir();
|
||||
|
||||
writer.Stream()
|
||||
writer.Stream()
|
||||
<< writer.ind()
|
||||
<< "<Geom2dLine "
|
||||
<< "PosX=\"" << Pos.x << "\" "
|
||||
@@ -2100,7 +2100,7 @@ void Geom2dLineSegment::Save(Base::Writer &writer) const
|
||||
Base::Vector2d End = getEndPoint();
|
||||
Base::Vector2d Start = getStartPoint();
|
||||
|
||||
writer.Stream()
|
||||
writer.Stream()
|
||||
<< writer.ind()
|
||||
<< "<Geom2dLineSegment "
|
||||
<< "StartX=\"" << Start.x << "\" "
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
unsigned int getMemSize() const override;
|
||||
void Save(Base::Writer &/*writer*/) const override;
|
||||
void Restore(Base::XMLReader &/*reader*/) override;
|
||||
/// returns a cloned object
|
||||
/// returns a cloned object
|
||||
virtual Geometry2d *clone() const = 0;
|
||||
|
||||
protected:
|
||||
@@ -369,7 +369,7 @@ public:
|
||||
Geom2dHyperbola(const Handle(Geom2d_Hyperbola)&);
|
||||
~Geom2dHyperbola() override;
|
||||
Geometry2d *clone() const override;
|
||||
|
||||
|
||||
double getMajorRadius() const;
|
||||
void setMajorRadius(double Radius);
|
||||
double getMinorRadius() const;
|
||||
@@ -424,7 +424,7 @@ public:
|
||||
Geom2dParabola(const Handle(Geom2d_Parabola)&);
|
||||
~Geom2dParabola() override;
|
||||
Geometry2d *clone() const override;
|
||||
|
||||
|
||||
double getFocal() const;
|
||||
void setFocal(double length);
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ of the nearest orthogonal projection of the point.</UserDocu>
|
||||
<Methode Name="toBSpline" Const="true" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns a B-Spline representation of this surface.
|
||||
Returns a B-Spline representation of this surface.
|
||||
The optional arguments are:
|
||||
* tolerance (default=1e-7)
|
||||
* continuity in u (as string e.g. C0, G0, G1, C1, G2, C3, CN) (default='C1')
|
||||
|
||||
@@ -798,7 +798,7 @@ PyObject *GeometrySurfacePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int GeometrySurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Specialized intersection functions
|
||||
|
||||
@@ -46,7 +46,7 @@ std::string HyperbolaPy::representation() const
|
||||
|
||||
PyObject *HyperbolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of HyperbolaPy and the Twin object
|
||||
// create a new instance of HyperbolaPy and the Twin object
|
||||
return new HyperbolaPy(new GeomHyperbola);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ int HyperbolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Py::Float HyperbolaPy::getMajorRadius() const
|
||||
{
|
||||
Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle());
|
||||
return Py::Float(hyperbola->MajorRadius());
|
||||
return Py::Float(hyperbola->MajorRadius());
|
||||
}
|
||||
|
||||
void HyperbolaPy::setMajorRadius(Py::Float arg)
|
||||
@@ -140,7 +140,7 @@ void HyperbolaPy::setMajorRadius(Py::Float arg)
|
||||
Py::Float HyperbolaPy::getMinorRadius() const
|
||||
{
|
||||
Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle());
|
||||
return Py::Float(hyperbola->MinorRadius());
|
||||
return Py::Float(hyperbola->MinorRadius());
|
||||
}
|
||||
|
||||
void HyperbolaPy::setMinorRadius(Py::Float arg)
|
||||
@@ -152,7 +152,7 @@ void HyperbolaPy::setMinorRadius(Py::Float arg)
|
||||
Py::Float HyperbolaPy::getFocal() const
|
||||
{
|
||||
Handle(Geom_Hyperbola) hyperbola = Handle(Geom_Hyperbola)::DownCast(getGeomHyperbolaPtr()->handle());
|
||||
return Py::Float(hyperbola->Focal());
|
||||
return Py::Float(hyperbola->Focal());
|
||||
}
|
||||
|
||||
Py::Object HyperbolaPy::getFocus1() const
|
||||
@@ -176,5 +176,5 @@ PyObject *HyperbolaPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int HyperbolaPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="GeometryCurvePy"
|
||||
Name="LinePy"
|
||||
<PythonExport
|
||||
Father="GeometryCurvePy"
|
||||
Name="LinePy"
|
||||
PythonName="Part.Line"
|
||||
Twin="GeomLine"
|
||||
TwinPointer="GeomLine"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometryCurvePy.h"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometryCurvePy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -46,14 +46,14 @@ std::string LinePy::representation() const
|
||||
|
||||
PyObject *LinePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of LinePy and the Twin object
|
||||
// create a new instance of LinePy and the Twin object
|
||||
return new LinePy(new GeomLine);
|
||||
}
|
||||
|
||||
// constructor method
|
||||
int LinePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
{
|
||||
|
||||
|
||||
if (PyArg_ParseTuple(args, "")) {
|
||||
// default line
|
||||
return 0;
|
||||
@@ -102,7 +102,7 @@ int LinePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -225,5 +225,5 @@ PyObject *LinePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int LinePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ int LineSegmentPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
return 0;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
|
||||
|
||||
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
|
||||
return -1;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ PyObject* LineSegmentPy::setParameterRange(PyObject *args)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Py_Return;
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
Py::Object LineSegmentPy::getStartPoint(void) const
|
||||
@@ -317,5 +317,5 @@ PyObject *LineSegmentPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int LineSegmentPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -38,9 +38,9 @@ PartExport extern PyObject* PartExceptionOCCConstructionError;
|
||||
PartExport extern PyObject* PartExceptionOCCDimensionError;
|
||||
|
||||
|
||||
#define PY_TRY try
|
||||
#define PY_TRY try
|
||||
|
||||
/// see docu of PY_TRY
|
||||
/// see docu of PY_TRY
|
||||
# define _PY_CATCH_OCC(R) \
|
||||
catch (Standard_Failure &e) \
|
||||
{ \
|
||||
|
||||
@@ -45,7 +45,7 @@ std::string OffsetCurvePy::representation() const
|
||||
|
||||
PyObject *OffsetCurvePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of OffsetCurvePy and the Twin object
|
||||
// create a new instance of OffsetCurvePy and the Twin object
|
||||
return new OffsetCurvePy(new GeomOffsetCurve);
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ int OffsetCurvePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
PyObject* pGeom;
|
||||
PyObject* pDir;
|
||||
double offset;
|
||||
if (!PyArg_ParseTuple(args, "O!dO!",
|
||||
&(GeometryPy::Type), &pGeom,
|
||||
if (!PyArg_ParseTuple(args, "O!dO!",
|
||||
&(GeometryPy::Type), &pGeom,
|
||||
&offset,
|
||||
&(Base::VectorPy::Type),&pDir))
|
||||
return -1;
|
||||
@@ -158,5 +158,5 @@ PyObject *OffsetCurvePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int OffsetCurvePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ std::string OffsetSurfacePy::representation() const
|
||||
|
||||
PyObject *OffsetSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of OffsetSurfacePy and the Twin object
|
||||
// create a new instance of OffsetSurfacePy and the Twin object
|
||||
return new OffsetSurfacePy(new GeomOffsetSurface);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ int OffsetSurfacePy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
{
|
||||
PyObject* pGeom;
|
||||
double offset;
|
||||
if (!PyArg_ParseTuple(args, "O!d",
|
||||
&(GeometryPy::Type), &pGeom,
|
||||
if (!PyArg_ParseTuple(args, "O!d",
|
||||
&(GeometryPy::Type), &pGeom,
|
||||
&offset))
|
||||
return -1;
|
||||
|
||||
@@ -128,5 +128,5 @@ PyObject *OffsetSurfacePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int OffsetSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="ConicPy"
|
||||
Name="ParabolaPy"
|
||||
Name="ParabolaPy"
|
||||
PythonName="Part.Parabola"
|
||||
Twin="GeomParabola"
|
||||
TwinPointer="GeomParabola"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomParabola"
|
||||
TwinPointer="GeomParabola"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/ConicPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
|
||||
@@ -46,7 +46,7 @@ std::string ParabolaPy::representation() const
|
||||
|
||||
PyObject *ParabolaPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of ParabolaPy and the Twin object
|
||||
// create a new instance of ParabolaPy and the Twin object
|
||||
return new ParabolaPy(new GeomParabola);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ int ParabolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
Base::Vector3d normal = static_cast<Base::VectorPy*>(pV3)->value();
|
||||
|
||||
Base::Vector3d xvect = focus-center;
|
||||
|
||||
|
||||
// set the geometry
|
||||
gp_Pnt p1(center.x,center.y,center.z);
|
||||
gp_Dir norm(normal.x,normal.y,normal.z);
|
||||
@@ -103,7 +103,7 @@ int ParabolaPy::PyInit(PyObject* args, PyObject* kwds)
|
||||
parabola->SetParab(mc.Value());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
PyErr_SetString(PyExc_TypeError, "Parabola constructor accepts:\n"
|
||||
"-- empty parameter list\n"
|
||||
"-- Parabola\n"
|
||||
@@ -160,13 +160,13 @@ PyObject* ParabolaPy::compute(PyObject *args)
|
||||
Py::Float ParabolaPy::getFocal() const
|
||||
{
|
||||
Handle(Geom_Parabola) curve = Handle(Geom_Parabola)::DownCast(getGeometryPtr()->handle());
|
||||
return Py::Float(curve->Focal());
|
||||
return Py::Float(curve->Focal());
|
||||
}
|
||||
|
||||
void ParabolaPy::setFocal(Py::Float arg)
|
||||
{
|
||||
Handle(Geom_Parabola) curve = Handle(Geom_Parabola)::DownCast(getGeometryPtr()->handle());
|
||||
curve->SetFocal((double)arg);
|
||||
curve->SetFocal((double)arg);
|
||||
}
|
||||
|
||||
Py::Object ParabolaPy::getFocus() const
|
||||
@@ -180,7 +180,7 @@ Py::Object ParabolaPy::getFocus() const
|
||||
Py::Float ParabolaPy::getParameter() const
|
||||
{
|
||||
Handle(Geom_Parabola) curve = Handle(Geom_Parabola)::DownCast(getGeometryPtr()->handle());
|
||||
return Py::Float(curve->Parameter());
|
||||
return Py::Float(curve->Parameter());
|
||||
}
|
||||
|
||||
PyObject *ParabolaPy::getCustomAttributes(const char* /*attr*/) const
|
||||
@@ -190,7 +190,7 @@ PyObject *ParabolaPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int ParabolaPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PartFeaturePy"
|
||||
Name="Part2DObjectPy"
|
||||
Twin="Part2DObject"
|
||||
TwinPointer="Part2DObject"
|
||||
Include="Mod/Part/App/Part2DObject.h"
|
||||
Namespace="Part"
|
||||
Name="Part2DObjectPy"
|
||||
Twin="Part2DObject"
|
||||
TwinPointer="Part2DObject"
|
||||
Include="Mod/Part/App/Part2DObject.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/PartFeaturePy.h"
|
||||
FatherNamespace="Part">
|
||||
<Documentation>
|
||||
|
||||
@@ -116,12 +116,12 @@ PyObject *Feature::getPyObject()
|
||||
return Py::new_reference_to(PythonObject);
|
||||
}
|
||||
|
||||
App::DocumentObject *Feature::getSubObject(const char *subname,
|
||||
App::DocumentObject *Feature::getSubObject(const char *subname,
|
||||
PyObject **pyObj, Base::Matrix4D *pmat, bool transform, int depth) const
|
||||
{
|
||||
// having '.' inside subname means it is referencing some children object,
|
||||
// instead of any sub-element from ourself
|
||||
if(subname && !Data::ComplexGeoData::isMappedElement(subname) && strchr(subname,'.'))
|
||||
if(subname && !Data::ComplexGeoData::isMappedElement(subname) && strchr(subname,'.'))
|
||||
return App::DocumentObject::getSubObject(subname,pyObj,pmat,transform,depth);
|
||||
|
||||
Base::Matrix4D _mat;
|
||||
@@ -143,12 +143,12 @@ App::DocumentObject *Feature::getSubObject(const char *subname,
|
||||
try {
|
||||
TopoShape ts(Shape.getShape());
|
||||
bool doTransform = mat!=ts.getTransform();
|
||||
if(doTransform)
|
||||
if(doTransform)
|
||||
ts.setShape(ts.getShape().Located(TopLoc_Location()));
|
||||
if(subname && *subname && !ts.isNull())
|
||||
ts = ts.getSubShape(subname);
|
||||
if(doTransform && !ts.isNull()) {
|
||||
static int sCopy = -1;
|
||||
static int sCopy = -1;
|
||||
if(sCopy<0) {
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/Mod/Part/General");
|
||||
@@ -189,16 +189,16 @@ App::DocumentObject *Feature::getSubObject(const char *subname,
|
||||
if (msg) {str << msg;}
|
||||
else {str << "No OCCT Exception Message";}
|
||||
str << ": " << getFullName();
|
||||
if (subname)
|
||||
if (subname)
|
||||
str << '.' << subname;
|
||||
FC_LOG(str.str());
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
TopoDS_Shape Feature::getShape(const App::DocumentObject *obj, const char *subname,
|
||||
bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner,
|
||||
bool resolveLink, bool transform)
|
||||
TopoDS_Shape Feature::getShape(const App::DocumentObject *obj, const char *subname,
|
||||
bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner,
|
||||
bool resolveLink, bool transform)
|
||||
{
|
||||
return getTopoShape(obj,subname,needSubElement,pmat,powner,resolveLink,transform,true).getShape();
|
||||
}
|
||||
@@ -229,8 +229,8 @@ struct ShapeCache {
|
||||
const char *propName = prop.getName();
|
||||
if(!App::Property::isValidName(propName))
|
||||
return;
|
||||
if(strcmp(propName,"Shape")==0
|
||||
|| strcmp(propName,"Group")==0
|
||||
if(strcmp(propName,"Shape")==0
|
||||
|| strcmp(propName,"Group")==0
|
||||
|| strstr(propName,"Touched"))
|
||||
slotClear(obj);
|
||||
}
|
||||
@@ -271,8 +271,8 @@ void Feature::clearShapeCache() {
|
||||
_ShapeCache.cache.clear();
|
||||
}
|
||||
|
||||
static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subname,
|
||||
bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner,
|
||||
static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subname,
|
||||
bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner,
|
||||
bool resolveLink, bool noElementMap, std::vector<App::DocumentObject*> &linkStack)
|
||||
|
||||
{
|
||||
@@ -324,7 +324,7 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna
|
||||
}
|
||||
if(!linked)
|
||||
linked = owner;
|
||||
if(powner)
|
||||
if(powner)
|
||||
*powner = resolveLink?linked:owner;
|
||||
|
||||
if(!shape.isNull())
|
||||
@@ -373,9 +373,9 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna
|
||||
}
|
||||
|
||||
auto link = owner->getExtensionByType<App::LinkBaseExtension>(true);
|
||||
if(owner!=linked
|
||||
&& (!link || (!link->_ChildCache.getSize()
|
||||
&& link->getSubElements().size()<=1)))
|
||||
if(owner!=linked
|
||||
&& (!link || (!link->_ChildCache.getSize()
|
||||
&& link->getSubElements().size()<=1)))
|
||||
{
|
||||
// if there is a linked object, and there is no child cache (which is used
|
||||
// for special handling of plain group), obtain shape from the linked object
|
||||
@@ -453,7 +453,7 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna
|
||||
if(!linkStack.empty() && linkStack.back()==owner)
|
||||
linkStack.pop_back();
|
||||
|
||||
if(shapes.empty())
|
||||
if(shapes.empty())
|
||||
return shape;
|
||||
|
||||
// shape.Tag = tag;
|
||||
@@ -479,11 +479,11 @@ static TopoShape _getTopoShape(const App::DocumentObject *obj, const char *subna
|
||||
return shape;
|
||||
}
|
||||
|
||||
TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subname,
|
||||
bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner,
|
||||
TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subname,
|
||||
bool needSubElement, Base::Matrix4D *pmat, App::DocumentObject **powner,
|
||||
bool resolveLink, bool transform, bool noElementMap)
|
||||
{
|
||||
if(!obj || !obj->getNameInDocument())
|
||||
if(!obj || !obj->getNameInDocument())
|
||||
return TopoShape();
|
||||
|
||||
std::vector<App::DocumentObject*> linkStack;
|
||||
@@ -493,7 +493,7 @@ TopoShape Feature::getTopoShape(const App::DocumentObject *obj, const char *subn
|
||||
// to false. So we manually apply the top level transform if asked.
|
||||
|
||||
Base::Matrix4D mat;
|
||||
auto shape = _getTopoShape(obj, subname, needSubElement, &mat,
|
||||
auto shape = _getTopoShape(obj, subname, needSubElement, &mat,
|
||||
powner, resolveLink, noElementMap, linkStack);
|
||||
|
||||
Base::Matrix4D topMat;
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
DocumentObject *getSubObject(const char *subname, PyObject **pyObj,
|
||||
Base::Matrix4D *mat, bool transform, int depth) const override;
|
||||
|
||||
/** Convenience function to extract shape from fully qualified subname
|
||||
/** Convenience function to extract shape from fully qualified subname
|
||||
*
|
||||
* @param obj: the parent object
|
||||
*
|
||||
@@ -90,12 +90,12 @@ public:
|
||||
* if pmat already include obj's transformation matrix.
|
||||
*/
|
||||
static TopoDS_Shape getShape(const App::DocumentObject *obj,
|
||||
const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr,
|
||||
const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr,
|
||||
App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true);
|
||||
|
||||
static TopoShape getTopoShape(const App::DocumentObject *obj,
|
||||
const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr,
|
||||
App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true,
|
||||
const char *subname=nullptr, bool needSubElement=false, Base::Matrix4D *pmat=nullptr,
|
||||
App::DocumentObject **owner=nullptr, bool resolveLink=true, bool transform=true,
|
||||
bool noElementMap=false);
|
||||
|
||||
static void clearShapeCache();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="GeoFeaturePy"
|
||||
Name="PartFeaturePy"
|
||||
Twin="Feature"
|
||||
TwinPointer="Feature"
|
||||
Include="Mod/Part/App/PartFeature.h"
|
||||
Namespace="Part"
|
||||
Name="PartFeaturePy"
|
||||
Twin="Feature"
|
||||
TwinPointer="Feature"
|
||||
Include="Mod/Part/App/PartFeature.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="App/GeoFeaturePy.h"
|
||||
FatherNamespace="App">
|
||||
<Documentation>
|
||||
|
||||
@@ -44,5 +44,5 @@ PyObject *PartFeaturePy::getCustomAttributes(const char* ) const
|
||||
|
||||
int PartFeaturePy::setCustomAttributes(const char* , PyObject *)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="GeometrySurfacePy"
|
||||
Name="PlanePy"
|
||||
<PythonExport
|
||||
Father="GeometrySurfacePy"
|
||||
Name="PlanePy"
|
||||
PythonName="Part.Plane"
|
||||
Twin="GeomPlane"
|
||||
TwinPointer="GeomPlane"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometrySurfacePy.h"
|
||||
Twin="GeomPlane"
|
||||
TwinPointer="GeomPlane"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometrySurfacePy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -51,7 +51,7 @@ std::string PlanePy::representation() const
|
||||
|
||||
PyObject *PlanePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of PlanePy and the Twin object
|
||||
// create a new instance of PlanePy and the Twin object
|
||||
return new PlanePy(new GeomPlane);
|
||||
}
|
||||
|
||||
@@ -257,5 +257,5 @@ PyObject *PlanePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int PlanePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ std::string PlateSurfacePy::representation() const
|
||||
|
||||
PyObject *PlateSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of PlateSurfacePy and the Twin object
|
||||
// create a new instance of PlateSurfacePy and the Twin object
|
||||
return new PlateSurfacePy(new GeomPlateSurface);
|
||||
}
|
||||
|
||||
@@ -190,5 +190,5 @@ PyObject *PlateSurfacePy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int PlateSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="GeometryPy"
|
||||
Name="PointPy"
|
||||
<PythonExport
|
||||
Father="GeometryPy"
|
||||
Name="PointPy"
|
||||
PythonName="Part.Point"
|
||||
Twin="GeomPoint"
|
||||
TwinPointer="GeomPoint"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometryPy.h"
|
||||
Twin="GeomPoint"
|
||||
TwinPointer="GeomPoint"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/GeometryPy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
|
||||
@@ -45,20 +45,20 @@ std::string PointPy::representation() const
|
||||
{
|
||||
std::stringstream str;
|
||||
Base::Vector3d coords = getGeomPointPtr()->getPoint();
|
||||
str << "<Point (" << coords.x << "," << coords.y << "," << coords.z << ") >";
|
||||
str << "<Point (" << coords.x << "," << coords.y << "," << coords.z << ") >";
|
||||
return str.str();
|
||||
}
|
||||
|
||||
PyObject *PointPy::PyMake(struct _typeobject *, PyObject *, PyObject *) // Python wrapper
|
||||
{
|
||||
// create a new instance of PointPy and the Twin object
|
||||
// create a new instance of PointPy and the Twin object
|
||||
return new PointPy(new GeomPoint);
|
||||
}
|
||||
|
||||
// constructor method
|
||||
int PointPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
{
|
||||
|
||||
|
||||
if (PyArg_ParseTuple(args, "")) {
|
||||
// default point
|
||||
return 0;
|
||||
@@ -190,5 +190,5 @@ PyObject *PointPy::getCustomAttributes(const char* /*attr*/) const
|
||||
|
||||
int PointPy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ void PropertyGeometryList::set1Value(int idx, std::unique_ptr<Geometry> &&lValue
|
||||
if(idx>=(int)_lValueList.size())
|
||||
throw Base::IndexError("Index out of bound");
|
||||
aboutToSetValue();
|
||||
if(idx < 0)
|
||||
if(idx < 0)
|
||||
_lValueList.push_back(lValue.release());
|
||||
else {
|
||||
delete _lValueList[idx];
|
||||
|
||||
@@ -43,7 +43,7 @@ std::string RectangularTrimmedSurfacePy::representation() const
|
||||
|
||||
PyObject *RectangularTrimmedSurfacePy::PyMake(struct _typeobject *, PyObject *, PyObject *)
|
||||
{
|
||||
// create a new instance of RectangularTrimmedSurfacePy and the Twin object
|
||||
// create a new instance of RectangularTrimmedSurfacePy and the Twin object
|
||||
return new RectangularTrimmedSurfacePy(new GeomTrimmedSurface);
|
||||
}
|
||||
|
||||
@@ -126,5 +126,5 @@ PyObject *RectangularTrimmedSurfacePy::getCustomAttributes(const char* /*attr*/)
|
||||
|
||||
int RectangularTrimmedSurfacePy::setCustomAttributes(const char* /*attr*/, PyObject* /*obj*/)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ShapeFix_EdgeConnectPy"
|
||||
PythonName="Part.ShapeFix.EdgeConnect"
|
||||
Twin="ShapeFix_EdgeConnect"
|
||||
Twin="ShapeFix_EdgeConnect"
|
||||
TwinPointer="ShapeFix_EdgeConnect"
|
||||
Include="ShapeFix_EdgeConnect.hxx"
|
||||
Namespace="Part"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ShapeFix_EdgePy"
|
||||
PythonName="Part.ShapeFix.Edge"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
Name="ShapeFix_FaceConnectPy"
|
||||
PythonName="Part.ShapeFix.FaceConnect"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user