2 #ifndef _GEOM_IBlocksOperations_i_HeaderFile
3 #define _GEOM_IBlocksOperations_i_HeaderFile
6 #include <SALOMEconfig.h>
8 #include CORBA_SERVER_HEADER(GEOM_Gen)
9 #include "GEOM_IOperations_i.hh"
10 #include "GEOM_Object_i.hh"
12 #include "GEOMImpl_IBlocksOperations.hxx"
14 class GEOM_IBlocksOperations_i :
15 public virtual POA_GEOM::GEOM_IBlocksOperations,
16 public virtual GEOM_IOperations_i
19 GEOM_IBlocksOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
20 ::GEOMImpl_IBlocksOperations* theImpl);
21 ~GEOM_IBlocksOperations_i();
23 // Creation of blocks and block faces
24 GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
25 GEOM::GEOM_Object_ptr theEdge2,
26 GEOM::GEOM_Object_ptr theEdge3,
27 GEOM::GEOM_Object_ptr theEdge4);
29 GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
30 GEOM::GEOM_Object_ptr theEdge2);
32 GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
33 GEOM::GEOM_Object_ptr thePnt2,
34 GEOM::GEOM_Object_ptr thePnt3,
35 GEOM::GEOM_Object_ptr thePnt4);
37 GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
38 GEOM::GEOM_Object_ptr theFace2,
39 GEOM::GEOM_Object_ptr theFace3,
40 GEOM::GEOM_Object_ptr theFace4,
41 GEOM::GEOM_Object_ptr theFace5,
42 GEOM::GEOM_Object_ptr theFace6);
44 GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
45 GEOM::GEOM_Object_ptr theFace2);
47 GEOM::GEOM_Object_ptr MakeBlockCompound (GEOM::GEOM_Object_ptr theCompound);
49 // Extract elements of blocks and blocks compounds
50 GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
54 CORBA::Double theEpsilon);
56 GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
57 GEOM::GEOM_Object_ptr thePoint1,
58 GEOM::GEOM_Object_ptr thePoint2);
60 GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
61 GEOM::GEOM_Object_ptr thePoint);
63 GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
64 GEOM::GEOM_Object_ptr thePoint1,
65 GEOM::GEOM_Object_ptr thePoint2,
66 GEOM::GEOM_Object_ptr thePoint3,
67 GEOM::GEOM_Object_ptr thePoint4);
69 GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
70 GEOM::GEOM_Object_ptr theEdge1,
71 GEOM::GEOM_Object_ptr theEdge2);
73 GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
74 GEOM::GEOM_Object_ptr theFace);
76 GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
77 GEOM::GEOM_Object_ptr thePoint);
79 GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
80 GEOM::GEOM_Object_ptr theVector);
82 // Check blocks compound
83 CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
84 CORBA::Long theMinNbFaces,
85 CORBA::Long theMaxNbFaces,
86 CORBA::Long& theNbBlocks);
88 CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
89 GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
91 char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
92 const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
94 GEOM::GEOM_Object_ptr RemoveExtraEdges (GEOM::GEOM_Object_ptr theShape);
96 GEOM::GEOM_Object_ptr CheckAndImprove (GEOM::GEOM_Object_ptr theCompound);
98 // Extract blocks from blocks compounds
99 GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
100 CORBA::Long theMinNbFaces,
101 CORBA::Long theMaxNbFaces);
103 GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
104 GEOM::GEOM_Object_ptr thePoint);
106 GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
107 const GEOM::ListOfGO& theParts);
109 GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
110 const GEOM::ListOfGO& theParts);
112 // Operations on blocks with gluing of result
113 GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
114 CORBA::Long theDirFace1,
115 CORBA::Long theDirFace2,
116 CORBA::Long theNbTimes);
118 GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
119 CORBA::Long theDirFace1U,
120 CORBA::Long theDirFace2U,
121 CORBA::Long theNbTimesU,
122 CORBA::Long theDirFace1V,
123 CORBA::Long theDirFace2V,
124 CORBA::Long theNbTimesV);
126 // Build groups for Propagation of 1D hypotheses
127 GEOM::ListOfGO* Propagate (GEOM::GEOM_Object_ptr theShape);
129 ::GEOMImpl_IBlocksOperations* GetOperations()
130 { return (::GEOMImpl_IBlocksOperations*)GetImpl(); }