Version: 9.16.0
StdMeshers_Prism_3D.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23// SMESH SMESH : implementation of SMESH idl descriptions
24// File : StdMeshers_Prism_3D.hxx
25// Module : SMESH
26//
27#ifndef _SMESH_Prism_3D_HXX_
28#define _SMESH_Prism_3D_HXX_
29
30#include "SMESH_StdMeshers.hxx"
31
32#include "SMESHDS_Mesh.hxx"
33#include "SMESH_Block.hxx"
34#include "SMESH_Comment.hxx"
35#include "SMESH_Mesh.hxx"
38#include "SMESH_TypeDefs.hxx"
39#include "SMESH_subMesh.hxx"
41
42#include <Adaptor2d_Curve2d.hxx>
43#include <Adaptor3d_Curve.hxx>
44#include <Adaptor3d_Surface.hxx>
45#include <BRepAdaptor_Surface.hxx>
46#include <TColStd_DataMapOfIntegerInteger.hxx>
47#include <TopTools_IndexedMapOfOrientedShape.hxx>
48#include <TopoDS_Face.hxx>
49#include <gp_Trsf.hxx>
50#include <gp_XYZ.hxx>
51
52#include <vector>
53
54namespace Prism_3D
55{
56 struct TNode;
57 struct TPrismTopo;
58}
59class SMESHDS_SubMesh;
60class TopoDS_Edge;
61
62typedef TopTools_IndexedMapOfOrientedShape TBlockShapes;
63typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
64typedef std::map< double, TNodeColumn > TParam2ColumnMap;
65typedef std::map< double, TNodeColumn >::const_iterator TParam2ColumnIt;
66// map of bottom nodes to the column of nodes above them
67// (the column includes the bottom nodes)
68typedef std::map< Prism_3D::TNode, TNodeColumn > TNode2ColumnMap;
69
70
71namespace Prism_3D
72{
73 // ===============================================
77 struct TNode
78 {
80 mutable gp_XYZ myParams;
81
82 gp_XYZ GetCoords() const { return gp_XYZ( myNode->X(), myNode->Y(), myNode->Z() ); }
83 gp_XYZ GetParams() const { return myParams; }
84 gp_XYZ& ChangeParams() const { return myParams; }
85 bool HasParams() const { return myParams.X() >= 0.0; }
87 { return myNode ? myNode->GetPosition()->GetTypeOfPosition() : SMDS_TOP_UNSPEC; }
88 bool IsNeighbor( const TNode& other ) const;
89
90 TNode(const SMDS_MeshNode* node = 0): myNode(node), myParams(-1,-1,-1) {}
91 bool operator < (const TNode& other) const { return myNode->GetID() < other.myNode->GetID(); }
92 };
93 // ===============================================
97 typedef std::list< TFaceQuadStructPtr > TQuadList;
98
100 {
101 TopoDS_Shape myShape3D;
102 TopoDS_Face myBottom;
103 TopoDS_Face myTop;
104 std::list< TopoDS_Edge > myBottomEdges;
105 std::vector< TQuadList> myWallQuads; // wall sides can be vertically composite
106 std::vector< int > myRightQuadIndex; // index of right neighbour wall quad
107 std::list< int > myNbEdgesInWires;
108
110 mutable SMESH_subMesh* myAlgoSM; // sub-mesh with algo which computed myBottom
111
112 size_t NbWires() const { return myNbEdgesInWires.size(); }
113
114 inline TPrismTopo() { Clear(); }
115 void Clear();
116 void SetUpsideDown();
117 };
118}
119
120// ===============================================================
128{
129 public:
134
136
143 bool Init(SMESH_MesherHelper* helper, const Prism_3D::TPrismTopo& prism);
144
148 SMESH_ComputeErrorPtr GetError() const { return myError; }
149
153 void Clear();
154
159 size_t VerticalSize() const { return myParam2ColumnMaps[0].begin()->second.size(); }
160
161 bool HasNotQuadElemOnTop() const { return myNotQuadOnTop; }
162
168 const TNodeColumn* GetNodeColumn(const SMDS_MeshNode* node) const;
169
176 const TParam2ColumnMap* GetParam2ColumnMap(const int baseEdgeID,
177 bool & isReverse) const
178 {
179 std::map< int, std::pair< TParam2ColumnMap*, bool > >::const_iterator i_mo =
180 myShapeIndex2ColumnMap.find( baseEdgeID );
181 if ( i_mo == myShapeIndex2ColumnMap.end() ) return 0;
182
183 const std::pair< TParam2ColumnMap*, bool >& col_frw = i_mo->second;
184 isReverse = !col_frw.second;
185 return col_frw.first;
186 }
187
193 bool HasNodeColumn(const SMDS_MeshNode* node) const
194 {
195 return myShapeIndex2ColumnMap.count( node->getshapeId() );
196 }
197
203 bool GetLayersTransformation(std::vector<gp_Trsf> & trsf,
204 const Prism_3D::TPrismTopo& prism) const;
205
210 SMESH_Mesh* Mesh() const { return myHelper->GetMesh(); }
211
216 SMESHDS_Mesh* MeshDS() const { return Mesh()->GetMeshDS(); }
217
223 SMESH_subMesh* SubMesh(const int shapeID) const
224 { return Mesh()->GetSubMesh( Shape( shapeID )); }
225
231 SMESHDS_SubMesh* SubMeshDS(const int shapeID) const
232 { return SubMesh(shapeID)->GetSubMeshDS(); }
233
239 const TopoDS_Shape& Shape(const int shapeID) const
240 { return myShapeIDMap( shapeID ); }
241
247 int ShapeID(const TopoDS_Shape& shape) const
248 { return myShapeIDMap.FindIndex( shape ); }
249
258 static bool IsForwardEdge(SMESHDS_Mesh* meshDS,
259 const TParam2ColumnMap& columnsMap,
260 const TopoDS_Edge & bottomEdge,
261 const int sideFaceID);
262
263private:
264
265 // --------------------------------------------------------------------
273 // --------------------------------------------------------------------
275 {
276 typedef boost::shared_ptr<BRepAdaptor_Surface> PSurface;
277
278 int myID;
279 // map used to find out real UV by it's normalized UV
282 TopoDS_Edge myBaseEdge;
283 std::map< int, PSurface > myShapeID2Surf;
284 // first and last normalized params and orientation for each component or it-self
285 std::vector< std::pair< double, double> > myParams; // select my columns in myParamToColumnMap
287 std::vector< TSideFace* > myComponents;
289 public:
290 TSideFace( SMESH_Mesh& mesh,
291 const int faceID,
292 const Prism_3D::TQuadList& quadList,
293 const TopoDS_Edge& baseEdge,
294 TParam2ColumnMap* columnsMap,
295 const double first = 0.0,
296 const double last = 1.0);
298 const std::vector< TSideFace* >& components,
299 const std::vector< std::pair< double, double> > & params);
300 TSideFace( const TSideFace& other );
301 ~TSideFace();
302 bool IsComplex() const
303 { return ( NbComponents() > 0 || myParams[0].first != 0. || myParams[0].second != 1. ); }
304 int FaceID() const { return myID; }
305 SMESH_Mesh* GetMesh() const { return myHelper.GetMesh(); }
306 TParam2ColumnMap* GetColumns() const { return myParamToColumnMap; }
307 gp_XY GetNodeUV(const TopoDS_Face& F, const SMDS_MeshNode* n, const SMDS_MeshNode* n2=0) const
308 { return ((SMESH_MesherHelper&) myHelper).SetSubShape(F), myHelper.GetNodeUV( F, n, n2 ); }
309 const TopoDS_Edge & BaseEdge() const { return myBaseEdge; }
310 int ColumnHeight() const {
311 if ( NbComponents() ) return GetComponent(0)->GetColumns()->begin()->second.size();
312 else return GetColumns()->begin()->second.size(); }
313 double GetColumns(const double U, TParam2ColumnIt & col1, TParam2ColumnIt& col2 ) const;
314 void GetNodesAtZ(const int Z, std::map<double, const SMDS_MeshNode* >& nodes ) const;
315 int NbComponents() const { return myComponents.size(); }
316 TSideFace* GetComponent(const int i) const { return myComponents.at( i ); }
317 void SetComponent(const int i, TSideFace* c)
318 { if ( myComponents[i] ) delete myComponents[i]; myComponents[i]=c; }
319 TSideFace* GetComponent(const double U, double& localU) const;
320 bool IsForward() const { return myIsForward; }
321 // boundary geometry for a face
322 Adaptor3d_Surface* Surface() const { return new TSideFace( *this ); }
323 bool GetPCurves(Adaptor2d_Curve2d* pcurv[4]) const;
324 Adaptor2d_Curve2d* HorizPCurve(const bool isTop, const TopoDS_Face& horFace) const;
325 Adaptor3d_Curve* HorizCurve(const bool isTop) const;
326 Adaptor3d_Curve* VertiCurve(const bool isMax) const;
327 TopoDS_Edge GetEdge( const int edge ) const;
328 int InsertSubShapes( TBlockShapes& shapeMap ) const;
329 // redefine Adaptor methods
330 gp_Pnt Value(const Standard_Real U,const Standard_Real V) const;
331 // debug
332 void dumpNodes(int nbNodes) const;
333 };
334
335 // --------------------------------------------------------------------
339 // --------------------------------------------------------------------
341 {
343 public:
344 TVerticalEdgeAdaptor( const TParam2ColumnMap* columnsMap, const double parameter );
345 gp_Pnt Value(const Standard_Real U) const;
346 Standard_Real FirstParameter() const { return 0; }
347 Standard_Real LastParameter() const { return 1; }
348 // debug
349 void dumpNodes(int nbNodes) const;
350 };
351
352 // --------------------------------------------------------------------
356 // --------------------------------------------------------------------
358 {
360 double myV;
361 public:
362 THorizontalEdgeAdaptor( const TSideFace* sideFace, const bool isTop)
363 :mySide(sideFace), myV( isTop ? 1.0 : 0.0 ) {}
364 gp_Pnt Value(const Standard_Real U) const;
365 Standard_Real FirstParameter() const { return 0; }
366 Standard_Real LastParameter() const { return 1; }
367 // debug
368 void dumpNodes(int nbNodes) const;
369 };
370
371 // --------------------------------------------------------------------
375 // --------------------------------------------------------------------
377 {
378 std::map< double, gp_XY > myUVmap; // normalized parameter to UV on a horizontal face
379 public:
380 TPCurveOnHorFaceAdaptor( const TSideFace* sideFace,
381 const bool isTop,
382 const TopoDS_Face& horFace);
383 gp_Pnt2d Value(const Standard_Real U) const;
384 Standard_Real FirstParameter() const { return 0; }
385 Standard_Real LastParameter() const { return 1; }
386 };
387
392
393 // container of 4 side faces
395 // node columns for each base edge
396 std::vector< TParam2ColumnMap > myParam2ColumnMaps;
397 // to find a column for a node by edge SMESHDS Index
398 std::map< int, std::pair< TParam2ColumnMap*, bool > > myShapeIndex2ColumnMap;
399
403 bool error(int error, const SMESH_Comment& comment = "") {
404 myError = SMESH_ComputeError::New(error,comment);
405 return myError->IsOK();
406 }
410 void faceGridToPythonDump(const SMESH_Block::TShapeID face,
411 const int nb=10);
412
413}; // class StdMeshers_PrismAsBlock
414
415// ===============================================
420{
421 // input data
423 TopoDS_Face myBotFace;
424 TopoDS_Face myTopFace;
425 std::vector< TNodeColumn* > myBndColumns; // boundary nodes
426 // output data
427 std::vector< TNodeColumn* > myIntColumns; // internal nodes
428
429 bool ComputeNodesByTrsf( const double tol,
430 const bool allowHighBndError );
431
432 bool CheckSameZ();
433
435
437
438private:
439
440 gp_XYZ bndPoint( int iP, int z ) const
441 { return SMESH_TNodeXYZ( (*myBndColumns[ iP ])[ z ]); }
442
443 gp_XYZ intPoint( int iP, int z ) const
444 { return SMESH_TNodeXYZ( (*myIntColumns[ iP ])[ z ]); }
445
446 bool projectIntPoints(const std::vector< gp_XYZ >& fromBndPoints,
447 const std::vector< gp_XYZ >& toBndPoints,
448 const std::vector< gp_XYZ >& fromIntPoints,
449 std::vector< gp_XYZ >& toIntPoints,
450 const double r,
452 std::vector< gp_XYZ > * bndError);
453
454 typedef std::vector< double > TZColumn;
455 static void fillZColumn( TZColumn& zColumn,
456 TNodeColumn& nodes );
457
460
461 std::vector< TZColumn > myZColumns; // Z distribution of boundary nodes
462
465 TColStd_DataMapOfIntegerInteger myNodeID2ColID;
466
467 // top and bottom Delaulay triangles including an internal column
469 {
470 double myBotBC[3], myTopBC[3]; // barycentric coordinates of a node within a triangle
471 int myBotTriaNodes[3], myTopTriaNodes[3]; // indices of boundary columns
473 void SetTopByBottom();
474 };
475 std::vector< TopBotTriangles> myTopBotTriangles;
476};
477
478// ===============================================
483{
484public:
485 StdMeshers_Prism_3D(int hypId, SMESH_Gen* gen);
486 virtual ~StdMeshers_Prism_3D();
487
488 virtual bool CheckHypothesis(SMESH_Mesh& aMesh,
489 const TopoDS_Shape& aShape,
491
492 virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape);
493
494 virtual bool Evaluate(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape,
495 MapShapeNbElems& aResMap);
496
505 void ProjectTriangles() { myProjectTriangles = true; }
506
512 static bool AddPrisms( std::vector<const TNodeColumn*> & nodeColumns,
513 SMESH_MesherHelper* helper);
514
515 static bool IsApplicable(const TopoDS_Shape & aShape, bool toCheckAll);
516 virtual bool IsApplicableToShape(const TopoDS_Shape & shape, bool toCheckAll) const
517 {
518 return IsApplicable( shape, toCheckAll );
519 }
520
521 private:
522
527 bool initPrism(Prism_3D::TPrismTopo& thePrism,
528 const TopoDS_Shape& theSolid,
529 const bool selectBottom = true);
530
534 bool getWallFaces( Prism_3D::TPrismTopo& thePrism,
535 const int totalNbFaces);
536
540 bool compute(const Prism_3D::TPrismTopo& thePrism);
541
545 bool computeBase(const Prism_3D::TPrismTopo& thePrism);
546
550 bool computeWalls(const Prism_3D::TPrismTopo& thePrism);
551
555 void makeQuadsForOutInProjection( const Prism_3D::TPrismTopo& thePrism,
556 std::multimap< int, int >& wgt2quad,
557 std::map< int, FaceQuadStruct >& iW2oiQuads);
561 TopoDS_Edge findPropagationSource( const TopoDS_Edge& E );
562
569 bool assocOrProjBottom2Top( const gp_Trsf & bottomToTopTrsf,
570 const Prism_3D::TPrismTopo& thePrism);
571
577 bool projectBottomToTop( const gp_Trsf & bottomToTopTrsf,
578 const Prism_3D::TPrismTopo& thePrism );
579
583 double getSweepTolerance( const Prism_3D::TPrismTopo& thePrism );
584
588 bool isSimpleBottom( const Prism_3D::TPrismTopo& thePrism );
589
593 bool allVerticalEdgesStraight( const Prism_3D::TPrismTopo& thePrism );
594
600 bool project2dMesh(const TopoDS_Face& source, const TopoDS_Face& target);
601
608 bool setFaceAndEdgesXYZ( const int faceID, const gp_XYZ& params, int z );
609
613 bool toSM( bool isOK );
614
618 int shapeID( const TopoDS_Shape& S );
619
620private:
621
625
629
630 std::vector<gp_XYZ> myShapeXYZ; // point on each sub-shape of the block
631
632 // map of bottom nodes to the column of nodes above them
633 // (the column includes the bottom node)
635
636 TopTools_IndexedMapOfShape* myPropagChains;
637
638}; // class StdMeshers_Prism_3D
639
640#endif
SMDS_TypeOfPosition
Definition: SMDS_TypeOfPosition.hxx:31
@ SMDS_TOP_UNSPEC
Definition: SMDS_TypeOfPosition.hxx:32
std::map< SMESH_subMesh *, std::vector< smIdType > > MapShapeNbElems
Definition: SMESH_Algo.hxx:63
boost::shared_ptr< SMESH_ComputeError > SMESH_ComputeErrorPtr
Definition: SMESH_ComputeError.hxx:38
std::map< double, TNodeColumn > TParam2ColumnMap
Definition: SMESH_MesherHelper.hxx:65
std::vector< const SMDS_MeshNode * > TNodeColumn
Definition: SMESH_MesherHelper.hxx:64
#define STDMESHERS_EXPORT
Definition: SMESH_StdMeshers.hxx:38
std::map< double, TNodeColumn > TParam2ColumnMap
Definition: StdMeshers_Prism_3D.hxx:64
TopTools_IndexedMapOfOrientedShape TBlockShapes
Definition: StdMeshers_Prism_3D.hxx:62
std::map< Prism_3D::TNode, TNodeColumn > TNode2ColumnMap
Definition: StdMeshers_Prism_3D.hxx:68
std::map< double, TNodeColumn >::const_iterator TParam2ColumnIt
Definition: StdMeshers_Prism_3D.hxx:65
std::vector< const SMDS_MeshNode * > TNodeColumn
Definition: StdMeshers_Prism_3D.hxx:63
virtual int getshapeId() const
Definition: SMDS_MeshElement.hxx:133
virtual smIdType GetID() const
Return ID of an element.
Definition: SMDS_MeshElement.cxx:108
Definition: SMDS_MeshNode.hxx:36
double X() const
Definition: SMDS_MeshNode.cxx:217
double Z() const
Definition: SMDS_MeshNode.cxx:229
double Y() const
Definition: SMDS_MeshNode.cxx:223
SMDS_PositionPtr GetPosition() const
Definition: SMDS_MeshNode.cxx:90
Definition: SMESHDS_Mesh.hxx:98
Definition: SMESHDS_SubMesh.hxx:48
Definition: SMESH_Algo.hxx:511
Definition: SMESH_Block.hxx:63
Standard_Boolean Value(const math_Vector &X, math_Vector &F)
Definition: SMESH_Block.cxx:507
TShapeID
Definition: SMESH_Block.hxx:65
static bool IsForwardEdge(const TopoDS_Edge &theEdge, const TopTools_IndexedMapOfOrientedShape &theShapeIDMap)
Definition: SMESH_Block.hxx:274
Class to generate string from any type.
Definition: SMESH_Comment.hxx:37
Definition: SMESH_Gen.hxx:68
Hypothesis_Status
Definition: SMESH_Hypothesis.hxx:51
Definition: SMESH_Mesh.hxx:80
It helps meshers to add elements and provides other utilities.
Definition: SMESH_MesherHelper.hxx:84
gp_XY GetNodeUV(const TopoDS_Face &F, const SMDS_MeshNode *n, const SMDS_MeshNode *inFaceNode=0, bool *check=0) const
Return node UV on face.
Definition: SMESH_MesherHelper.cxx:639
SMESH_Mesh * GetMesh() const
Definition: SMESH_MesherHelper.hxx:272
Definition: SMESH_subMesh.hxx:61
Class emulating geometry of a hirizontal edge.
Definition: StdMeshers_Prism_3D.hxx:358
THorizontalEdgeAdaptor(const TSideFace *sideFace, const bool isTop)
Definition: StdMeshers_Prism_3D.hxx:362
double myV
Definition: StdMeshers_Prism_3D.hxx:360
const TSideFace * mySide
Definition: StdMeshers_Prism_3D.hxx:359
Standard_Real FirstParameter() const
Definition: StdMeshers_Prism_3D.hxx:365
Standard_Real LastParameter() const
Definition: StdMeshers_Prism_3D.hxx:366
Class emulating pcurve on a hirizontal face.
Definition: StdMeshers_Prism_3D.hxx:377
Standard_Real FirstParameter() const
Definition: StdMeshers_Prism_3D.hxx:384
Standard_Real LastParameter() const
Definition: StdMeshers_Prism_3D.hxx:385
std::map< double, gp_XY > myUVmap
Definition: StdMeshers_Prism_3D.hxx:378
Class representing a part of a geom face or a union of seleral faces.
Definition: StdMeshers_Prism_3D.hxx:275
int myID
in-block ID
Definition: StdMeshers_Prism_3D.hxx:278
TSideFace(SMESH_Mesh &mesh, const std::vector< TSideFace * > &components, const std::vector< std::pair< double, double > > &params)
bool IsForward() const
Definition: StdMeshers_Prism_3D.hxx:320
SMESH_MesherHelper myHelper
Definition: StdMeshers_Prism_3D.hxx:288
bool myIsForward
Definition: StdMeshers_Prism_3D.hxx:286
const TopoDS_Edge & BaseEdge() const
Definition: StdMeshers_Prism_3D.hxx:309
TParam2ColumnMap * GetColumns() const
Definition: StdMeshers_Prism_3D.hxx:306
TParam2ColumnMap * myParamToColumnMap
Definition: StdMeshers_Prism_3D.hxx:280
TopoDS_Edge myBaseEdge
Definition: StdMeshers_Prism_3D.hxx:282
PSurface mySurface
Definition: StdMeshers_Prism_3D.hxx:281
std::map< int, PSurface > myShapeID2Surf
Definition: StdMeshers_Prism_3D.hxx:283
int NbComponents() const
Definition: StdMeshers_Prism_3D.hxx:315
boost::shared_ptr< BRepAdaptor_Surface > PSurface
Definition: StdMeshers_Prism_3D.hxx:276
int FaceID() const
Definition: StdMeshers_Prism_3D.hxx:304
Adaptor3d_Surface * Surface() const
Definition: StdMeshers_Prism_3D.hxx:322
std::vector< std::pair< double, double > > myParams
Definition: StdMeshers_Prism_3D.hxx:285
void SetComponent(const int i, TSideFace *c)
Definition: StdMeshers_Prism_3D.hxx:317
TSideFace * GetComponent(const int i) const
Definition: StdMeshers_Prism_3D.hxx:316
bool IsComplex() const
Definition: StdMeshers_Prism_3D.hxx:302
SMESH_Mesh * GetMesh() const
Definition: StdMeshers_Prism_3D.hxx:305
gp_XY GetNodeUV(const TopoDS_Face &F, const SMDS_MeshNode *n, const SMDS_MeshNode *n2=0) const
Definition: StdMeshers_Prism_3D.hxx:307
int ColumnHeight() const
Definition: StdMeshers_Prism_3D.hxx:310
std::vector< TSideFace * > myComponents
Definition: StdMeshers_Prism_3D.hxx:287
Class emulating geometry of a vertical edge.
Definition: StdMeshers_Prism_3D.hxx:341
Standard_Real FirstParameter() const
Definition: StdMeshers_Prism_3D.hxx:346
const TNodeColumn * myNodeColumn
Definition: StdMeshers_Prism_3D.hxx:342
Standard_Real LastParameter() const
Definition: StdMeshers_Prism_3D.hxx:347
Tool analyzing and giving access to a prism geometry treating it like a block, i.e.
Definition: StdMeshers_Prism_3D.hxx:128
SMESHDS_Mesh * MeshDS() const
Return pointer to mesh DS.
Definition: StdMeshers_Prism_3D.hxx:216
const TParam2ColumnMap * GetParam2ColumnMap(const int baseEdgeID, bool &isReverse) const
Return TParam2ColumnMap for a base edge.
Definition: StdMeshers_Prism_3D.hxx:176
bool HasNotQuadElemOnTop() const
Definition: StdMeshers_Prism_3D.hxx:161
SMESH_ComputeErrorPtr GetError() const
Return problem description.
Definition: StdMeshers_Prism_3D.hxx:148
SMESHDS_SubMesh * SubMeshDS(const int shapeID) const
Return submesh DS of a shape.
Definition: StdMeshers_Prism_3D.hxx:231
TBlockShapes myShapeIDMap
Definition: StdMeshers_Prism_3D.hxx:390
std::map< int, std::pair< TParam2ColumnMap *, bool > > myShapeIndex2ColumnMap
Definition: StdMeshers_Prism_3D.hxx:398
SMESH_subMesh * SubMesh(const int shapeID) const
Return submesh of a shape.
Definition: StdMeshers_Prism_3D.hxx:223
bool HasNodeColumn(const SMDS_MeshNode *node) const
Return pointer to column of nodes.
Definition: StdMeshers_Prism_3D.hxx:193
std::vector< TParam2ColumnMap > myParam2ColumnMaps
Definition: StdMeshers_Prism_3D.hxx:396
bool error(int error, const SMESH_Comment &comment="")
store error and comment and then return ( error == COMPERR_OK )
Definition: StdMeshers_Prism_3D.hxx:403
size_t VerticalSize() const
Return number of nodes on every vertical edge.
Definition: StdMeshers_Prism_3D.hxx:159
int ShapeID(const TopoDS_Shape &shape) const
Return in-block ID of a shape.
Definition: StdMeshers_Prism_3D.hxx:247
SMESH_MesherHelper * myHelper
Definition: StdMeshers_Prism_3D.hxx:389
SMESH_ComputeErrorPtr myError
Definition: StdMeshers_Prism_3D.hxx:391
TSideFace * mySide
Definition: StdMeshers_Prism_3D.hxx:394
SMESH_Mesh * Mesh() const
Return pointer to mesh.
Definition: StdMeshers_Prism_3D.hxx:210
bool myNotQuadOnTop
Definition: StdMeshers_Prism_3D.hxx:388
const TopoDS_Shape & Shape(const int shapeID) const
Return a in-block shape.
Definition: StdMeshers_Prism_3D.hxx:239
Algo building prisms on a prism shape.
Definition: StdMeshers_Prism_3D.hxx:483
StdMeshers_PrismAsBlock myBlock
Definition: StdMeshers_Prism_3D.hxx:626
TopTools_IndexedMapOfShape * myPropagChains
Definition: StdMeshers_Prism_3D.hxx:636
SMESH_MesherHelper * myHelper
Definition: StdMeshers_Prism_3D.hxx:627
virtual bool IsApplicableToShape(const TopoDS_Shape &shape, bool toCheckAll) const
Return true if the algorithm can mesh a given shape.
Definition: StdMeshers_Prism_3D.hxx:516
bool mySetErrorToSM
Definition: StdMeshers_Prism_3D.hxx:623
TNode2ColumnMap myBotToColumnMap
Definition: StdMeshers_Prism_3D.hxx:634
void ProjectTriangles()
Enable removal of quadrangles from the bottom face and triangles creation there by projection from th...
Definition: StdMeshers_Prism_3D.hxx:505
bool myUseBlock
Definition: StdMeshers_Prism_3D.hxx:624
bool myProjectTriangles
Definition: StdMeshers_Prism_3D.hxx:622
SMESH_subMesh * myPrevBottomSM
Definition: StdMeshers_Prism_3D.hxx:628
std::vector< gp_XYZ > myShapeXYZ
Definition: StdMeshers_Prism_3D.hxx:630
Finds transformation between two sets of 3D points using a least square approximation.
Definition: StdMeshers_ProjectionUtils.hxx:125
Definition: StdMeshers_Prism_3D.cxx:3523
std::list< TFaceQuadStructPtr > TQuadList
Topological data of the prism.
Definition: StdMeshers_Prism_3D.hxx:97
bool IsApplicable(const QString &aHypType, GEOM::GEOM_Object_ptr theGeomObject, const bool toCheckAll)
Definition: SMESHGUI_HypothesesUtils.cxx:617
boost::shared_ptr< Delaunay > DelaunayPtr
Definition: StdMeshers_ProjectionUtils.hxx:173
Structure containing node relative data.
Definition: StdMeshers_Prism_3D.hxx:78
gp_XYZ myParams
Definition: StdMeshers_Prism_3D.hxx:80
gp_XYZ GetCoords() const
Definition: StdMeshers_Prism_3D.hxx:82
TNode(const SMDS_MeshNode *node=0)
Definition: StdMeshers_Prism_3D.hxx:90
bool HasParams() const
Definition: StdMeshers_Prism_3D.hxx:85
gp_XYZ & ChangeParams() const
Definition: StdMeshers_Prism_3D.hxx:84
const SMDS_MeshNode * myNode
Definition: StdMeshers_Prism_3D.hxx:79
gp_XYZ GetParams() const
Definition: StdMeshers_Prism_3D.hxx:83
SMDS_TypeOfPosition GetPositionType() const
Definition: StdMeshers_Prism_3D.hxx:86
bool IsNeighbor(const TNode &other) const
Return true if this node and other one belong to one face.
Definition: StdMeshers_Prism_3D.cxx:3530
bool operator<(const TNode &other) const
Definition: StdMeshers_Prism_3D.hxx:91
Definition: StdMeshers_Prism_3D.hxx:100
std::vector< int > myRightQuadIndex
Definition: StdMeshers_Prism_3D.hxx:106
bool myNotQuadOnTop
Definition: StdMeshers_Prism_3D.hxx:109
SMESH_subMesh * myAlgoSM
Definition: StdMeshers_Prism_3D.hxx:110
TPrismTopo()
Definition: StdMeshers_Prism_3D.hxx:114
std::vector< TQuadList > myWallQuads
Definition: StdMeshers_Prism_3D.hxx:105
TopoDS_Shape myShape3D
Definition: StdMeshers_Prism_3D.hxx:101
size_t NbWires() const
Definition: StdMeshers_Prism_3D.hxx:112
void SetUpsideDown()
Set upside-down.
Definition: StdMeshers_Prism_3D.cxx:3566
void Clear()
Prism initialization.
Definition: StdMeshers_Prism_3D.cxx:3547
std::list< int > myNbEdgesInWires
Definition: StdMeshers_Prism_3D.hxx:107
TopoDS_Face myTop
Definition: StdMeshers_Prism_3D.hxx:103
TopoDS_Face myBottom
Definition: StdMeshers_Prism_3D.hxx:102
std::list< TopoDS_Edge > myBottomEdges
Definition: StdMeshers_Prism_3D.hxx:104
static SMESH_ComputeErrorPtr New(int error=COMPERR_OK, std::string comment="", const SMESH_Algo *algo=0)
Definition: SMESH_ComputeError.hxx:79
SMDS_MeshNode -> gp_XYZ converter.
Definition: SMESH_TypeDefs.hxx:215
Definition: StdMeshers_Prism_3D.hxx:469
double myBotBC[3]
Definition: StdMeshers_Prism_3D.hxx:470
void SetTopByBottom()
Set top data equal to bottom data.
Definition: StdMeshers_Prism_3D.cxx:5821
int myTopTriaNodes[3]
Definition: StdMeshers_Prism_3D.hxx:471
int myBotTriaNodes[3]
Definition: StdMeshers_Prism_3D.hxx:471
TopBotTriangles()
Initialize fields.
Definition: StdMeshers_Prism_3D.cxx:5808
double myTopBC[3]
Definition: StdMeshers_Prism_3D.hxx:470
Tool building internal nodes in a prism.
Definition: StdMeshers_Prism_3D.hxx:420
StdMeshers_ProjectionUtils::DelaunayPtr myBotDelaunay
Definition: StdMeshers_Prism_3D.hxx:464
bool ComputeNodesOnStraightSameZ()
Create internal nodes of the prism all located on straight lines with the same distribution along the...
Definition: StdMeshers_Prism_3D.cxx:5581
bool findDelaunayTriangles()
For each internal node column, find Delaunay triangles including it and Barycentric Coordinates withi...
Definition: StdMeshers_Prism_3D.cxx:5759
TopoDS_Face myTopFace
Definition: StdMeshers_Prism_3D.hxx:424
std::vector< TZColumn > myZColumns
Definition: StdMeshers_Prism_3D.hxx:461
TopoDS_Face myBotFace
Definition: StdMeshers_Prism_3D.hxx:423
bool ComputeNodesByTrsf(const double tol, const bool allowHighBndError)
Create internal nodes of the prism by computing an affine transformation from layer to layer.
Definition: StdMeshers_Prism_3D.cxx:5274
std::vector< TNodeColumn * > myIntColumns
Definition: StdMeshers_Prism_3D.hxx:427
bool ComputeNodesOnStraight()
Create internal nodes of the prism all located on straight lines with different distributions along t...
Definition: StdMeshers_Prism_3D.cxx:5607
void prepareTopBotDelaunay()
Initialize *Delaunay members.
Definition: StdMeshers_Prism_3D.cxx:5684
std::vector< double > TZColumn
Definition: StdMeshers_Prism_3D.hxx:454
std::vector< TNodeColumn * > myBndColumns
Definition: StdMeshers_Prism_3D.hxx:425
static void fillZColumn(TZColumn &zColumn, TNodeColumn &nodes)
Compute Z of nodes of a straight column.
Definition: StdMeshers_Prism_3D.cxx:5660
std::vector< TopBotTriangles > myTopBotTriangles
Definition: StdMeshers_Prism_3D.hxx:475
TColStd_DataMapOfIntegerInteger myNodeID2ColID
Definition: StdMeshers_Prism_3D.hxx:465
bool projectIntPoints(const std::vector< gp_XYZ > &fromBndPoints, const std::vector< gp_XYZ > &toBndPoints, const std::vector< gp_XYZ > &fromIntPoints, std::vector< gp_XYZ > &toIntPoints, const double r, StdMeshers_ProjectionUtils::TrsfFinder3D &trsf, std::vector< gp_XYZ > *bndError)
Projects internal nodes using transformation found by boundary nodes.
Definition: StdMeshers_Prism_3D.cxx:5219
bool CheckSameZ()
Check if all nodes of each layers have same logical Z.
Definition: StdMeshers_Prism_3D.cxx:5523
SMESH_MesherHelper * myHelper
Definition: StdMeshers_Prism_3D.hxx:422
gp_XYZ intPoint(int iP, int z) const
Definition: StdMeshers_Prism_3D.hxx:443
gp_XYZ bndPoint(int iP, int z) const
Definition: StdMeshers_Prism_3D.hxx:440
StdMeshers_ProjectionUtils::DelaunayPtr myTopDelaunay
Definition: StdMeshers_Prism_3D.hxx:463