Port to occ7.2:
+ replace Quantity_Parameter with Standard_Real is it's marked deprecated + include NCollection_Vector as it's needed by STEPCAFControl_Writer + remove GC_MakeConicalSurface used for cone and distance as this was never implemented in any earlier occ version and has been removed now
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
# include <Python.h>
|
||||
# include <climits>
|
||||
# include <Standard_Version.hxx>
|
||||
# include <NCollection_Vector.hxx>
|
||||
# include <TDocStd_Document.hxx>
|
||||
# include <XCAFApp_Application.hxx>
|
||||
# include <TDocStd_Document.hxx>
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef _PreComp_
|
||||
# include <gp_Trsf.hxx>
|
||||
# include <gp_Ax1.hxx>
|
||||
# include <NCollection_Vector.hxx>
|
||||
# include <BRepBuilderAPI_MakeShape.hxx>
|
||||
# include <BRepAlgoAPI_Fuse.hxx>
|
||||
# include <BRepAlgoAPI_Common.hxx>
|
||||
@@ -593,7 +594,7 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector<App::Color>& co
|
||||
aShapeTool->SetShape(faceLabel, xp.Current());
|
||||
|
||||
const App::Color& color = colors[index-1];
|
||||
Quantity_Parameter mat[3];
|
||||
Standard_Real mat[3];
|
||||
mat[0] = color.r;
|
||||
mat[1] = color.g;
|
||||
mat[2] = color.b;
|
||||
@@ -605,7 +606,7 @@ int ExportOCAF::saveShape(Part::Feature* part, const std::vector<App::Color>& co
|
||||
}
|
||||
else if (!colors.empty()) {
|
||||
App::Color color = colors.front();
|
||||
Quantity_Parameter mat[3];
|
||||
Standard_Real mat[3];
|
||||
mat[0] = color.r;
|
||||
mat[1] = color.g;
|
||||
mat[2] = color.b;
|
||||
@@ -681,7 +682,7 @@ void ExportOCAF::reallocateFreeShape(std::vector <App::DocumentObject*> hierarch
|
||||
// TDF_Label faceLabel= TDF_TagSource::NewChild(label);
|
||||
aShapeTool->SetShape(faceLabel, xp.Current());
|
||||
const App::Color& color = colors[index-1];
|
||||
Quantity_Parameter mat[3];
|
||||
Standard_Real mat[3];
|
||||
mat[0] = color.r;
|
||||
mat[1] = color.g;
|
||||
mat[2] = color.b;
|
||||
@@ -694,7 +695,7 @@ void ExportOCAF::reallocateFreeShape(std::vector <App::DocumentObject*> hierarch
|
||||
}
|
||||
else if (!colors.empty()) {
|
||||
App::Color color = colors.front();
|
||||
Quantity_Parameter mat[3];
|
||||
Standard_Real mat[3];
|
||||
mat[0] = color.r;
|
||||
mat[1] = color.g;
|
||||
mat[2] = color.b;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
# include <climits>
|
||||
# include <QString>
|
||||
# include <Standard_Version.hxx>
|
||||
# include <NCollection_Vector.hxx>
|
||||
# include <BRep_Builder.hxx>
|
||||
# include <TDocStd_Document.hxx>
|
||||
# include <XCAFApp_Application.hxx>
|
||||
|
||||
@@ -123,26 +123,6 @@ int ConePy::PyInit(PyObject* args, PyObject* kwds)
|
||||
}
|
||||
|
||||
PyObject *pCone;
|
||||
double dist;
|
||||
static char* keywords_cd[] = {"Cone","Distance",NULL};
|
||||
PyErr_Clear();
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!d", keywords_cd,
|
||||
&(ConePy::Type), &pCone, &dist)) {
|
||||
ConePy* pcCone = static_cast<ConePy*>(pCone);
|
||||
Handle(Geom_ConicalSurface) pcone = Handle(Geom_ConicalSurface)::DownCast
|
||||
(pcCone->getGeometryPtr()->handle());
|
||||
GC_MakeConicalSurface mc(pcone->Cone(), dist);
|
||||
if (!mc.IsDone()) {
|
||||
PyErr_SetString(PartExceptionOCCError, gce_ErrorStatusText(mc.Status()));
|
||||
return -1;
|
||||
}
|
||||
|
||||
Handle(Geom_ConicalSurface) cone = Handle(Geom_ConicalSurface)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
cone->SetCone(mc.Value()->Cone());
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char* keywords_c[] = {"Cone",NULL};
|
||||
PyErr_Clear();
|
||||
if (PyArg_ParseTupleAndKeywords(args, kwds, "O!d", keywords_c,
|
||||
|
||||
Reference in New Issue
Block a user