From bca7a1866e596ad2e318809f35b6d08776226a69 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 14 May 2016 16:53:27 +0200 Subject: [PATCH] + port to OCC 7.0 --- .../inc/Handle_SMESH_MeshVSLink.hxx | 52 +++-- src/3rdParty/salomesmesh/inc/SMESH_Mesh.hxx | 3 + .../salomesmesh/inc/SMESH_MeshVSLink.hxx | 70 +++--- .../salomesmesh/inc/SMESH_MeshVSLink.ixx | 52 +++-- .../salomesmesh/inc/StdMeshers_Hexa_3D.hxx | 2 + .../inc/StdMeshers_ProjectionUtils.hxx | 2 +- .../src/SMESH/SMESH_MeshVSLink.cpp | 212 +++++++++--------- .../StdMeshers/StdMeshers_Distribution.cpp | 1 + src/Mod/Drawing/App/DrawingExport.cpp | 5 +- src/Mod/Drawing/App/ProjectionAlgos.cpp | 71 +++--- src/Mod/Import/App/AppImportPy.cpp | 4 +- src/Mod/Import/App/ImportOCAF.cpp | 4 +- src/Mod/Import/App/ImportOCAF.h | 6 +- src/Mod/Import/Gui/AppImportGuiPy.cpp | 4 +- src/Mod/Part/App/AppPartPy.cpp | 6 +- src/Mod/Part/App/BSplineCurvePyImp.cpp | 2 +- src/Mod/Part/App/BSplineSurfacePyImp.cpp | 2 +- src/Mod/Part/App/BezierSurfacePyImp.cpp | 2 +- src/Mod/Part/App/ConePyImp.cpp | 2 +- src/Mod/Part/App/CrossSection.h | 2 +- src/Mod/Part/App/FeatureFace.cpp | 2 +- src/Mod/Part/App/Geometry.h | 46 ++-- src/Mod/Part/App/GeometryCurvePyImp.cpp | 4 +- src/Mod/Part/App/ImportIges.cpp | 6 +- src/Mod/Part/App/ImportStep.cpp | 31 ++- src/Mod/Part/App/PartFeatures.cpp | 2 +- src/Mod/Part/App/PrimitiveFeature.cpp | 8 +- src/Mod/Part/App/Tools.cpp | 1 + src/Mod/Part/App/Tools.h | 4 +- src/Mod/Part/App/TopoShape.cpp | 36 ++- src/Mod/Part/App/TopoShapeFacePyImp.cpp | 2 +- src/Mod/Part/Gui/DlgPrimitives.cpp | 2 - src/Mod/Part/Gui/ViewProviderExt.cpp | 1 - src/Mod/PartDesign/App/DatumPoint.cpp | 7 +- src/Mod/PartDesign/App/FeatureHole.cpp | 2 +- src/Mod/PartDesign/App/FeaturePad.cpp | 2 +- src/Mod/PartDesign/App/FeaturePipe.cpp | 2 +- src/Mod/PartDesign/App/FeaturePocket.cpp | 2 +- src/Mod/Path/App/FeaturePathShape.cpp | 3 +- .../App/AppReverseEngineering.cpp | 2 +- .../ReverseEngineering/App/ApproxSurface.h | 2 +- .../ReverseEngineering/App/BSplineFitting.h | 2 +- src/Mod/ReverseEngineering/App/PreCompiled.h | 1 - src/Mod/Sketcher/App/AppSketcherPy.cpp | 29 ++- 44 files changed, 380 insertions(+), 323 deletions(-) diff --git a/src/3rdParty/salomesmesh/inc/Handle_SMESH_MeshVSLink.hxx b/src/3rdParty/salomesmesh/inc/Handle_SMESH_MeshVSLink.hxx index 76370d94878a..dc29a000809f 100644 --- a/src/3rdParty/salomesmesh/inc/Handle_SMESH_MeshVSLink.hxx +++ b/src/3rdParty/salomesmesh/inc/Handle_SMESH_MeshVSLink.hxx @@ -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 #endif +#ifndef _Standard_Version_HeaderFile +#include +#endif + +#if OCC_VERSION_HEX < 0x070000 #ifndef _Handle_MeshVS_DataSource3D_HeaderFile #include #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 diff --git a/src/3rdParty/salomesmesh/inc/SMESH_Mesh.hxx b/src/3rdParty/salomesmesh/inc/SMESH_Mesh.hxx index bb65e782120f..629c4185df89 100644 --- a/src/3rdParty/salomesmesh/inc/SMESH_Mesh.hxx +++ b/src/3rdParty/salomesmesh/inc/SMESH_Mesh.hxx @@ -38,6 +38,7 @@ #include "SMESH_Exception.hxx" +#include #include #include @@ -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; diff --git a/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.hxx b/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.hxx index 9c1123d3a0b2..be22e06af661 100644 --- a/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.hxx +++ b/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.hxx @@ -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 #endif -#ifndef _Handle_TColStd_HArray2OfInteger_HeaderFile -#include +#ifndef _TColStd_HArray2OfInteger_HeaderFile +#include #endif -#ifndef _Handle_TColStd_HArray2OfReal_HeaderFile -#include +#ifndef _TColStd_HArray2OfReal_HeaderFile +#include #endif #ifndef _MeshVS_DataSource3D_HeaderFile #include @@ -57,8 +57,8 @@ #ifndef _Standard_Address_HeaderFile #include #endif -#ifndef _Handle_TColStd_HArray1OfInteger_HeaderFile -#include +#ifndef _TColStd_HArray1OfInteger_HeaderFile +#include #endif #ifndef _Standard_Real_HeaderFile #include @@ -66,7 +66,13 @@ #ifndef _SMESH_Mesh_HeaderFile #include #endif +#ifndef _Standard_Version_HeaderFile +#include +#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 diff --git a/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.ixx b/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.ixx index 9028919391db..1e7d6fe93e1b 100644 --- a/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.ixx +++ b/src/3rdParty/salomesmesh/inc/SMESH_MeshVSLink.ixx @@ -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 @@ -30,6 +30,11 @@ #include #endif +#ifndef _Standard_Version_HeaderFile +#include +#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 diff --git a/src/3rdParty/salomesmesh/inc/StdMeshers_Hexa_3D.hxx b/src/3rdParty/salomesmesh/inc/StdMeshers_Hexa_3D.hxx index b912d601450c..5032417ae3e4 100644 --- a/src/3rdParty/salomesmesh/inc/StdMeshers_Hexa_3D.hxx +++ b/src/3rdParty/salomesmesh/inc/StdMeshers_Hexa_3D.hxx @@ -37,7 +37,9 @@ #include "SMESH_MesherHelper.hxx" +#if OCC_VERSION_HEX < 0x070000 class TopTools_IndexedMapOfShape; +#endif typedef struct point3Dstruct { diff --git a/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx b/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx index 1a02166c75ce..3184ac3422f5 100644 --- a/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx +++ b/src/3rdParty/salomesmesh/inc/StdMeshers_ProjectionUtils.hxx @@ -30,6 +30,7 @@ #include "SMESH_StdMeshers.hxx" #include +#include #include #include #include @@ -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 diff --git a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshVSLink.cpp b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshVSLink.cpp index 0f3991aa0f6b..eebf3bd9ec90 100644 --- a/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshVSLink.cpp +++ b/src/3rdParty/salomesmesh/src/SMESH/SMESH_MeshVSLink.cpp @@ -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 #include +#if OCC_VERSION_HEX >= 0x070000 +IMPLEMENT_STANDARD_RTTIEXT(SMESH_MeshVSLink,MeshVS_DataSource3D) +#endif + #define MAX_SORT_NODE_COUNT 12 typedef std::map 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& groups = myMesh->GetMeshDS()->GetGroups(); - if (!groups.empty()) { - std::set::const_iterator GrIt = groups.begin(); - for (; GrIt != groups.end(); GrIt++) { - SMESHDS_Group* grp = dynamic_cast(*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& groups = myMesh->GetMeshDS()->GetGroups(); + if (!groups.empty()) { + std::set::const_iterator GrIt = groups.begin(); + for (; GrIt != groups.end(); GrIt++) { + SMESHDS_Group* grp = dynamic_cast(*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; } diff --git a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Distribution.cpp b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Distribution.cpp index d185f6b9e788..6ab97173c072 100644 --- a/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Distribution.cpp +++ b/src/3rdParty/salomesmesh/src/StdMeshers/StdMeshers_Distribution.cpp @@ -35,6 +35,7 @@ #endif #include +#include #ifdef NO_CAS_CATCH #include diff --git a/src/Mod/Drawing/App/DrawingExport.cpp b/src/Mod/Drawing/App/DrawingExport.cpp index b41dc08c1925..d0a2d783006f 100644 --- a/src/Mod/Drawing/App/DrawingExport.cpp +++ b/src/Mod/Drawing/App/DrawingExport.cpp @@ -64,12 +64,11 @@ #include #include -#include +#include #include #include -#include +#include #include -#include #include #include #include diff --git a/src/Mod/Drawing/App/ProjectionAlgos.cpp b/src/Mod/Drawing/App/ProjectionAlgos.cpp index 0f1311641fd2..7fca3747faa4 100644 --- a/src/Mod/Drawing/App/ProjectionAlgos.cpp +++ b/src/Mod/Drawing/App/ProjectionAlgos.cpp @@ -62,12 +62,11 @@ #include #include #include -#include +#include #include #include -#include +#include #include -#include #include #include #include @@ -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; diff --git a/src/Mod/Import/App/AppImportPy.cpp b/src/Mod/Import/App/AppImportPy.cpp index 9e4023e107d5..92e4418a7f0d 100644 --- a/src/Mod/Import/App/AppImportPy.cpp +++ b/src/Mod/Import/App/AppImportPy.cpp @@ -29,8 +29,8 @@ # include # include # include -# include -# include +# include +# include # include # include # include diff --git a/src/Mod/Import/App/ImportOCAF.cpp b/src/Mod/Import/App/ImportOCAF.cpp index e1c3bb4de419..71dcaec5cf5f 100644 --- a/src/Mod/Import/App/ImportOCAF.cpp +++ b/src/Mod/Import/App/ImportOCAF.cpp @@ -29,8 +29,8 @@ # include # include # include -# include -# include +# include +# include # include # include # include diff --git a/src/Mod/Import/App/ImportOCAF.h b/src/Mod/Import/App/ImportOCAF.h index 50b91bdf8c2b..c03483ade4ab 100644 --- a/src/Mod/Import/App/ImportOCAF.h +++ b/src/Mod/Import/App/ImportOCAF.h @@ -24,9 +24,9 @@ #ifndef IMPORT_IMPORTOCAF_H #define IMPORT_IMPORTOCAF_H -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/Mod/Import/Gui/AppImportGuiPy.cpp b/src/Mod/Import/Gui/AppImportGuiPy.cpp index 57987b0e025f..321f650eb82c 100644 --- a/src/Mod/Import/Gui/AppImportGuiPy.cpp +++ b/src/Mod/Import/Gui/AppImportGuiPy.cpp @@ -31,8 +31,8 @@ # include # include # include -# include -# include +# include +# include # include # include # include diff --git a/src/Mod/Part/App/AppPartPy.cpp b/src/Mod/Part/App/AppPartPy.cpp index 7707d75aacd7..7572d4b1c28f 100644 --- a/src/Mod/Part/App/AppPartPy.cpp +++ b/src/Mod/Part/App/AppPartPy.cpp @@ -57,9 +57,9 @@ # include # include # include -# include -# include -# include +# include +# include +# include # include # include # include diff --git a/src/Mod/Part/App/BSplineCurvePyImp.cpp b/src/Mod/Part/App/BSplineCurvePyImp.cpp index db991f6c8d31..75ba8c08028d 100644 --- a/src/Mod/Part/App/BSplineCurvePyImp.cpp +++ b/src/Mod/Part/App/BSplineCurvePyImp.cpp @@ -32,7 +32,7 @@ # include # include # include -# include +# include # include #endif diff --git a/src/Mod/Part/App/BSplineSurfacePyImp.cpp b/src/Mod/Part/App/BSplineSurfacePyImp.cpp index 9d1264a04cb0..16ba617f5044 100644 --- a/src/Mod/Part/App/BSplineSurfacePyImp.cpp +++ b/src/Mod/Part/App/BSplineSurfacePyImp.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include # include -# include +# include # include # include # include diff --git a/src/Mod/Part/App/BezierSurfacePyImp.cpp b/src/Mod/Part/App/BezierSurfacePyImp.cpp index b26c47614fca..fa0ab586f959 100644 --- a/src/Mod/Part/App/BezierSurfacePyImp.cpp +++ b/src/Mod/Part/App/BezierSurfacePyImp.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include # include -# include +# include # include # include # include diff --git a/src/Mod/Part/App/ConePyImp.cpp b/src/Mod/Part/App/ConePyImp.cpp index 633e2cccf18d..0e7504e5532c 100644 --- a/src/Mod/Part/App/ConePyImp.cpp +++ b/src/Mod/Part/App/ConePyImp.cpp @@ -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 + Handle(Geom_ConicalSurface) s = Handle(Geom_ConicalSurface)::DownCast (getGeometryPtr()->handle()); s->SetRadius(1.0); return 0; diff --git a/src/Mod/Part/App/CrossSection.h b/src/Mod/Part/App/CrossSection.h index 56fc90fddb69..309509bf9081 100644 --- a/src/Mod/Part/App/CrossSection.h +++ b/src/Mod/Part/App/CrossSection.h @@ -25,10 +25,10 @@ #define PART_CROSSSECTION_H #include +#include class TopoDS_Shape; class TopoDS_Wire; -class TopTools_IndexedMapOfShape; namespace Part { diff --git a/src/Mod/Part/App/FeatureFace.cpp b/src/Mod/Part/App/FeatureFace.cpp index 682a87b2ea77..8f72f9861a33 100644 --- a/src/Mod/Part/App/FeatureFace.cpp +++ b/src/Mod/Part/App/FeatureFace.cpp @@ -31,7 +31,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/Mod/Part/App/Geometry.h b/src/Mod/Part/App/Geometry.h index 19f0c12bb60e..3a06e2a4d901 100644 --- a/src/Mod/Part/App/Geometry.h +++ b/src/Mod/Part/App/Geometry.h @@ -24,29 +24,29 @@ #ifndef PART_GEOMETRY_H #define PART_GEOMETRY_H -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/src/Mod/Part/App/GeometryCurvePyImp.cpp b/src/Mod/Part/App/GeometryCurvePyImp.cpp index 77378944d6f3..ecd9a6851725 100644 --- a/src/Mod/Part/App/GeometryCurvePyImp.cpp +++ b/src/Mod/Part/App/GeometryCurvePyImp.cpp @@ -43,8 +43,8 @@ # include # include # include -# include -# include +# include +# include # include # include # include diff --git a/src/Mod/Part/App/ImportIges.cpp b/src/Mod/Part/App/ImportIges.cpp index 1ef0bc619cdd..674171041ba6 100644 --- a/src/Mod/Part/App/ImportIges.cpp +++ b/src/Mod/Part/App/ImportIges.cpp @@ -36,15 +36,15 @@ # include # include # include -# include +# include # include # include # include # include #endif -#include -#include +#include +#include #include #include #include diff --git a/src/Mod/Part/App/ImportStep.cpp b/src/Mod/Part/App/ImportStep.cpp index c8c9d9a0f8e2..e8761eb7586a 100644 --- a/src/Mod/Part/App/ImportStep.cpp +++ b/src/Mod/Part/App/ImportStep.cpp @@ -38,8 +38,9 @@ # include #endif -#include -#include +#include +#include +#include #include #include #include @@ -48,8 +49,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -57,15 +58,15 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include +#include #include -#include #include #include @@ -253,6 +254,9 @@ static void findStyledSR (const Handle(StepVisual_StyledItem) &style, bool Part::ReadColors (const Handle(XSControl_WorkSession) &WS, std::map& 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::mapDefinition(); - 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= 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 } diff --git a/src/Mod/Part/App/PartFeatures.cpp b/src/Mod/Part/App/PartFeatures.cpp index adc038d1dd47..39a5d71154c4 100644 --- a/src/Mod/Part/App/PartFeatures.cpp +++ b/src/Mod/Part/App/PartFeatures.cpp @@ -41,7 +41,7 @@ # include # include # include -# include +# include #endif diff --git a/src/Mod/Part/App/PrimitiveFeature.cpp b/src/Mod/Part/App/PrimitiveFeature.cpp index dafefc9fe4a6..0b33a9dea315 100644 --- a/src/Mod/Part/App/PrimitiveFeature.cpp +++ b/src/Mod/Part/App/PrimitiveFeature.cpp @@ -49,10 +49,10 @@ # include # include # include -# include -# include -# include -# include +# include +# include +# include +# include # include # include # include diff --git a/src/Mod/Part/App/Tools.cpp b/src/Mod/Part/App/Tools.cpp index bd36bae4d91d..6c8d149f5a61 100644 --- a/src/Mod/Part/App/Tools.cpp +++ b/src/Mod/Part/App/Tools.cpp @@ -26,6 +26,7 @@ # include # include # include +# include # include # include # include diff --git a/src/Mod/Part/App/Tools.h b/src/Mod/Part/App/Tools.h index 55c9b4f52840..ba167fb6ce27 100644 --- a/src/Mod/Part/App/Tools.h +++ b/src/Mod/Part/App/Tools.h @@ -28,11 +28,11 @@ #include #include #include -#include +#include +#include class gp_Lin; class gp_Pln; -class TColStd_ListOfTransient; namespace Base { // Specialization for gp_Pnt diff --git a/src/Mod/Part/App/TopoShape.cpp b/src/Mod/Part/App/TopoShape.cpp index 65717479bc91..92458347204a 100644 --- a/src/Mod/Part/App/TopoShape.cpp +++ b/src/Mod/Part/App/TopoShape.cpp @@ -90,9 +90,9 @@ # include # include # include -# include -# include -# include +# include +# include +# include # include # include # include @@ -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(orient); diff --git a/src/Mod/Part/App/TopoShapeFacePyImp.cpp b/src/Mod/Part/App/TopoShapeFacePyImp.cpp index 7b8d17262de7..0983dc6136d5 100644 --- a/src/Mod/Part/App/TopoShapeFacePyImp.cpp +++ b/src/Mod/Part/App/TopoShapeFacePyImp.cpp @@ -41,7 +41,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/Mod/Part/Gui/DlgPrimitives.cpp b/src/Mod/Part/Gui/DlgPrimitives.cpp index 622856a0a90d..de2c03012429 100644 --- a/src/Mod/Part/Gui/DlgPrimitives.cpp +++ b/src/Mod/Part/Gui/DlgPrimitives.cpp @@ -30,8 +30,6 @@ #include #include #include -#include -#include #include #include #endif diff --git a/src/Mod/Part/Gui/ViewProviderExt.cpp b/src/Mod/Part/Gui/ViewProviderExt.cpp index d312a1e395fd..a07aa7106687 100644 --- a/src/Mod/Part/Gui/ViewProviderExt.cpp +++ b/src/Mod/Part/Gui/ViewProviderExt.cpp @@ -45,7 +45,6 @@ # include # include # include -# include # include # include # include diff --git a/src/Mod/PartDesign/App/DatumPoint.cpp b/src/Mod/PartDesign/App/DatumPoint.cpp index 6c7e68d8cc77..4615ad2e4db6 100644 --- a/src/Mod/PartDesign/App/DatumPoint.cpp +++ b/src/Mod/PartDesign/App/DatumPoint.cpp @@ -40,10 +40,9 @@ # include # include # include -# include -# include -# include -# include +# include +# include +# include # include # include # include diff --git a/src/Mod/PartDesign/App/FeatureHole.cpp b/src/Mod/PartDesign/App/FeatureHole.cpp index 33ca7df0a0b1..64b22db98842 100644 --- a/src/Mod/PartDesign/App/FeatureHole.cpp +++ b/src/Mod/PartDesign/App/FeatureHole.cpp @@ -33,7 +33,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/Mod/PartDesign/App/FeaturePad.cpp b/src/Mod/PartDesign/App/FeaturePad.cpp index ba48d2e36117..9091774731a4 100644 --- a/src/Mod/PartDesign/App/FeaturePad.cpp +++ b/src/Mod/PartDesign/App/FeaturePad.cpp @@ -28,7 +28,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/Mod/PartDesign/App/FeaturePipe.cpp b/src/Mod/PartDesign/App/FeaturePipe.cpp index b28e9e2d5ac3..f14993f1d545 100644 --- a/src/Mod/PartDesign/App/FeaturePipe.cpp +++ b/src/Mod/PartDesign/App/FeaturePipe.cpp @@ -28,7 +28,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index a4278d98b7d2..516fe8ebaa46 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -32,7 +32,7 @@ # include # include # include -# include +# include # include # include # include diff --git a/src/Mod/Path/App/FeaturePathShape.cpp b/src/Mod/Path/App/FeaturePathShape.cpp index 14c2a48dd768..dcdd7e4fe39b 100644 --- a/src/Mod/Path/App/FeaturePathShape.cpp +++ b/src/Mod/Path/App/FeaturePathShape.cpp @@ -42,10 +42,9 @@ #include #include #include -#include +#include #include #include -#include using namespace Path; diff --git a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp index 1228b3f60c0e..c8e2c684d983 100644 --- a/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp +++ b/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include # include -# include +# include #endif #include diff --git a/src/Mod/ReverseEngineering/App/ApproxSurface.h b/src/Mod/ReverseEngineering/App/ApproxSurface.h index c9be27eafa4e..1ff12949da0c 100644 --- a/src/Mod/ReverseEngineering/App/ApproxSurface.h +++ b/src/Mod/ReverseEngineering/App/ApproxSurface.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/Mod/ReverseEngineering/App/BSplineFitting.h b/src/Mod/ReverseEngineering/App/BSplineFitting.h index a341771e182b..cabcceca676f 100644 --- a/src/Mod/ReverseEngineering/App/BSplineFitting.h +++ b/src/Mod/ReverseEngineering/App/BSplineFitting.h @@ -25,7 +25,7 @@ #define REEN_BSPLINEFITTING_H #if defined(HAVE_PCL_OPENNURBS) -#include +#include #include #include diff --git a/src/Mod/ReverseEngineering/App/PreCompiled.h b/src/Mod/ReverseEngineering/App/PreCompiled.h index 54b5c6b8acfa..e30a1470ad0a 100644 --- a/src/Mod/ReverseEngineering/App/PreCompiled.h +++ b/src/Mod/ReverseEngineering/App/PreCompiled.h @@ -69,7 +69,6 @@ #include #include #include -#include #include #include diff --git a/src/Mod/Sketcher/App/AppSketcherPy.cpp b/src/Mod/Sketcher/App/AppSketcherPy.cpp index b26e57294a5d..437f5175a2d5 100644 --- a/src/Mod/Sketcher/App/AppSketcherPy.cpp +++ b/src/Mod/Sketcher/App/AppSketcherPy.cpp @@ -22,11 +22,10 @@ #include "PreCompiled.h" -#ifndef _PreComp_ -# include -# include +#ifndef _PreComp_ +# include +# include # include -# include #endif #include @@ -64,11 +63,11 @@ class Module : public Py::ExtensionModule 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 @@ class Module : public Py::ExtensionModule 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);