SMESH_Hypothesis.hxx \
SMESH_HypoFilter.hxx \
SMESH_Algo.hxx \
- SMESH_0D_Algo.hxx \
- SMESH_1D_Algo.hxx \
- SMESH_2D_Algo.hxx \
- SMESH_3D_Algo.hxx \
SMESH_Group.hxx \
SMESH_MeshEditor.hxx \
SMESH_Pattern.hxx \
SMESH_subMesh.cxx \
SMESH_Hypothesis.cxx \
SMESH_Algo.cxx \
- SMESH_0D_Algo.cxx \
- SMESH_1D_Algo.cxx \
- SMESH_2D_Algo.cxx \
- SMESH_3D_Algo.cxx \
SMESH_Group.cxx \
SMESH_MeshEditor.cxx \
SMESH_Pattern.cxx \
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_0D_Algo.cxx
-// Module : SMESH
-// $Header$
-//
-#include "SMESH_0D_Algo.hxx"
-#include "SMESH_Gen.hxx"
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_Algo(hypId, studyId, gen)
-{
- _type = ALGO_0D;
- gen->_map0D_Algo[hypId] = this;
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_0D_Algo::~SMESH_0D_Algo()
-{
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_0D_Algo.hxx
-// Module : SMESH
-// $Header$
-//
-#ifndef _SMESH_0D_ALGO_HXX_
-#define _SMESH_0D_ALGO_HXX_
-
-#include "SMESH_SMESH.hxx"
-
-#include "SMESH_Algo.hxx"
-
-class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
-{
-public:
- SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen);
- virtual ~SMESH_0D_Algo();
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_1D_Algo.cxx
-// Author : Paul RASCLE, EDF
-// Module : SMESH
-// $Header$
-//
-#include "SMESH_1D_Algo.hxx"
-#include "SMESH_Gen.hxx"
-#include "SMESH_subMesh.hxx"
-
-using namespace std;
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_Algo(hypId, studyId, gen)
-{
-// _compatibleHypothesis.push_back("hypothese_1D_bidon");
- _type = ALGO_1D;
- gen->_map1D_Algo[hypId] = this;
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_1D_Algo::~SMESH_1D_Algo()
-{
-}
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_1D_Algo.hxx
-// Author : Paul RASCLE, EDF
-// Module : SMESH
-// $Header$
-//
-#ifndef _SMESH_1D_ALGO_HXX_
-#define _SMESH_1D_ALGO_HXX_
-
-#include "SMESH_SMESH.hxx"
-
-#include "SMESH_Algo.hxx"
-
-class SMESH_EXPORT SMESH_1D_Algo:
- public SMESH_Algo
-{
-public:
- SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen);
- virtual ~SMESH_1D_Algo();
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_2D_Algo.cxx
-// Author : Paul RASCLE, EDF
-// Module : SMESH
-// $Header$
-//
-#include "SMESH_2D_Algo.hxx"
-#include "SMESH_Gen.hxx"
-
-#include "utilities.h"
-
-#include <TopExp_Explorer.hxx>
-#include <TopExp.hxx>
-#include <TopoDS.hxx>
-
-using namespace std;
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_Algo(hypId, studyId, gen)
-{
-// _compatibleHypothesis.push_back("hypothese_2D_bidon");
- _type = ALGO_2D;
- gen->_map2D_Algo[hypId] = this;
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_2D_Algo::~SMESH_2D_Algo()
-{
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-int SMESH_2D_Algo::NumberOfWires(const TopoDS_Shape& S)
-{
- int i = 0;
- for (TopExp_Explorer exp(S,TopAbs_WIRE); exp.More(); exp.Next())
- i++;
- return i;
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-int SMESH_2D_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
-{
- int nbPoints = 0;
- for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
- const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
- int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
- if(_quadraticMesh)
- nb = nb/2;
- nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?)
- }
- return nbPoints;
-}
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_2D_Algo.hxx
-// Author : Paul RASCLE, EDF
-// Module : SMESH
-// $Header$
-//
-#ifndef _SMESH_2D_ALGO_HXX_
-#define _SMESH_2D_ALGO_HXX_
-
-#include "SMESH_SMESH.hxx"
-
-#include "SMESH_Algo.hxx"
-#include "SMESH_subMesh.hxx"
-#include "TopoDS_Wire.hxx"
-
-class SMESH_EXPORT SMESH_2D_Algo:
- public SMESH_Algo
-{
-public:
- SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
- virtual ~SMESH_2D_Algo();
-
- int NumberOfWires(const TopoDS_Shape& S);
- int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
-
-};
-
-#endif
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_3D_Algo.cxx
-// Author : Paul RASCLE, EDF
-// Module : SMESH
-// $Header$
-//
-#include "SMESH_3D_Algo.hxx"
-#include "SMESH_Gen.hxx"
-
-#include "utilities.h"
-
-using namespace std;
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
- : SMESH_Algo(hypId, studyId, gen)
-{
-// _compatibleHypothesis.push_back("hypothese_3D_bidon");
- _type = ALGO_3D;
- gen->_map3D_Algo[hypId] = this;
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-SMESH_3D_Algo::~SMESH_3D_Algo()
-{
-}
-
-
+++ /dev/null
-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 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
-//
-
-// SMESH SMESH : implementaion of SMESH idl descriptions
-// File : SMESH_3D_Algo.hxx
-// Author : Paul RASCLE, EDF
-// Module : SMESH
-// $Header$
-//
-#ifndef _SMESH_3D_ALGO_HXX_
-#define _SMESH_3D_ALGO_HXX_
-
-#include "SMESH_SMESH.hxx"
-
-#include "SMESH_Algo.hxx"
-
-class SMESH_EXPORT SMESH_3D_Algo:
- public SMESH_Algo
-{
-public:
- SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
- virtual ~SMESH_3D_Algo();
-
-};
-
-#endif
#include "SMESH_HypoFilter.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_TypeDefs.hxx"
+#include "SMESH_subMesh.hxx"
#include <Basics_OCCTVersion.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <Geom_Surface.hxx>
#include <TopExp.hxx>
+#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Wire.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec.hxx>
{
}
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen)
+ : SMESH_Algo(hypId, studyId, gen)
+{
+ _shapeType = (1 << TopAbs_VERTEX);
+ _type = ALGO_0D;
+ gen->_map0D_Algo[hypId] = this;
+}
+SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen)
+ : SMESH_Algo(hypId, studyId, gen)
+{
+ _shapeType = (1 << TopAbs_EDGE);
+ _type = ALGO_1D;
+ gen->_map1D_Algo[hypId] = this;
+}
+SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen)
+ : SMESH_Algo(hypId, studyId, gen)
+{
+ _shapeType = (1 << TopAbs_FACE);
+ _type = ALGO_2D;
+ gen->_map2D_Algo[hypId] = this;
+}
+SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen)
+ : SMESH_Algo(hypId, studyId, gen)
+{
+ _shapeType = (1 << TopAbs_SOLID);
+ _type = ALGO_3D;
+ gen->_map3D_Algo[hypId] = this;
+}
+
//=============================================================================
/*!
* Usually an algoritm has nothing to save
if ( elem )
_badInputElements.push_back( elem );
}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+int SMESH_Algo::NumberOfWires(const TopoDS_Shape& S)
+{
+ int i = 0;
+ for (TopExp_Explorer exp(S,TopAbs_WIRE); exp.More(); exp.Next())
+ i++;
+ return i;
+}
+
+//=============================================================================
+/*!
+ *
+ */
+//=============================================================================
+
+int SMESH_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
+{
+ int nbPoints = 0;
+ for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
+ const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
+ int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
+ if(_quadraticMesh)
+ nb = nb/2;
+ nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?)
+ }
+ return nbPoints;
+}
+
+
class SMESH_Mesh;
class SMESH_HypoFilter;
class TopoDS_Vertex;
+class TopoDS_Wire;
class TopoDS_Face;
class TopoDS_Shape;
class SMESHDS_Mesh;
*/
static bool FaceNormal(const SMDS_MeshElement* F, gp_XYZ& normal, bool normalized=true);
+ static int NumberOfWires(const TopoDS_Shape& S);
+ int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
+
/*!
* \brief Return continuity of two edges
* \param E1 - the 1st edge
volatile bool _computeCanceled; //!< is set to True while computing to stop it
};
+class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo
+{
+public:
+ SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+};
+
+class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo
+{
+public:
+ SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+};
+
+class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo
+{
+public:
+ SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+};
+
+class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo
+{
+public:
+ SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen);
+};
+
#endif
#include "SMESH_Hypothesis.hxx"
#include "SMESH_ComputeError.hxx"
#include "SMESH_Algo.hxx"
-#include "SMESH_0D_Algo.hxx"
-#include "SMESH_1D_Algo.hxx"
-#include "SMESH_2D_Algo.hxx"
-#include "SMESH_3D_Algo.hxx"
#include "SMESH_Mesh.hxx"
#include "chrono.hxx"