1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _BRepLib_FuseEdges_HeaderFile
#define _BRepLib_FuseEdges_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_DataMapOfIntegerListOfShape.hxx>
#include <TopTools_DataMapOfIntegerShape.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
#include <Standard_Integer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopAbs_ShapeEnum.hxx>
class Standard_ConstructionError;
class Standard_NullObject;
class TopoDS_Shape;
class TopTools_IndexedMapOfShape;
class TopTools_DataMapOfIntegerListOfShape;
class TopTools_DataMapOfIntegerShape;
class TopTools_DataMapOfShapeShape;
class TopTools_IndexedDataMapOfShapeListOfShape;
class TopTools_MapOfShape;
class TopTools_ListOfShape;
class TopoDS_Vertex;
class TopoDS_Edge;
//! This class can detect vertices in a face that can
//! be considered useless and then perform the fuse of
//! the edges and remove the useless vertices. By
//! useles vertices, we mean :
//! * vertices that have exactly two connex edges
//! * the edges connex to the vertex must have
//! exactly the same 2 connex faces .
//! * The edges connex to the vertex must have the
//! same geometric support.
class BRepLib_FuseEdges
{
public:
DEFINE_STANDARD_ALLOC
//! Initialise members and build construction of map
//! of ancestors.
Standard_EXPORT BRepLib_FuseEdges(const TopoDS_Shape& theShape, const Standard_Boolean PerformNow = Standard_False);
//! set edges to avoid being fused
Standard_EXPORT void AvoidEdges (const TopTools_IndexedMapOfShape& theMapEdg) ;
//! set mode to enable concatenation G1 BSpline edges in one
//! End Modified by IFV 19.04.07
Standard_EXPORT void SetConcatBSpl (const Standard_Boolean theConcatBSpl = Standard_True) ;
//! returns all the list of edges to be fused
//! each list of the map represent a set of connex edges
//! that can be fused.
Standard_EXPORT void Edges (TopTools_DataMapOfIntegerListOfShape& theMapLstEdg) ;
//! returns all the fused edges. each integer entry in
//! the map corresponds to the integer in the
//! DataMapOfIntegerListOfShape we get in method
//! Edges. That is to say, to the list of edges in
//! theMapLstEdg(i) corresponds the resulting edge theMapEdge(i)
Standard_EXPORT void ResultEdges (TopTools_DataMapOfIntegerShape& theMapEdg) ;
//! returns the map of modified faces.
Standard_EXPORT void Faces (TopTools_DataMapOfShapeShape& theMapFac) ;
//! returns myShape modified with the list of internal
//! edges removed from it.
Standard_EXPORT TopoDS_Shape& Shape() ;
//! returns the number of vertices candidate to be removed
Standard_EXPORT Standard_Integer NbVertices() ;
//! Using map of list of connex edges, fuse each list to
//! one edge and then update myShape
Standard_EXPORT void Perform() ;
protected:
private:
//! build a map of shapes and ancestors, like
//! TopExp.MapShapesAndAncestors, but we remove duplicate
//! shapes in list of shapes.
Standard_EXPORT void BuildAncestors (const TopoDS_Shape& S, const TopAbs_ShapeEnum TS, const TopAbs_ShapeEnum TA, TopTools_IndexedDataMapOfShapeListOfShape& M) const;
//! Build the all the lists of edges that are to be fused
Standard_EXPORT void BuildListEdges() ;
//! Build result fused edges according to the list
//! builtin BuildLisEdges
Standard_EXPORT void BuildListResultEdges() ;
Standard_EXPORT void BuildListConnexEdge (const TopoDS_Shape& theEdge, TopTools_MapOfShape& theMapUniq, TopTools_ListOfShape& theLstEdg) ;
Standard_EXPORT Standard_Boolean NextConnexEdge (const TopoDS_Vertex& theVertex, const TopoDS_Shape& theEdge, TopoDS_Shape& theEdgeConnex) const;
Standard_EXPORT Standard_Boolean SameSupport (const TopoDS_Edge& E1, const TopoDS_Edge& E2) const;
Standard_EXPORT Standard_Boolean UpdatePCurve (const TopoDS_Edge& theOldEdge, TopoDS_Edge& theNewEdge, const TopTools_ListOfShape& theLstEdg) const;
TopoDS_Shape myShape;
Standard_Boolean myShapeDone;
Standard_Boolean myEdgesDone;
Standard_Boolean myResultEdgesDone;
TopTools_IndexedDataMapOfShapeListOfShape myMapVerLstEdg;
TopTools_IndexedDataMapOfShapeListOfShape myMapEdgLstFac;
TopTools_DataMapOfIntegerListOfShape myMapLstEdg;
TopTools_DataMapOfIntegerShape myMapEdg;
TopTools_DataMapOfShapeShape myMapFaces;
Standard_Integer myNbConnexEdge;
TopTools_IndexedMapOfShape myAvoidEdg;
Standard_Boolean myConcatBSpl;
};
#endif // _BRepLib_FuseEdges_HeaderFile
|