+ port to OCC 7.0

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

View File

@ -1,27 +1,27 @@
// SMESH SMESH_MeshVSLink : Connection of SMESH with MeshVS from OCC
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
// Module : SMESH
#ifndef _Handle_SMESH_MeshVSLink_HeaderFile
@ -33,6 +33,11 @@
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
#if OCC_VERSION_HEX < 0x070000
#ifndef _Handle_MeshVS_DataSource3D_HeaderFile
#include <Handle_MeshVS_DataSource3D.hxx>
#endif
@ -74,4 +79,5 @@ class Handle(SMESH_MeshVSLink) : public Handle(MeshVS_DataSource3D) {
Standard_EXPORT static const Handle(SMESH_MeshVSLink) DownCast(const Handle(Standard_Transient)& AnObject);
};
#endif // OCC_VERSION_HEX < 0x070000
#endif

View File

@ -38,6 +38,7 @@
#include "SMESH_Exception.hxx"
#include <Standard_Version.hxx>
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
@ -47,7 +48,9 @@
class SMESH_Gen;
class SMESHDS_Document;
class SMESH_Group;
#if OCC_VERSION_HEX < 0x070000
class TopTools_ListOfShape;
#endif
class SMESH_subMesh;
class SMESH_HypoFilter;
class TopoDS_Solid;

View File

@ -1,27 +1,27 @@
// SMESH SMESH_MeshVSLink : Connection of SMESH with MeshVS from OCC
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
// Module : SMESH
#ifndef _SMESH_MeshVSLink_HeaderFile
@ -36,11 +36,11 @@
#ifndef _TColStd_PackedMapOfInteger_HeaderFile
#include <TColStd_PackedMapOfInteger.hxx>
#endif
#ifndef _Handle_TColStd_HArray2OfInteger_HeaderFile
#include <Handle_TColStd_HArray2OfInteger.hxx>
#ifndef _TColStd_HArray2OfInteger_HeaderFile
#include <TColStd_HArray2OfInteger.hxx>
#endif
#ifndef _Handle_TColStd_HArray2OfReal_HeaderFile
#include <Handle_TColStd_HArray2OfReal.hxx>
#ifndef _TColStd_HArray2OfReal_HeaderFile
#include <TColStd_HArray2OfReal.hxx>
#endif
#ifndef _MeshVS_DataSource3D_HeaderFile
#include <MeshVS_DataSource3D.hxx>
@ -57,8 +57,8 @@
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Handle_TColStd_HArray1OfInteger_HeaderFile
#include <Handle_TColStd_HArray1OfInteger.hxx>
#ifndef _TColStd_HArray1OfInteger_HeaderFile
#include <TColStd_HArray1OfInteger.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
@ -66,7 +66,13 @@
#ifndef _SMESH_Mesh_HeaderFile
#include <SMESH_Mesh.hxx>
#endif
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
#if OCC_VERSION_HEX >= 0x070000
DEFINE_STANDARD_HANDLE(SMESH_MeshVSLink, MeshVS_DataSource3D)
#endif
class SMESH_MeshVSLink : public MeshVS_DataSource3D {
public:
@ -125,7 +131,11 @@ class SMESH_MeshVSLink : public MeshVS_DataSource3D {
// Type management
//
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
#if OCC_VERSION_HEX >= 0x070000
DEFINE_STANDARD_RTTIEXT(SMESH_MeshVSLink,MeshVS_DataSource3D)
#else
Standard_EXPORT const Handle(Standard_Type)& DynamicType() const;
#endif
protected:
// Methods PROTECTED

View File

@ -1,27 +1,27 @@
// SMESH SMESH_MeshVSLink : Connection of SMESH with MeshVS from OCC
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
// Module : SMESH
#include <SMESH_MeshVSLink.jxx>
@ -30,6 +30,11 @@
#include <Standard_TypeMismatch.hxx>
#endif
#ifndef _Standard_Version_HeaderFile
#include <Standard_Version.hxx>
#endif
#if OCC_VERSION_HEX < 0x070000
Standard_EXPORT Handle_Standard_Type& SMESH_MeshVSLink_Type_()
{
static Handle_Standard_Type aType1 = STANDARD_TYPE(MeshVS_DataSource3D);
@ -69,3 +74,4 @@ const Handle(Standard_Type)& SMESH_MeshVSLink::DynamicType() const
{
return STANDARD_TYPE(SMESH_MeshVSLink) ;
}
#endif

View File

@ -37,7 +37,9 @@
#include "SMESH_MesherHelper.hxx"
#if OCC_VERSION_HEX < 0x070000
class TopTools_IndexedMapOfShape;
#endif
typedef struct point3Dstruct
{

View File

@ -30,6 +30,7 @@
#include "SMESH_StdMeshers.hxx"
#include <TopTools_DataMapOfShapeShape.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS_Face.hxx>
@ -42,7 +43,6 @@ class SMDS_MeshNode;
class SMESH_Mesh;
class SMESH_Hypothesis;
class SMESH_subMesh;
class TopTools_IndexedDataMapOfShapeListOfShape;
/*!
* \brief Class encapsulating methods common to Projection algorithms

View File

@ -1,27 +1,27 @@
// SMESH SMESH_MeshVSLink : Connection of SMESH with MeshVS from OCC
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshVSLink.cxx
// Created : Mon Dec 1 09:00:00 2008
// Author : Sioutis Fotios
// Module : SMESH
//local headers
@ -40,58 +40,62 @@
#include <TColgp_Array1OfVec.hxx>
#include <TColStd_Array1OfReal.hxx>
#if OCC_VERSION_HEX >= 0x070000
IMPLEMENT_STANDARD_RTTIEXT(SMESH_MeshVSLink,MeshVS_DataSource3D)
#endif
#define MAX_SORT_NODE_COUNT 12
typedef std::map<double, int> T_Double_NodeID_Map;
//=======================================================================
//function : sortNodes
//purpose :
//=======================================================================
bool sortNodes (const SMDS_MeshElement* theTool, const int* idNodes, int theNodeCount, int *myResult)
{
if (theNodeCount < 3) return false;
//INITIAL VARS
TColgp_Array1OfXYZ myNodeList(1, theNodeCount);
TColgp_Array1OfVec myVectList(1, theNodeCount);
TColStd_Array1OfReal myAngleList(1, theNodeCount);
gp_XYZ BaryCenter(0.,0.,0.);
//int myResult[MAX_SORT_NODE_COUNT];
//INITIALIZE THE POINTS
for (int i = 1; i <= theNodeCount; i++ ) {
const SMDS_MeshNode *n = theTool->GetNode( idNodes[i-1] );
gp_XYZ aPoint(n->X(), n->Y(), n->Z());
myNodeList.SetValue(i, aPoint);
}
//CALCULATE THE BARYCENTER
for (int i = 1; i <= theNodeCount; i++ )
BaryCenter += myNodeList.Value(i);
BaryCenter /= theNodeCount;
//CREATE THE VECTORS
for (int i = 1; i <= theNodeCount; i++ ) {
gp_Vec aVector(BaryCenter, myNodeList.Value(i));
myVectList.SetValue(i, aVector);
}
//CALCULATE THE NORMAL USING FIRST THREE POINTS
gp_XYZ q1 = myNodeList.Value(2)-myNodeList.Value(1);
gp_XYZ q2 = myNodeList.Value(3)-myNodeList.Value(1);
gp_XYZ normal = q1 ^ q2;
double modul = normal.Modulus();
if ( modul > 0 )
normal /= modul;
//COUNT THE ANGLE OF THE FIRST WITH EACH
for (int i = 1; i <= theNodeCount; i++ )
myAngleList.SetValue(i, myVectList.Value(1).AngleWithRef(myVectList.Value(i), normal));
//CREATE THE RESULT MAP (WILL SORT THE VERTICES)
T_Double_NodeID_Map myMap;
for (int i = 1; i <= theNodeCount; i++ )
myMap.insert( make_pair(myAngleList.Value(i), idNodes[i-1]));
int resID = 0;
T_Double_NodeID_Map::iterator it;
//function : sortNodes
//purpose :
//=======================================================================
bool sortNodes (const SMDS_MeshElement* theTool, const int* idNodes, int theNodeCount, int *myResult)
{
if (theNodeCount < 3) return false;
//INITIAL VARS
TColgp_Array1OfXYZ myNodeList(1, theNodeCount);
TColgp_Array1OfVec myVectList(1, theNodeCount);
TColStd_Array1OfReal myAngleList(1, theNodeCount);
gp_XYZ BaryCenter(0.,0.,0.);
//int myResult[MAX_SORT_NODE_COUNT];
//INITIALIZE THE POINTS
for (int i = 1; i <= theNodeCount; i++ ) {
const SMDS_MeshNode *n = theTool->GetNode( idNodes[i-1] );
gp_XYZ aPoint(n->X(), n->Y(), n->Z());
myNodeList.SetValue(i, aPoint);
}
//CALCULATE THE BARYCENTER
for (int i = 1; i <= theNodeCount; i++ )
BaryCenter += myNodeList.Value(i);
BaryCenter /= theNodeCount;
//CREATE THE VECTORS
for (int i = 1; i <= theNodeCount; i++ ) {
gp_Vec aVector(BaryCenter, myNodeList.Value(i));
myVectList.SetValue(i, aVector);
}
//CALCULATE THE NORMAL USING FIRST THREE POINTS
gp_XYZ q1 = myNodeList.Value(2)-myNodeList.Value(1);
gp_XYZ q2 = myNodeList.Value(3)-myNodeList.Value(1);
gp_XYZ normal = q1 ^ q2;
double modul = normal.Modulus();
if ( modul > 0 )
normal /= modul;
//COUNT THE ANGLE OF THE FIRST WITH EACH
for (int i = 1; i <= theNodeCount; i++ )
myAngleList.SetValue(i, myVectList.Value(1).AngleWithRef(myVectList.Value(i), normal));
//CREATE THE RESULT MAP (WILL SORT THE VERTICES)
T_Double_NodeID_Map myMap;
for (int i = 1; i <= theNodeCount; i++ )
myMap.insert( make_pair(myAngleList.Value(i), idNodes[i-1]));
int resID = 0;
T_Double_NodeID_Map::iterator it;
for(it = myMap.begin(); it!= myMap.end(); ++it)
myResult[resID++] = it->second;
return true;
myResult[resID++] = it->second;
return true;
}
//END sortNodes CHANGE */
@ -105,38 +109,38 @@ SMESH_MeshVSLink::SMESH_MeshVSLink(const SMESH_Mesh *aMesh)
//add the nodes
SMDS_NodeIteratorPtr aNodeIter = myMesh->GetMeshDS()->nodesIterator();
for(;aNodeIter->more();) {
const SMDS_MeshNode* aNode = aNodeIter->next();
myNodes.Add( aNode->GetID() );
const SMDS_MeshNode* aNode = aNodeIter->next();
myNodes.Add( aNode->GetID() );
}
//add the edges
SMDS_EdgeIteratorPtr anEdgeIter = myMesh->GetMeshDS()->edgesIterator();
for(;anEdgeIter->more();) {
const SMDS_MeshEdge* anElem = anEdgeIter->next();
myElements.Add( anElem->GetID() );
for(;anEdgeIter->more();) {
const SMDS_MeshEdge* anElem = anEdgeIter->next();
myElements.Add( anElem->GetID() );
}
//add the faces
SMDS_FaceIteratorPtr aFaceIter = myMesh->GetMeshDS()->facesIterator();
for(;aFaceIter->more();) {
const SMDS_MeshFace* anElem = aFaceIter->next();
myElements.Add( anElem->GetID() );
}
//add the volumes
SMDS_VolumeIteratorPtr aVolumeIter = myMesh->GetMeshDS()->volumesIterator();
for(;aVolumeIter->more();) {
const SMDS_MeshVolume* anElem = aVolumeIter->next();
myElements.Add( anElem->GetID() );
}
//add the groups
const std::set<SMESHDS_GroupBase*>& groups = myMesh->GetMeshDS()->GetGroups();
if (!groups.empty()) {
std::set<SMESHDS_GroupBase*>::const_iterator GrIt = groups.begin();
for (; GrIt != groups.end(); GrIt++) {
SMESHDS_Group* grp = dynamic_cast<SMESHDS_Group*>(*GrIt);
if (!grp || grp->IsEmpty()) continue;
myGroups.Add(grp->GetID());
}
}
}
for(;aFaceIter->more();) {
const SMDS_MeshFace* anElem = aFaceIter->next();
myElements.Add( anElem->GetID() );
}
//add the volumes
SMDS_VolumeIteratorPtr aVolumeIter = myMesh->GetMeshDS()->volumesIterator();
for(;aVolumeIter->more();) {
const SMDS_MeshVolume* anElem = aVolumeIter->next();
myElements.Add( anElem->GetID() );
}
//add the groups
const std::set<SMESHDS_GroupBase*>& groups = myMesh->GetMeshDS()->GetGroups();
if (!groups.empty()) {
std::set<SMESHDS_GroupBase*>::const_iterator GrIt = groups.begin();
for (; GrIt != groups.end(); GrIt++) {
SMESHDS_Group* grp = dynamic_cast<SMESHDS_Group*>(*GrIt);
if (!grp || grp->IsEmpty()) continue;
myGroups.Add(grp->GetID());
}
}
}
//================================================================
// Function : GetGeom
@ -325,14 +329,14 @@ Standard_Boolean SMESH_MeshVSLink::GetNormal
if(!myElem) return Standard_False;
if(myElem->NbNodes() < 3) return Standard_False;
gp_XYZ normal;
gp_XYZ nodes[3];
for (int itr = 0;itr < 3;itr++)
nodes[itr] = gp_XYZ(myElem->GetNode(itr)->X(), myElem->GetNode(itr)->Y(), myElem->GetNode(itr)->Z());
normal = (nodes[1]-nodes[0]) ^ (nodes[2]-nodes[0]);
if ( normal.Modulus() > 0 )
normal /= normal.Modulus();
nx = normal.X();
ny = normal.Y();
nz = normal.Z();
gp_XYZ nodes[3];
for (int itr = 0;itr < 3;itr++)
nodes[itr] = gp_XYZ(myElem->GetNode(itr)->X(), myElem->GetNode(itr)->Y(), myElem->GetNode(itr)->Z());
normal = (nodes[1]-nodes[0]) ^ (nodes[2]-nodes[0]);
if ( normal.Modulus() > 0 )
normal /= normal.Modulus();
nx = normal.X();
ny = normal.Y();
nz = normal.Z();
return Standard_True;
}

View File

@ -35,6 +35,7 @@
#endif
#include <Standard_Failure.hxx>
#include <Expr_NamedUnknown.hxx>
#ifdef NO_CAS_CATCH
#include <Standard_ErrorHandler.hxx>

View File

@ -64,12 +64,11 @@
#include <BRep_Tool.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Handle_BRepAdaptor_HCompCurve.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <Approx_Curve3d.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Handle_BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Handle_Geom_BSplineCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>

View File

@ -62,12 +62,11 @@
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRepLib.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Handle_BRepAdaptor_HCompCurve.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <Approx_Curve3d.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Handle_BRepAdaptor_HCurve.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Handle_Geom_BSplineCurve.hxx>
#include <Geom_BezierCurve.hxx>
#include <GeomConvert_BSplineCurveToBezierCurve.hxx>
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
@ -99,13 +98,13 @@ ProjectionAlgos::ProjectionAlgos(const TopoDS_Shape &Input, const Base::Vector3d
ProjectionAlgos::~ProjectionAlgos()
{
}
/*
// no longer used, replaced invertY by adding
/*
// no longer used, replaced invertY by adding
// << " transform=\"scale(1,-1)\"" << endl
// to getSVG(...) below.
// invertY, as here, wasn't right for intended purpose - always reflected in model Y direction rather
// than SVG projection Y direction. Also better to reflect about (0,0,0) rather than bbox centre
// to getSVG(...) below.
// invertY, as here, wasn't right for intended purpose - always reflected in model Y direction rather
// than SVG projection Y direction. Also better to reflect about (0,0,0) rather than bbox centre
TopoDS_Shape ProjectionAlgos::invertY(const TopoDS_Shape& shape)
{
@ -120,20 +119,20 @@ TopoDS_Shape ProjectionAlgos::invertY(const TopoDS_Shape& shape)
BRepBuilderAPI_Transform mkTrf(shape, mat);
return mkTrf.Shape();
}
*/
*/
//added by tanderson. aka blobfish.
//projection algorithms build a 2d curve(pcurve) but no 3d curve.
//this causes problems with meshing algorithms after save and load.
static const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape)
{
TopExp_Explorer it;
for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next())
BRepLib::BuildCurve3d(TopoDS::Edge(it.Current()));
return shape;
}
//added by tanderson. aka blobfish.
//projection algorithms build a 2d curve(pcurve) but no 3d curve.
//this causes problems with meshing algorithms after save and load.
static const TopoDS_Shape& build3dCurves(const TopoDS_Shape &shape)
{
TopExp_Explorer it;
for (it.Init(shape, TopAbs_EDGE); it.More(); it.Next())
BRepLib::BuildCurve3d(TopoDS::Edge(it.Current()));
return shape;
}
void ProjectionAlgos::execute(void)
{
Handle( HLRBRep_Algo ) brep_hlr = new HLRBRep_Algo;
@ -146,20 +145,20 @@ void ProjectionAlgos::execute(void)
brep_hlr->Hide();
// extracting the result sets:
HLRBRep_HLRToShape shapes( brep_hlr );
V = build3dCurves(shapes.VCompound ());// hard edge visibly
V1 = build3dCurves(shapes.Rg1LineVCompound());// Smoth edges visibly
VN = build3dCurves(shapes.RgNLineVCompound());// contour edges visibly
VO = build3dCurves(shapes.OutLineVCompound());// contours apparents visibly
VI = build3dCurves(shapes.IsoLineVCompound());// isoparamtriques visibly
H = build3dCurves(shapes.HCompound ());// hard edge invisibly
H1 = build3dCurves(shapes.Rg1LineHCompound());// Smoth edges invisibly
HN = build3dCurves(shapes.RgNLineHCompound());// contour edges invisibly
HO = build3dCurves(shapes.OutLineHCompound());// contours apparents invisibly
HI = build3dCurves(shapes.IsoLineHCompound());// isoparamtriques invisibly
}
HLRBRep_HLRToShape shapes( brep_hlr );
V = build3dCurves(shapes.VCompound ());// hard edge visibly
V1 = build3dCurves(shapes.Rg1LineVCompound());// Smoth edges visibly
VN = build3dCurves(shapes.RgNLineVCompound());// contour edges visibly
VO = build3dCurves(shapes.OutLineVCompound());// contours apparents visibly
VI = build3dCurves(shapes.IsoLineVCompound());// isoparamtriques visibly
H = build3dCurves(shapes.HCompound ());// hard edge invisibly
H1 = build3dCurves(shapes.Rg1LineHCompound());// Smoth edges invisibly
HN = build3dCurves(shapes.RgNLineHCompound());// contour edges invisibly
HO = build3dCurves(shapes.OutLineHCompound());// contours apparents invisibly
HI = build3dCurves(shapes.IsoLineHCompound());// isoparamtriques invisibly
}
std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double tolerance, double hiddenscale)
{
std::stringstream result;

View File

@ -29,8 +29,8 @@
# include <Python.h>
# include <climits>
# include <Standard_Version.hxx>
# include <Handle_TDocStd_Document.hxx>
# include <Handle_XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <STEPCAFControl_Reader.hxx>

View File

@ -29,8 +29,8 @@
# include <climits>
# include <Standard_Version.hxx>
# include <BRep_Builder.hxx>
# include <Handle_TDocStd_Document.hxx>
# include <Handle_XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <XCAFDoc_DocumentTool.hxx>

View File

@ -24,9 +24,9 @@
#ifndef IMPORT_IMPORTOCAF_H
#define IMPORT_IMPORTOCAF_H
#include <Handle_TDocStd_Document.hxx>
#include <Handle_XCAFDoc_ColorTool.hxx>
#include <Handle_XCAFDoc_ShapeTool.hxx>
#include <TDocStd_Document.hxx>
#include <XCAFDoc_ColorTool.hxx>
#include <XCAFDoc_ShapeTool.hxx>
#include <Quantity_Color.hxx>
#include <TopoDS_Shape.hxx>
#include <climits>

View File

@ -31,8 +31,8 @@
# include <QString>
# include <Standard_Version.hxx>
# include <BRep_Builder.hxx>
# include <Handle_TDocStd_Document.hxx>
# include <Handle_XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <TDocStd_Document.hxx>
# include <XCAFApp_Application.hxx>
# include <XCAFDoc_DocumentTool.hxx>

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>

View File

@ -40,10 +40,9 @@
# include <Geom_CylindricalSurface.hxx>
# include <Geom_Circle.hxx>
# include <Geom2d_Line.hxx>
# include <Handle_Geom_Curve.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Handle_Geom_Plane.hxx>
# include <Handle_Geom2d_Line.hxx>
# include <Geom_Curve.hxx>
# include <Geom_Surface.hxx>
# include <Geom2d_Line.hxx>
# include <GeomAPI_IntCS.hxx>
# include <GeomAPI_IntSS.hxx>
# include <GeomAPI_ExtremaCurveCurve.hxx>

View File

@ -33,7 +33,7 @@
# include <BRepBuilderAPI_Copy.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <Geom_Plane.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Geom_Surface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Face.hxx>
# include <TopoDS_Wire.hxx>

View File

@ -28,7 +28,7 @@
# include <BRepBndLib.hxx>
# include <BRepFeat_MakePrism.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Geom_Surface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Solid.hxx>
# include <TopoDS_Face.hxx>

View File

@ -28,7 +28,7 @@
# include <BRepBndLib.hxx>
# include <BRepFeat_MakePrism.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Geom_Surface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Solid.hxx>
# include <TopoDS_Face.hxx>

View File

@ -32,7 +32,7 @@
# include <BRepFeat_MakePrism.hxx>
# include <BRepBuilderAPI_MakeFace.hxx>
# include <Geom_Plane.hxx>
# include <Handle_Geom_Surface.hxx>
# include <Geom_Surface.hxx>
# include <TopoDS.hxx>
# include <TopoDS_Face.hxx>
# include <TopoDS_Wire.hxx>

View File

@ -42,10 +42,9 @@
#include <gp_Lin.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_CompCurve.hxx>
#include <Handle_BRepAdaptor_HCompCurve.hxx>
#include <BRepAdaptor_HCompCurve.hxx>
#include <Approx_Curve3d.hxx>
#include <BRepAdaptor_HCurve.hxx>
#include <Handle_BRepAdaptor_HCurve.hxx>
using namespace Path;

View File

@ -25,7 +25,7 @@
#ifndef _PreComp_
# include <Python.h>
# include <TColgp_Array1OfPnt.hxx>
# include <Handle_Geom_BSplineSurface.hxx>
# include <Geom_BSplineSurface.hxx>
#endif
#include <Base/Console.h>

View File

@ -29,7 +29,7 @@
#include <TColgp_Array1OfPnt.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <Handle_Geom_BSplineSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <math_Matrix.hxx>
#include <Base/Vector3D.h>

View File

@ -25,7 +25,7 @@
#define REEN_BSPLINEFITTING_H
#if defined(HAVE_PCL_OPENNURBS)
#include <Handle_Geom_BSplineSurface.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Base/Vector3D.h>
#include <vector>

View File

@ -69,7 +69,6 @@
#include <TColgp_Array2OfPnt.hxx>
#include <TColgp_Array1OfPnt2d.hxx>
#include <Geom_BSplineSurface.hxx>
#include <Handle_Geom_BSplineSurface.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <TopoDS_Face.hxx>

View File

@ -22,11 +22,10 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <BRepPrimAPI_MakeBox.hxx>
# include <TopoDS_Face.hxx>
#ifndef _PreComp_
# include <BRepPrimAPI_MakeBox.hxx>
# include <TopoDS_Face.hxx>
# include <Geom_Plane.hxx>
# include <Handle_Geom_Plane.hxx>
#endif
#include <Base/Console.h>
@ -64,11 +63,11 @@ public:
private:
Py::Object open(const Py::Tuple& args)
{
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
char* Name;
if (!PyArg_ParseTuple(args.ptr(), "et","utf-8",&Name))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
//Base::Console().Log("Open in Part with %s",Name);
Base::FileInfo file(EncodedName.c_str());
@ -83,12 +82,12 @@ private:
Py::Object insert(const Py::Tuple& args)
{
char* Name;
const char* DocName;
if (!PyArg_ParseTuple(args.ptr(), "ets","utf-8",&Name,&DocName))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
char* Name;
const char* DocName;
if (!PyArg_ParseTuple(args.ptr(), "ets","utf-8",&Name,&DocName))
throw Py::Exception();
std::string EncodedName = std::string(Name);
PyMem_Free(Name);
try {
//Base::Console().Log("Insert in Part with %s",Name);