Updated for NPAL15716.

This commit is contained in:
skl 2008-05-26 07:24:55 +00:00
parent 7a72e1b402
commit 7d5c34c37c
4 changed files with 1242 additions and 3 deletions

View File

@ -823,8 +823,7 @@ class Mesh:
def Compute(self, geom=0):
if geom == 0 or not isinstance(geom, geompyDC.GEOM._objref_GEOM_Object):
if self.geom == 0:
print "Compute impossible: mesh is not constructed on geom shape."
return 0
geom = self.mesh.GetShapeToMesh()
else:
geom = self.geom
ok = False
@ -931,6 +930,8 @@ class Mesh:
pass
if not geom:
geom = self.geom
if not geom:
geom = self.mesh.GetShapeToMesh()
pass
status = self.mesh.AddHypothesis(geom, hyp)
isAlgo = hyp._narrow( SMESH_Algo )

View File

@ -63,6 +63,7 @@ salomeinclude_HEADERS = \
StdMeshers_FaceSide.hxx \
StdMeshers_CompositeSegment_1D.hxx \
StdMeshers_UseExisting_1D2D.hxx \
StdMeshers_QuadToTriaAdaptor.hxx \
SMESH_StdMeshers.hxx
# Libraries targets
@ -104,7 +105,8 @@ dist_libStdMeshers_la_SOURCES = \
StdMeshers_SegmentLengthAroundVertex.cxx \
StdMeshers_FaceSide.cxx \
StdMeshers_CompositeSegment_1D.cxx \
StdMeshers_UseExisting_1D2D.cxx
StdMeshers_UseExisting_1D2D.cxx \
StdMeshers_QuadToTriaAdaptor.cxx
# additionnal information to compil and link file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,75 @@
// SMESH SMESH : implementaion of SMESH idl descriptions
//
// 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 : StdMeshers_QuadToTriaAdaptor.hxx
// Module : SMESH
#ifndef _SMESH_QuadToTriaAdaptor_HXX_
#define _SMESH_QuadToTriaAdaptor_HXX_
#include <SMESH_Mesh.hxx>
#include <SMESH_StdMeshers.hxx>
#include <gp_Pnt.hxx>
#include <SMDS_FaceOfNodes.hxx>
#include <TColgp_HArray1OfPnt.hxx>
#include <TColgp_HArray1OfVec.hxx>
class STDMESHERS_EXPORT StdMeshers_QuadToTriaAdaptor
{
public:
StdMeshers_QuadToTriaAdaptor();
~StdMeshers_QuadToTriaAdaptor();
bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
bool Compute(SMESH_Mesh& aMesh);
std::list<const SMDS_FaceOfNodes*> GetTriangles(const SMDS_MeshElement* aFace);
protected:
//bool CheckDegenerate(const SMDS_MeshElement* aFace);
int Preparation(const SMDS_MeshElement* face,
Handle(TColgp_HArray1OfPnt) PN,
Handle(TColgp_HArray1OfVec) VN,
std::vector<const SMDS_MeshNode*>& FNodes,
gp_Pnt& PC, gp_Vec& VNorm);
bool CheckIntersection(const gp_Pnt& P, const gp_Pnt& PC,
gp_Pnt& Pint, SMESH_Mesh& aMesh,
const TopoDS_Shape& aShape,
const TopoDS_Shape& NotCheckedFace);
bool Compute2ndPart(SMESH_Mesh& aMesh);
std::map< const SMDS_MeshElement*, std::list<const SMDS_FaceOfNodes*> > myResMap;
std::map< const SMDS_MeshElement*, const SMDS_MeshElement* > myMapFPyram;
std::list< const SMDS_MeshNode* > myDegNodes;
};
#endif