1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00

OCC22145 Incorrect cutting BRepMesh_FastDiscretFace

This commit is contained in:
OAN 2011-04-28 14:31:51 +00:00 committed by bugmaster
parent 4d183a4b4d
commit 703a6abd43
7 changed files with 1740 additions and 2000 deletions

View File

@ -306,12 +306,11 @@ Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
if (!GP.IsNull()) { if (!GP.IsNull()) {
static Handle(GeomAdaptor_HCurve) HC; Handle(GeomAdaptor_HCurve) HC;
static Handle(GeomAdaptor_HSurface) HS; Handle(GeomAdaptor_HSurface) HS;
if (HC.IsNull()) {
HC = new GeomAdaptor_HCurve(); HC = new GeomAdaptor_HCurve();
HS = new GeomAdaptor_HSurface(); HS = new GeomAdaptor_HSurface();
}
TopLoc_Location LC; TopLoc_Location LC;

View File

@ -33,7 +33,8 @@ uses Standard,
Poly, Poly,
Geom2d, Geom2d,
GeomAbs, GeomAbs,
GeomAdaptor GeomAdaptor,
TopLoc
is is
@ -45,7 +46,6 @@ is
SelfIntersectingWire, SelfIntersectingWire,
Failure, Failure,
ReMesh ReMesh
end Status; end Status;
enumeration FactoryError is enumeration FactoryError is
@ -98,8 +98,9 @@ is
class BiPoint; class BiPoint;
class Array1OfBiPoint instantiates Array1 from TCollection class Array1OfBiPoint instantiates Array1 from TCollection(BiPoint from BRepMesh);
(BiPoint from BRepMesh);
private class FastDiscretFace;
class FastDiscret; class FastDiscret;
@ -110,8 +111,6 @@ is
FaceAttribute from BRepMesh, FaceAttribute from BRepMesh,
ShapeMapHasher from TopTools); ShapeMapHasher from TopTools);
private class FastDiscretFace;
private class Classifier; private class Classifier;
imported ClassifierPtr; -- smart pointer on Classifier imported ClassifierPtr; -- smart pointer on Classifier

View File

@ -101,14 +101,6 @@ is
-- parallel threads. -- parallel threads.
---C++: alias operator () ---C++: alias operator ()
InternalVerticesMode(me: mutable) returns Boolean from Standard;
---Purpose: Returns mode defining if internal vertices on faces
-- are taken into consideration or not. If this mode is equal to true
-- that internal vertices on faces are considered during triangulation.
-- Default value is equal to false (old behaviour).
---C++: return &
---C++: inline
CurrentFaceStatus(me) CurrentFaceStatus(me)
returns Status from BRepMesh; returns Status from BRepMesh;
@ -128,13 +120,12 @@ is
S : HSurface from BRepAdaptor) is private; S : HSurface from BRepAdaptor) is private;
Update (me: mutable; Update (me: mutable;
Edge: Edge from TopoDS; Edge : Edge from TopoDS;
Face: Face from TopoDS; Face : Face from TopoDS;
C : Curve from Geom2d; C : Curve from Geom2d;
defedge: Real from Standard; defedge: Real from Standard;
first : Real from Standard; first : Real from Standard;
last : Real from Standard) last : Real from Standard)
returns Boolean is private; returns Boolean is private;
@ -147,8 +138,7 @@ is
is static private; is static private;
Control Control (me : mutable;
(me : mutable;
caro : HSurface from BRepAdaptor; caro : HSurface from BRepAdaptor;
defface : Real from Standard; defface : Real from Standard;
inter : in out ListOfVertex from BRepMesh; inter : in out ListOfVertex from BRepMesh;
@ -158,15 +148,8 @@ is
isfirst : Boolean from Standard) isfirst : Boolean from Standard)
returns Real from Standard is static private; returns Real from Standard is static private;
AddInShape(me: mutable;
FindUV(me: mutable; V: Vertex from TopoDS; face : Face from TopoDS;
XY: Pnt2d from gp;
ip: Integer from Standard;
S : HSurface from BRepAdaptor;
mindist: Real from Standard)
returns XY from gp is private;
AddInShape(me: mutable; face : Face from TopoDS;
defedge: Real from Standard) defedge: Real from Standard)
is static private; is static private;
@ -199,7 +182,6 @@ is
returns Edge from BRepMesh returns Edge from BRepMesh
is static; is static;
NbVertices (me) NbVertices (me)
---Purpose: Gives the number of built Vertices. ---Purpose: Gives the number of built Vertices.
returns Integer from Standard returns Integer from Standard
@ -295,26 +277,25 @@ is
returns DataMapOfShapeReal from TopTools; returns DataMapOfShapeReal from TopTools;
fields fields
myangle : Real from Standard; myAngle : Real from Standard;
mydeflection : Real from Standard; myDeflection : Real from Standard;
mydtotale : Real from Standard; myDtotale : Real from Standard;
myWithShare : Boolean from Standard; myWithShare : Boolean from Standard;
vertices : DataMapOfVertexInteger from BRepMesh; myVertices : DataMapOfVertexInteger from BRepMesh;
edges : DataMapOfShapePairOfPolygon from BRepMesh; myEdges : DataMapOfShapePairOfPolygon from BRepMesh;
internaledges: DataMapOfShapePairOfPolygon from BRepMesh; myInternaledges: DataMapOfShapePairOfPolygon from BRepMesh;
nbLocat : Integer from Standard; myNbLocat : Integer from Standard;
Location3d : DataMapOfIntegerPnt from BRepMesh; myLocation3d : DataMapOfIntegerPnt from BRepMesh;
structure : DataStructureOfDelaun from BRepMesh; myStructure : DataStructureOfDelaun from BRepMesh;
mapattrib : DataMapOfFaceAttribute from BRepMesh; myMapattrib : DataMapOfFaceAttribute from BRepMesh;
myvemap : IndexedMapOfInteger from TColStd; myVemap : IndexedMapOfInteger from TColStd;
mylocation2d : DataMapOfIntegerListOfXY from BRepMesh; myLocation2d : DataMapOfIntegerListOfXY from BRepMesh;
myrelative : Boolean from Standard; myRelative : Boolean from Standard;
myshapetrigu : Boolean from Standard; myShapetrigu : Boolean from Standard;
myinshape : Boolean from Standard; myInshape : Boolean from Standard;
myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices myFacestate : Status from BRepMesh;
myfacestate : Status from BRepMesh; myMapdefle : DataMapOfShapeReal from TopTools;
mapdefle : DataMapOfShapeReal from TopTools; myNottriangulated : ListOfShape from TopTools;
mynottriangulated : ListOfShape from TopTools;
myAllocator : BaseAllocator from MeshDS; myAllocator : BaseAllocator from MeshDS;
end FastDiscret; end FastDiscret;

File diff suppressed because it is too large Load Diff

View File

@ -6,16 +6,6 @@
#include <BRepMesh_DataStructureOfDelaun.hxx> #include <BRepMesh_DataStructureOfDelaun.hxx>
//=======================================================================
//function : InternalVerticesMode
//purpose :
//=======================================================================
inline Standard_Boolean& BRepMesh_FastDiscret::InternalVerticesMode ()
{
return myInternalVerticesMode;
}
//======================================================================= //=======================================================================
//function : GetDeflection //function : GetDeflection
//purpose : //purpose :
@ -23,7 +13,7 @@ inline Standard_Boolean& BRepMesh_FastDiscret::InternalVerticesMode ()
inline Standard_Real BRepMesh_FastDiscret::GetDeflection() const inline Standard_Real BRepMesh_FastDiscret::GetDeflection() const
{ {
return mydeflection; return myDeflection;
} }
//======================================================================= //=======================================================================
@ -33,7 +23,7 @@ inline Standard_Real BRepMesh_FastDiscret::GetDeflection() const
inline Standard_Real BRepMesh_FastDiscret::GetAngle() const inline Standard_Real BRepMesh_FastDiscret::GetAngle() const
{ {
return myangle; return myAngle;
} }
//======================================================================= //=======================================================================
@ -43,7 +33,7 @@ inline Standard_Real BRepMesh_FastDiscret::GetAngle() const
inline const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge() const inline const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge() const
{ {
return mapdefle; return myMapdefle;
} }
//======================================================================= //=======================================================================
@ -53,7 +43,7 @@ inline const TopTools_DataMapOfShapeReal& BRepMesh_FastDiscret::GetMapOfDefEdge(
inline void BRepMesh_FastDiscret::EdgesOfDomain(MeshDS_MapOfInteger& Indices) const inline void BRepMesh_FastDiscret::EdgesOfDomain(MeshDS_MapOfInteger& Indices) const
{ {
Indices = structure->LinkOfDomain(); Indices = myStructure->LinkOfDomain();
} }
//======================================================================= //=======================================================================
@ -63,7 +53,7 @@ inline void BRepMesh_FastDiscret::EdgesOfDomain(MeshDS_MapOfInteger& Indices) c
inline void BRepMesh_FastDiscret::TrianglesOfDomain(MeshDS_MapOfInteger& Indices) const inline void BRepMesh_FastDiscret::TrianglesOfDomain(MeshDS_MapOfInteger& Indices) const
{ {
Indices = structure->ElemOfDomain(); Indices = myStructure->ElemOfDomain();
} }
//======================================================================= //=======================================================================
@ -73,7 +63,7 @@ inline void BRepMesh_FastDiscret::TrianglesOfDomain(MeshDS_MapOfInteger& Indice
inline Standard_Integer BRepMesh_FastDiscret::NbPoint3d() const inline Standard_Integer BRepMesh_FastDiscret::NbPoint3d() const
{ {
return nbLocat; return myNbLocat;
} }
//======================================================================= //=======================================================================
@ -83,7 +73,7 @@ inline Standard_Integer BRepMesh_FastDiscret::NbPoint3d() const
inline const gp_Pnt& BRepMesh_FastDiscret::Point3d(const Standard_Integer Index) const inline const gp_Pnt& BRepMesh_FastDiscret::Point3d(const Standard_Integer Index) const
{ {
return Location3d(Index); return myLocation3d(Index);
} }
//======================================================================= //=======================================================================
@ -103,7 +93,7 @@ inline Standard_Boolean BRepMesh_FastDiscret::WithShare() const
inline Standard_Boolean BRepMesh_FastDiscret::InShape() const inline Standard_Boolean BRepMesh_FastDiscret::InShape() const
{ {
return myinshape; return myInshape;
} }
//======================================================================= //=======================================================================
@ -113,5 +103,5 @@ inline Standard_Boolean BRepMesh_FastDiscret::InShape() const
inline Standard_Boolean BRepMesh_FastDiscret::ShapeTrigu() const inline Standard_Boolean BRepMesh_FastDiscret::ShapeTrigu() const
{ {
return myshapetrigu; return myShapetrigu;
} }

View File

@ -17,8 +17,6 @@ uses Boolean from Standard,
Face from TopoDS, Face from TopoDS,
Edge from TopoDS, Edge from TopoDS,
Vertex from TopoDS, Vertex from TopoDS,
ListOfShape from TopTools,
Dir from gp,
Pnt from gp, Pnt from gp,
Pnt2d from gp, Pnt2d from gp,
XY from gp, XY from gp,
@ -33,95 +31,93 @@ uses Boolean from Standard,
Triangle from BRepMesh, Triangle from BRepMesh,
Edge from BRepMesh, Edge from BRepMesh,
Vertex from BRepMesh, Vertex from BRepMesh,
Status from BRepMesh,
FaceAttribute from BRepMesh, FaceAttribute from BRepMesh,
Curve from Geom2d,
ListOfInteger from TColStd, ListOfInteger from TColStd,
BaseAllocator from MeshDS, BaseAllocator from MeshDS,
MapOfInteger from MeshDS,
DataMapOfIntegerPnt from BRepMesh, DataMapOfIntegerPnt from BRepMesh,
IndexedMapOfInteger from TColStd, IndexedMapOfInteger from TColStd,
IndexedMapOfReal from TColStd, IndexedMapOfReal from TColStd,
DataMapOfShapePairOfPolygon from BRepMesh DataMapOfShapePairOfPolygon from BRepMesh,
Triangulation from Poly,
Location from TopLoc
is is
Create (angle : Real from Standard; Create (theAngle : Real from Standard;
withShare : Boolean from Standard=Standard_True; theWithShare : Boolean from Standard=Standard_True)
inshape : Boolean from Standard=Standard_False;
shapetrigu : Boolean from Standard=Standard_False)
returns mutable FastDiscretFace from BRepMesh; returns mutable FastDiscretFace from BRepMesh;
Add (me : mutable; Add (me : mutable;
face : Face from TopoDS; theFace : Face from TopoDS;
attrib : FaceAttribute from BRepMesh; theAttrib : FaceAttribute from BRepMesh;
mapdefle : DataMapOfShapeReal from TopTools) theMapDefle : DataMapOfShapeReal from TopTools)
is static; is static;
Add (me : mutable; Add (me : mutable;
theVert: Vertex from TopoDS; theVert : Vertex from TopoDS;
face : Face from TopoDS; theFace : Face from TopoDS;
S : HSurface from BRepAdaptor) is private; theSFace : HSurface from BRepAdaptor) is private;
Update (me: mutable; RestoreStructureFromTriangulation
Edge: Edge from TopoDS; (me: mutable;
Face: Face from TopoDS; theEdge : Edge from TopoDS;
C : Curve from Geom2d; theFace : Face from TopoDS;
defedge: Real from Standard; theSurf : HSurface from BRepAdaptor;
first : Real from Standard; theTrigu : Triangulation from Poly;
last : Real from Standard) theDefEdge : Real from Standard;
theLoc : Location from TopLoc)
returns Boolean; returns Boolean from Standard is protected;
InternalVertices InternalVertices (me : mutable;
(me : mutable; theCaro : HSurface from BRepAdaptor;
caro : HSurface from BRepAdaptor; theInternalV : in out ListOfVertex from BRepMesh;
inter : in out ListOfVertex from BRepMesh; theDefFace : Real from Standard;
defedge : Real from Standard; theClassifier : ClassifierPtr from BRepMesh)
classifier : ClassifierPtr from BRepMesh)
is static private; is static private;
Control Control (me : mutable;
(me : mutable; theCaro : HSurface from BRepAdaptor;
caro : HSurface from BRepAdaptor; theDefFace : Real from Standard;
defface : Real from Standard; theInternalV : in out ListOfVertex from BRepMesh;
inter : in out ListOfVertex from BRepMesh; theBadTriangles : in out ListOfInteger from TColStd;
badTri : in out ListOfInteger from TColStd; theNulTriangles : in out ListOfInteger from TColStd;
nulTri : in out ListOfInteger from TColStd; theTrigu : in out Delaun from BRepMesh;
trigu : in out Delaun from BRepMesh; theIsFirst : Boolean from Standard)
isfirst : Boolean from Standard)
returns Real from Standard is static; returns Real from Standard is static;
FindUV(me: mutable; V: Vertex from TopoDS; FindUV (myclass;
XY: Pnt2d from gp; theV : Vertex from TopoDS;
ip: Integer from Standard; theXY : Pnt2d from gp;
S : HSurface from BRepAdaptor; theIp : Integer from Standard;
mindist: Real from Standard) theSFace : HSurface from BRepAdaptor;
theMinDist : Real from Standard;
theLocation2dMap: in out DataMapOfIntegerListOfXY from BRepMesh)
returns XY from gp; returns XY from gp;
AddInShape(me: mutable; face : Face from TopoDS; AddInShape (me: mutable;
defedge: Real from Standard) theFace : Face from TopoDS;
theDefFace: Real from Standard)
is static private; is static private;
-- Output : -- Output :
Triangle (me; Triangle (me;
Index : Integer from Standard) theIndex : Integer from Standard)
---Purpose: Gives the triangle of <Index>. ---Purpose: Gives the triangle of <Index>.
---C++: return const & ---C++: return const &
returns Triangle from BRepMesh returns Triangle from BRepMesh
is static; is static;
Edge (me; Edge (me;
Index : Integer from Standard) theIndex : Integer from Standard)
---Purpose: Gives the edge of index <Index>. ---Purpose: Gives the edge of index <Index>.
---C++: return const & ---C++: return const &
returns Edge from BRepMesh returns Edge from BRepMesh
@ -129,34 +125,31 @@ is
Vertex (me; Vertex (me;
Index : Integer from Standard) theIndex : Integer from Standard)
---Purpose: Gives the vertex of <Index>. ---Purpose: Gives the vertex of <Index>.
---C++: return const & ---C++: return const &
returns Vertex from BRepMesh returns Vertex from BRepMesh
is static; is static;
Pnt (me; Pnt (me;
Index : Integer from Standard) theIndex : Integer from Standard)
---Purpose: Gives the location3d of the vertex of <Index>. ---Purpose: Gives the location3d of the vertex of <Index>.
---C++: return const & ---C++: return const &
returns Pnt from gp returns Pnt from gp
is static; is static;
fields fields
angle : Real from Standard; myAngle : Real from Standard;
WithShare : Boolean from Standard; myWithShare : Boolean from Standard;
vertices : DataMapOfVertexInteger from BRepMesh; myVertices : DataMapOfVertexInteger from BRepMesh;
edges : DataMapOfShapePairOfPolygon from BRepMesh; myInternaledges : DataMapOfShapePairOfPolygon from BRepMesh;
internaledges: DataMapOfShapePairOfPolygon from BRepMesh; myNbLocat : Integer from Standard;
nbLocat : Integer from Standard; myLocation3d : DataMapOfIntegerPnt from BRepMesh;
Location3d : DataMapOfIntegerPnt from BRepMesh; myStructure : DataStructureOfDelaun from BRepMesh;
structure : DataStructureOfDelaun from BRepMesh; myListver : ListOfVertex from BRepMesh;
mylistver : ListOfVertex from BRepMesh; myVemap : IndexedMapOfInteger from TColStd;
myvemap : IndexedMapOfInteger from TColStd; myLocation2d : DataMapOfIntegerListOfXY from BRepMesh;
mylocation2d : DataMapOfIntegerListOfXY from BRepMesh; myAttrib : FaceAttribute from BRepMesh;
myattrib : FaceAttribute from BRepMesh;
myshapetrigu : Boolean from Standard;
myinshape : Boolean from Standard;
myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices
myUParam : IndexedMapOfReal from TColStd; myUParam : IndexedMapOfReal from TColStd;
myVParam : IndexedMapOfReal from TColStd; myVParam : IndexedMapOfReal from TColStd;

File diff suppressed because it is too large Load Diff