Back to index

salome-geom  6.5.0
GEOM_IBlocksOperations_i.hh
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 #ifndef _GEOM_IBlocksOperations_i_HeaderFile
00024 #define _GEOM_IBlocksOperations_i_HeaderFile
00025 
00026 #include "GEOMImpl_Gen.hxx"
00027 
00028 #include <SALOMEconfig.h>
00029 
00030 #include CORBA_SERVER_HEADER(GEOM_Gen)
00031 #include "GEOM_IOperations_i.hh"
00032 #include "GEOM_Object_i.hh"
00033 
00034 #include "GEOMImpl_IBlocksOperations.hxx"
00035 
00036 class GEOM_I_EXPORT GEOM_IBlocksOperations_i :
00037     public virtual POA_GEOM::GEOM_IBlocksOperations,
00038     public virtual GEOM_IOperations_i
00039 {
00040  public:
00041   GEOM_IBlocksOperations_i (PortableServer::POA_ptr thePOA, GEOM::GEOM_Gen_ptr theEngine,
00042                          ::GEOMImpl_IBlocksOperations* theImpl);
00043   ~GEOM_IBlocksOperations_i();
00044 
00045   // Creation of blocks and block faces
00046   GEOM::GEOM_Object_ptr MakeQuad (GEOM::GEOM_Object_ptr theEdge1,
00047                               GEOM::GEOM_Object_ptr theEdge2,
00048                               GEOM::GEOM_Object_ptr theEdge3,
00049                               GEOM::GEOM_Object_ptr theEdge4);
00050 
00051   GEOM::GEOM_Object_ptr MakeQuad2Edges (GEOM::GEOM_Object_ptr theEdge1,
00052                                    GEOM::GEOM_Object_ptr theEdge2);
00053 
00054   GEOM::GEOM_Object_ptr MakeQuad4Vertices (GEOM::GEOM_Object_ptr thePnt1,
00055                                       GEOM::GEOM_Object_ptr thePnt2,
00056                                       GEOM::GEOM_Object_ptr thePnt3,
00057                                       GEOM::GEOM_Object_ptr thePnt4);
00058 
00059   GEOM::GEOM_Object_ptr MakeHexa (GEOM::GEOM_Object_ptr theFace1,
00060                               GEOM::GEOM_Object_ptr theFace2,
00061                               GEOM::GEOM_Object_ptr theFace3,
00062                               GEOM::GEOM_Object_ptr theFace4,
00063                               GEOM::GEOM_Object_ptr theFace5,
00064                               GEOM::GEOM_Object_ptr theFace6);
00065 
00066   GEOM::GEOM_Object_ptr MakeHexa2Faces (GEOM::GEOM_Object_ptr theFace1,
00067                                    GEOM::GEOM_Object_ptr theFace2);
00068 
00069   GEOM::GEOM_Object_ptr MakeBlockCompound (GEOM::GEOM_Object_ptr theCompound);
00070 
00071   // Extract elements of blocks and blocks compounds
00072   GEOM::GEOM_Object_ptr GetPoint (GEOM::GEOM_Object_ptr theShape,
00073                               CORBA::Double   theX,
00074                               CORBA::Double   theY,
00075                               CORBA::Double   theZ,
00076                               CORBA::Double   theEpsilon);
00077 
00078   GEOM::GEOM_Object_ptr GetVertexNearPoint (GEOM::GEOM_Object_ptr theShape,
00079                                             GEOM::GEOM_Object_ptr thePoint);
00080 
00081   GEOM::GEOM_Object_ptr GetEdge (GEOM::GEOM_Object_ptr theShape,
00082                              GEOM::GEOM_Object_ptr thePoint1,
00083                              GEOM::GEOM_Object_ptr thePoint2);
00084 
00085   GEOM::GEOM_Object_ptr GetEdgeNearPoint (GEOM::GEOM_Object_ptr theShape,
00086                                      GEOM::GEOM_Object_ptr thePoint);
00087 
00088   GEOM::GEOM_Object_ptr GetFaceByPoints (GEOM::GEOM_Object_ptr theShape,
00089                                     GEOM::GEOM_Object_ptr thePoint1,
00090                                     GEOM::GEOM_Object_ptr thePoint2,
00091                                     GEOM::GEOM_Object_ptr thePoint3,
00092                                     GEOM::GEOM_Object_ptr thePoint4);
00093 
00094   GEOM::GEOM_Object_ptr GetFaceByEdges (GEOM::GEOM_Object_ptr theShape,
00095                                    GEOM::GEOM_Object_ptr theEdge1,
00096                                    GEOM::GEOM_Object_ptr theEdge2);
00097 
00098   GEOM::GEOM_Object_ptr GetOppositeFace (GEOM::GEOM_Object_ptr theBlock,
00099                                     GEOM::GEOM_Object_ptr theFace);
00100 
00101   GEOM::GEOM_Object_ptr GetFaceNearPoint (GEOM::GEOM_Object_ptr theShape,
00102                                      GEOM::GEOM_Object_ptr thePoint);
00103 
00104   GEOM::GEOM_Object_ptr GetFaceByNormale (GEOM::GEOM_Object_ptr theBlock,
00105                                      GEOM::GEOM_Object_ptr theVector);
00106 
00107   GEOM::GEOM_Object_ptr GetShapesNearPoint (GEOM::GEOM_Object_ptr theShape,
00108                                             GEOM::GEOM_Object_ptr thePoint,
00109                                             CORBA::Long           theShapeType,
00110                                             CORBA::Double         theTolerance);
00111 
00112   // Check blocks compound
00113   CORBA::Boolean IsCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
00114                                  CORBA::Long           theMinNbFaces,
00115                                  CORBA::Long           theMaxNbFaces,
00116                                  CORBA::Long&          theNbBlocks);
00117 
00118   CORBA::Boolean CheckCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
00119                                    GEOM::GEOM_IBlocksOperations::BCErrors_out theErrors);
00120 
00121   char* PrintBCErrors (GEOM::GEOM_Object_ptr theCompound,
00122                      const GEOM::GEOM_IBlocksOperations::BCErrors& theErrors);
00123 
00124   GEOM::GEOM_Object_ptr RemoveExtraEdges (GEOM::GEOM_Object_ptr theShape,
00125                                           CORBA::Long           theOptimumNbFaces);
00126 
00127   GEOM::GEOM_Object_ptr CheckAndImprove (GEOM::GEOM_Object_ptr theCompound);
00128 
00129   // Extract blocks from blocks compounds
00130   GEOM::ListOfGO* ExplodeCompoundOfBlocks (GEOM::GEOM_Object_ptr theCompound,
00131                                       CORBA::Long     theMinNbFaces,
00132                                       CORBA::Long     theMaxNbFaces);
00133 
00134   GEOM::GEOM_Object_ptr GetBlockNearPoint (GEOM::GEOM_Object_ptr theCompound,
00135                                       GEOM::GEOM_Object_ptr thePoint);
00136 
00137   GEOM::GEOM_Object_ptr GetBlockByParts (GEOM::GEOM_Object_ptr theCompound,
00138                                     const GEOM::ListOfGO& theParts);
00139 
00140   GEOM::ListOfGO* GetBlocksByParts (GEOM::GEOM_Object_ptr theCompound,
00141                                 const GEOM::ListOfGO& theParts);
00142 
00143   // Operations on blocks with gluing of result
00144   GEOM::GEOM_Object_ptr MakeMultiTransformation1D (GEOM::GEOM_Object_ptr theBlock,
00145                                              CORBA::Long     theDirFace1,
00146                                              CORBA::Long     theDirFace2,
00147                                              CORBA::Long     theNbTimes);
00148 
00149   GEOM::GEOM_Object_ptr MakeMultiTransformation2D (GEOM::GEOM_Object_ptr theBlock,
00150                                              CORBA::Long     theDirFace1U,
00151                                              CORBA::Long     theDirFace2U,
00152                                              CORBA::Long     theNbTimesU,
00153                                              CORBA::Long     theDirFace1V,
00154                                              CORBA::Long     theDirFace2V,
00155                                              CORBA::Long     theNbTimesV);
00156 
00157   // Build groups for Propagation of 1D hypotheses
00158   GEOM::ListOfGO* Propagate (GEOM::GEOM_Object_ptr theShape);
00159 
00160   ::GEOMImpl_IBlocksOperations* GetOperations()
00161   { return (::GEOMImpl_IBlocksOperations*)GetImpl(); }
00162 };
00163 
00164 #endif