+ port to OCC 7.0

This commit is contained in:
wmayer
2016-05-14 16:53:27 +02:00
parent 8200432a3d
commit cb73d010bb
44 changed files with 380 additions and 323 deletions

View File

@@ -57,9 +57,9 @@
# include <Geom_CylindricalSurface.hxx>
# include <Geom_OffsetSurface.hxx>
# include <GeomAPI_PointsToBSplineSurface.hxx>
# include <Handle_Geom_Circle.hxx>
# include <Handle_Geom_Plane.hxx>
# include <Handle_Geom2d_TrimmedCurve.hxx>
# include <Geom_Circle.hxx>
# include <Geom_Plane.hxx>
# include <Geom2d_TrimmedCurve.hxx>
# include <Interface_Static.hxx>
# include <ShapeUpgrade_ShellSewing.hxx>
# include <Standard_ConstructionError.hxx>

View File

@@ -32,7 +32,7 @@
# include <TColgp_Array1OfPnt.hxx>
# include <TColgp_HArray1OfPnt.hxx>
# include <TColStd_Array1OfInteger.hxx>
# include <Handle_TColgp_HArray1OfPnt.hxx>
# include <TColgp_HArray1OfPnt.hxx>
# include <Precision.hxx>
#endif

View File

@@ -25,7 +25,7 @@
#ifndef _PreComp_
# include <Geom_BSplineCurve.hxx>
# include <Geom_BSplineSurface.hxx>
# include <Handle_Geom_BSplineCurve.hxx>
# include <Geom_BSplineCurve.hxx>
# include <TColStd_Array1OfReal.hxx>
# include <TColStd_Array2OfReal.hxx>
# include <TColStd_Array1OfInteger.hxx>

View File

@@ -25,7 +25,7 @@
#ifndef _PreComp_
# include <Geom_BezierCurve.hxx>
# include <Geom_BezierSurface.hxx>
# include <Handle_Geom_BezierCurve.hxx>
# include <Geom_BezierCurve.hxx>
# include <TColStd_Array1OfReal.hxx>
# include <TColStd_Array2OfReal.hxx>
# include <TColgp_Array1OfPnt.hxx>

View File

@@ -65,7 +65,7 @@ int ConePy::PyInit(PyObject* args, PyObject* kwds)
{
char* keywords_n[] = {NULL};
if (PyArg_ParseTupleAndKeywords(args, kwds, "", keywords_n)) {
const Handle_Geom_ConicalSurface& s = static_cast<const Handle_Geom_ConicalSurface&>
Handle(Geom_ConicalSurface) s = Handle(Geom_ConicalSurface)::DownCast
(getGeometryPtr()->handle());
s->SetRadius(1.0);
return 0;

View File

@@ -25,10 +25,10 @@
#define PART_CROSSSECTION_H
#include <list>
#include <TopTools_IndexedMapOfShape.hxx>
class TopoDS_Shape;
class TopoDS_Wire;
class TopTools_IndexedMapOfShape;
namespace Part {

View File

@@ -31,7 +31,7 @@
# include <BRepBuilderAPI_MakeFace.hxx>
# include <BRepAdaptor_Surface.hxx>
# include <Geom_Plane.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Geom_Surface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Compound.hxx>
# include <TopoDS_Face.hxx>

View File

@@ -24,29 +24,29 @@
#ifndef PART_GEOMETRY_H
#define PART_GEOMETRY_H
#include <Handle_Geom_CartesianPoint.hxx>
#include <Handle_Geom_BezierCurve.hxx>
#include <Handle_Geom_BSplineCurve.hxx>
#include <Handle_Geom_Circle.hxx>
#include <Handle_Geom_Ellipse.hxx>
#include <Handle_Geom_Hyperbola.hxx>
#include <Handle_Geom_Parabola.hxx>
#include <Handle_Geom_Line.hxx>
#include <Handle_Geom_OffsetCurve.hxx>
#include <Handle_Geom_TrimmedCurve.hxx>
#include <Handle_Geom_Surface.hxx>
#include <Handle_Geom_BezierSurface.hxx>
#include <Handle_Geom_BSplineSurface.hxx>
#include <Handle_Geom_CylindricalSurface.hxx>
#include <Handle_Geom_ConicalSurface.hxx>
#include <Handle_Geom_SphericalSurface.hxx>
#include <Handle_Geom_ToroidalSurface.hxx>
#include <Handle_Geom_Plane.hxx>
#include <Handle_Geom_OffsetSurface.hxx>
#include <Handle_GeomPlate_Surface.hxx>
#include <Handle_Geom_RectangularTrimmedSurface.hxx>
#include <Handle_Geom_SurfaceOfRevolution.hxx>
#include <Handle_Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom_BezierCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_Circle.hxx>
#include <Geom_Ellipse.hxx>
#include <Geom_Hyperbola.hxx>
#include <Geom_Parabola.hxx>
#include <Geom_Line.hxx>
#include <Geom_OffsetCurve.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Surface.hxx>
#include <Geom_BezierSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_ConicalSurface.hxx>
#include <Geom_SphericalSurface.hxx>
#include <Geom_ToroidalSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_OffsetSurface.hxx>
#include <GeomPlate_Surface.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <GeomPlate_BuildPlateSurface.hxx>
#include <Plate_Plate.hxx>
#include <TopoDS_Shape.hxx>

View File

@@ -43,8 +43,8 @@
# include <GeomAdaptor_Curve.hxx>
# include <GeomFill.hxx>
# include <GeomLProp_CLProps.hxx>
# include <Handle_Geom_RectangularTrimmedSurface.hxx>
# include <Handle_Geom_BSplineSurface.hxx>
# include <Geom_RectangularTrimmedSurface.hxx>
# include <Geom_BSplineSurface.hxx>
# include <Precision.hxx>
# include <GeomAPI_ProjectPointOnCurve.hxx>
# include <GeomConvert_ApproxCurve.hxx>

View File

@@ -36,15 +36,15 @@
# include <TopoDS_Compound.hxx>
# include <TopExp_Explorer.hxx>
# include <Message_MsgFile.hxx>
# include <Handle_TColStd_HSequenceOfTransient.hxx>
# include <TColStd_HSequenceOfTransient.hxx>
# include <TColStd_HSequenceOfTransient.hxx>
# include <IGESBasic_Group.hxx>
# include <IGESSolid_ManifoldSolid.hxx>
# include <IGESBasic_SingularSubfigure.hxx>
#endif
#include <Handle_XSControl_WorkSession.hxx>
#include <Handle_XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
#include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
#include <XSControl_TransferReader.hxx>
#include <Transfer_TransientProcess.hxx>

View File

@@ -38,8 +38,9 @@
# include <sstream>
#endif
#include <Handle_XSControl_WorkSession.hxx>
#include <Handle_XSControl_TransferReader.hxx>
#include <Standard_Version.hxx>
#include <XSControl_WorkSession.hxx>
#include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
#include <XSControl_TransferReader.hxx>
#include <Transfer_TransientProcess.hxx>
@@ -48,8 +49,8 @@
#include <TColStd_HSequenceOfTransient.hxx>
#include <STEPConstruct.hxx>
#include <StepVisual_StyledItem.hxx>
#include <Handle_StepShape_ShapeRepresentation.hxx>
#include <Handle_StepVisual_PresentationStyleByContext.hxx>
#include <StepShape_ShapeRepresentation.hxx>
#include <StepVisual_PresentationStyleByContext.hxx>
#include <StepVisual_StyleContextSelect.hxx>
#include <StepVisual_PresentationStyleByContext.hxx>
#include <Interface_EntityIterator.hxx>
@@ -57,15 +58,15 @@
#include <StepShape_ShapeDefinitionRepresentation.hxx>
#include <StepRepr_CharacterizedDefinition.hxx>
#include <StepRepr_ProductDefinitionShape.hxx>
#include <Handle_StepRepr_AssemblyComponentUsage.hxx>
#include <StepRepr_AssemblyComponentUsage.hxx>
#include <StepRepr_AssemblyComponentUsage.hxx>
#include <StepRepr_SpecifiedHigherUsageOccurrence.hxx>
#include <Quantity_Color.hxx>
#include <TCollection_ExtendedString.hxx>
#include <StepBasic_Product.hxx>
#include <Handle_StepBasic_Product.hxx>
#include <StepBasic_Product.hxx>
#include <StepBasic_ProductDefinition.hxx>
#include <StepBasic_ProductDefinition.hxx>
#include <Handle_StepBasic_ProductDefinition.hxx>
#include <StepBasic_ProductDefinitionFormation.hxx>
#include <Base/Console.h>
@@ -253,6 +254,9 @@ static void findStyledSR (const Handle(StepVisual_StyledItem) &style,
bool Part::ReadColors (const Handle(XSControl_WorkSession) &WS, std::map<int, Quantity_Color>& hash_col)
{
#if OCC_VERSION_HEX >= 0x070000
return Standard_False;
#else
STEPConstruct_Styles Styles (WS);
if (!Styles.LoadStyles()) {
#ifdef FC_DEBUG
@@ -311,8 +315,8 @@ bool Part::ReadColors (const Handle(XSControl_WorkSession) &WS, std::map<int, Qu
if (aSDR.IsNull())
continue;
StepRepr_RepresentedDefinition aPDSselect = aSDR->Definition();
Handle_StepRepr_ProductDefinitionShape PDS =
Handle_StepRepr_ProductDefinitionShape::DownCast(aPDSselect.PropertyDefinition());
Handle(StepRepr_ProductDefinitionShape) PDS =
Handle(StepRepr_ProductDefinitionShape)::DownCast(aPDSselect.PropertyDefinition());
if (PDS.IsNull())
continue;
StepRepr_CharacterizedDefinition aCharDef = PDS->Definition();
@@ -324,8 +328,8 @@ bool Part::ReadColors (const Handle(XSControl_WorkSession) &WS, std::map<int, Qu
isSkipSHUOstyle = Standard_True;
break;
}
Handle_StepRepr_NextAssemblyUsageOccurrence NAUO =
Handle_StepRepr_NextAssemblyUsageOccurrence::DownCast(ACU);
Handle(StepRepr_NextAssemblyUsageOccurrence) NAUO =
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(ACU);
if (NAUO.IsNull())
continue;
@@ -377,10 +381,14 @@ bool Part::ReadColors (const Handle(XSControl_WorkSession) &WS, std::map<int, Qu
}
return Standard_True;
#endif
}
bool Part::ReadNames (const Handle(XSControl_WorkSession) &WS)
{
#if OCC_VERSION_HEX >= 0x070000
return Standard_False;
#else
// get starting data
Handle(Interface_InterfaceModel) Model = WS->Model();
Handle(XSControl_TransferReader) TR = WS->TransferReader();
@@ -437,4 +445,5 @@ bool Part::ReadNames (const Handle(XSControl_WorkSession) &WS)
}
return Standard_True;
#endif
}

View File

@@ -41,7 +41,7 @@
# include <TopExp_Explorer.hxx>
# include <TopoDS.hxx>
# include <Precision.hxx>
# include <Handle_Adaptor3d_HCurve.hxx>
# include <Adaptor3d_HCurve.hxx>
#endif

View File

@@ -49,10 +49,10 @@
# include <Geom_CylindricalSurface.hxx>
# include <Geom2d_Line.hxx>
# include <Geom2d_TrimmedCurve.hxx>
# include <Handle_Geom_Plane.hxx>
# include <Handle_Geom_CylindricalSurface.hxx>
# include <Handle_Geom2d_Line.hxx>
# include <Handle_Geom2d_TrimmedCurve.hxx>
# include <Geom_Plane.hxx>
# include <Geom_CylindricalSurface.hxx>
# include <Geom2d_Line.hxx>
# include <Geom2d_TrimmedCurve.hxx>
# include <Precision.hxx>
# include <Standard_Real.hxx>
# include <TopoDS.hxx>

View File

@@ -26,6 +26,7 @@
# include <gp_Pln.hxx>
# include <gp_Lin.hxx>
# include <Adaptor3d_HCurveOnSurface.hxx>
# include <Geom_BSplineSurface.hxx>
# include <Geom_Plane.hxx>
# include <GeomAdaptor_HCurve.hxx>
# include <GeomAPI_IntSS.hxx>

View File

@@ -28,11 +28,11 @@
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_XYZ.hxx>
#include <Handle_Geom_Surface.hxx>
#include <Geom_Surface.hxx>
#include <TColStd_ListOfTransient.hxx>
class gp_Lin;
class gp_Pln;
class TColStd_ListOfTransient;
namespace Base {
// Specialization for gp_Pnt

View File

@@ -90,9 +90,9 @@
# include <GeomFill_SectionLaw.hxx>
# include <GeomFill_Sweep.hxx>
# include <GeomLib.hxx>
# include <Handle_Law_BSpFunc.hxx>
# include <Handle_Law_BSpline.hxx>
# include <Handle_TopTools_HSequenceOfShape.hxx>
# include <Law_BSpFunc.hxx>
# include <Law_BSpline.hxx>
# include <TopTools_HSequenceOfShape.hxx>
# include <Law_BSpFunc.hxx>
# include <Law_Constant.hxx>
# include <Law_Linear.hxx>
@@ -473,6 +473,29 @@ void TopoShape::convertTogpTrsf(const Base::Matrix4D& mtrx, gp_Trsf& trsf)
void TopoShape::convertToMatrix(const gp_Trsf& trsf, Base::Matrix4D& mtrx)
{
#if OCC_VERSION_HEX >= 0x070000
gp_Mat m = trsf.VectorialPart();
gp_XYZ p = trsf.TranslationPart();
Standard_Real scale = trsf.ScaleFactor();
// set Rotation matrix
mtrx[0][0] = scale * m(0,0);
mtrx[0][1] = scale * m(0,1);
mtrx[0][2] = scale * m(0,2);
mtrx[1][0] = scale * m(1,0);
mtrx[1][1] = scale * m(1,1);
mtrx[1][2] = scale * m(1,2);
mtrx[2][0] = scale * m(2,0);
mtrx[2][1] = scale * m(2,1);
mtrx[2][2] = scale * m(2,2);
// set pos vector
mtrx[0][3] = p.X();
mtrx[1][3] = p.Y();
mtrx[2][3] = p.Z();
#else
gp_Mat m = trsf._CSFDB_Getgp_Trsfmatrix();
gp_XYZ p = trsf._CSFDB_Getgp_Trsfloc();
Standard_Real scale = trsf._CSFDB_Getgp_Trsfscale();
@@ -494,6 +517,7 @@ void TopoShape::convertToMatrix(const gp_Trsf& trsf, Base::Matrix4D& mtrx)
mtrx[0][3] = p._CSFDB_Getgp_XYZx();
mtrx[1][3] = p._CSFDB_Getgp_XYZy();
mtrx[2][3] = p._CSFDB_Getgp_XYZz();
#endif
}
void TopoShape::setTransform(const Base::Matrix4D& rclTrf)
@@ -682,9 +706,9 @@ void TopoShape::importBinary(std::istream& str)
theShapeSet.Read(str);
Standard_Integer shapeId=0, locId=0, orient=0;
BinTools::GetInteger(str, shapeId);
if (shapeId <= 0 || shapeId > theShapeSet.NbShapes())
return;
if (shapeId <= 0 || shapeId > theShapeSet.NbShapes())
return;
BinTools::GetInteger(str, locId);
BinTools::GetInteger(str, orient);
TopAbs_Orientation anOrient = static_cast<TopAbs_Orientation>(orient);

View File

@@ -41,7 +41,7 @@
# include <Geom_RectangularTrimmedSurface.hxx>
# include <Geom_SphericalSurface.hxx>
# include <Geom_ToroidalSurface.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Geom_Surface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Face.hxx>
# include <TopoDS_Wire.hxx>

View File

@@ -30,8 +30,6 @@
#include <GC_MakeArcOfCircle.hxx>
#include <Geom_Circle.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Handle_Geom_Circle.hxx>
#include <Handle_Geom_TrimmedCurve.hxx>
#include <Inventor/SoPickedPoint.h>
#include <Inventor/events/SoMouseButtonEvent.h>
#endif

View File

@@ -45,7 +45,6 @@
# include <GeomAPI_ProjectPointOnSurf.hxx>
# include <GeomLProp_SLProps.hxx>
# include <gp_Trsf.hxx>
# include <Handle_Poly_Triangulation.hxx>
# include <Poly_Array1OfTriangle.hxx>
# include <Poly_Triangulation.hxx>
# include <Poly_Connect.hxx>