00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _GEOMImpl_IBlocksOperations_HXX_
00024 #define _GEOMImpl_IBlocksOperations_HXX_
00025
00026 #include "GEOM_IOperations.hxx"
00027
00028 #include <TopTools_ListOfShape.hxx>
00029 #include <TColStd_HSequenceOfTransient.hxx>
00030
00031 #include <list>
00032
00033 class GEOM_Engine;
00034 class Handle(GEOM_Object);
00035 class Handle(TColStd_HArray1OfInteger);
00036
00037 class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
00038 public:
00039 Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
00040 Standard_EXPORT ~GEOMImpl_IBlocksOperations();
00041
00042
00043 Standard_EXPORT Handle(GEOM_Object) MakeQuad (Handle(GEOM_Object) theEdge1,
00044 Handle(GEOM_Object) theEdge2,
00045 Handle(GEOM_Object) theEdge3,
00046 Handle(GEOM_Object) theEdge4);
00047
00048 Standard_EXPORT Handle(GEOM_Object) MakeQuad2Edges (Handle(GEOM_Object) theEdge1,
00049 Handle(GEOM_Object) theEdge2);
00050
00051 Standard_EXPORT Handle(GEOM_Object) MakeQuad4Vertices (Handle(GEOM_Object) thePoint1,
00052 Handle(GEOM_Object) thePoint2,
00053 Handle(GEOM_Object) thePoint3,
00054 Handle(GEOM_Object) thePoint4);
00055
00056 Standard_EXPORT Handle(GEOM_Object) MakeHexa (Handle(GEOM_Object) theFace1,
00057 Handle(GEOM_Object) theFace2,
00058 Handle(GEOM_Object) theFace3,
00059 Handle(GEOM_Object) theFace4,
00060 Handle(GEOM_Object) theFace5,
00061 Handle(GEOM_Object) theFace6);
00062
00063 Standard_EXPORT Handle(GEOM_Object) MakeHexa2Faces (Handle(GEOM_Object) theFace1,
00064 Handle(GEOM_Object) theFace2);
00065
00066 Standard_EXPORT Handle(GEOM_Object) MakeBlockCompound (Handle(GEOM_Object) theCompound);
00067
00068
00069 Standard_EXPORT Handle(GEOM_Object) GetPoint (Handle(GEOM_Object) theShape,
00070 const Standard_Real theX,
00071 const Standard_Real theY,
00072 const Standard_Real theZ,
00073 const Standard_Real theEpsilon);
00074
00075 Standard_EXPORT Handle(GEOM_Object) GetVertexNearPoint (Handle(GEOM_Object) theShape,
00076 Handle(GEOM_Object) thePoint);
00077
00078 Standard_EXPORT Handle(GEOM_Object) GetEdge (Handle(GEOM_Object) theShape,
00079 Handle(GEOM_Object) thePoint1,
00080 Handle(GEOM_Object) thePoint2);
00081
00082 Standard_EXPORT Handle(GEOM_Object) GetEdgeNearPoint (Handle(GEOM_Object) theBlock,
00083 Handle(GEOM_Object) thePoint);
00084
00085 Standard_EXPORT Handle(GEOM_Object) GetFaceByPoints (Handle(GEOM_Object) theShape,
00086 Handle(GEOM_Object) thePoint1,
00087 Handle(GEOM_Object) thePoint2,
00088 Handle(GEOM_Object) thePoint3,
00089 Handle(GEOM_Object) thePoint4);
00090
00091 Standard_EXPORT Handle(GEOM_Object) GetFaceByEdges (Handle(GEOM_Object) theShape,
00092 Handle(GEOM_Object) theEdge1,
00093 Handle(GEOM_Object) theEdge2);
00094
00095 Standard_EXPORT Handle(GEOM_Object) GetOppositeFace (Handle(GEOM_Object) theBlock,
00096 Handle(GEOM_Object) theFace);
00097
00098 Standard_EXPORT Handle(GEOM_Object) GetFaceNearPoint (Handle(GEOM_Object) theBlock,
00099 Handle(GEOM_Object) thePoint);
00100
00101 Standard_EXPORT Handle(GEOM_Object) GetFaceByNormale (Handle(GEOM_Object) theBlock,
00102 Handle(GEOM_Object) theVector);
00103
00104 Standard_EXPORT Handle(GEOM_Object) GetShapesNearPoint (Handle(GEOM_Object) theShape,
00105 Handle(GEOM_Object) thePoint,
00106 const Standard_Integer theShapeType,
00107 const Standard_Real theTolerance);
00108
00109
00110 Standard_EXPORT Standard_Boolean IsCompoundOfBlocks (Handle(GEOM_Object) theCompound,
00111 const Standard_Integer theMinNbFaces,
00112 const Standard_Integer theMaxNbFaces,
00113 Standard_Integer& theNbBlocks);
00114
00115 enum BCErrorType {
00116 NOT_BLOCK,
00117 EXTRA_EDGE,
00118 INVALID_CONNECTION,
00119 NOT_CONNECTED,
00120 NOT_GLUED
00121 };
00122
00123 struct BCError {
00124 BCErrorType error;
00125 std::list<int> incriminated;
00126 };
00127
00128 Standard_EXPORT Standard_Boolean CheckCompoundOfBlocksOld (Handle(GEOM_Object) theCompound,
00129 std::list<BCError>& theErrors);
00130
00131 Standard_EXPORT Standard_Boolean CheckCompoundOfBlocks (Handle(GEOM_Object) theCompound,
00132 std::list<BCError>& theErrors);
00133
00134 Standard_EXPORT TCollection_AsciiString PrintBCErrors (Handle(GEOM_Object) theCompound,
00135 const std::list<BCError>& theErrors);
00136
00137 Standard_EXPORT Handle(GEOM_Object) RemoveExtraEdges (Handle(GEOM_Object) theShape,
00138 const Standard_Integer theOptimumNbFaces = 6);
00139
00140 Standard_EXPORT Handle(GEOM_Object) CheckAndImprove (Handle(GEOM_Object) theCompound);
00141
00142 Standard_EXPORT static void AddBlocksFrom (const TopoDS_Shape& theShape,
00143 TopTools_ListOfShape& BLO,
00144 TopTools_ListOfShape& NOT,
00145 TopTools_ListOfShape& EXT);
00146
00147
00148 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) ExplodeCompoundOfBlocks
00149 (Handle(GEOM_Object) theCompound,
00150 const Standard_Integer theMinNbFaces,
00151 const Standard_Integer theMaxNbFaces);
00152
00153 Standard_EXPORT Handle(GEOM_Object) GetBlockNearPoint (Handle(GEOM_Object) theCompound,
00154 Handle(GEOM_Object) thePoint);
00155
00156 Standard_EXPORT Handle(GEOM_Object) GetBlockByParts
00157 (Handle(GEOM_Object) theCompound,
00158 const Handle(TColStd_HSequenceOfTransient)& theParts);
00159
00160 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) GetBlocksByParts
00161 (Handle(GEOM_Object) theCompound,
00162 const Handle(TColStd_HSequenceOfTransient)& theParts);
00163
00164
00165 Standard_EXPORT Handle(GEOM_Object) MakeMultiTransformation1D (Handle(GEOM_Object) theBlock,
00166 const Standard_Integer theDirFace1,
00167 const Standard_Integer theDirFace2,
00168 const Standard_Integer theNbTimes);
00169
00170 Standard_EXPORT Handle(GEOM_Object) MakeMultiTransformation2D (Handle(GEOM_Object) theBlock,
00171 const Standard_Integer theDirFace1U,
00172 const Standard_Integer theDirFace2U,
00173 const Standard_Integer theNbTimesU,
00174 const Standard_Integer theDirFace1V,
00175 const Standard_Integer theDirFace2V,
00176 const Standard_Integer theNbTimesV);
00177
00178
00179 Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Propagate (Handle(GEOM_Object) theShape);
00180 };
00181
00182 #endif