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

0022884: The attached face cannot be displayed in shading mode

BRepMesh_Delaun class has been corrected
Extended checking of segments intersection
SquareModulus is used
Detail checking of intersection
Zero division checking
Right segment intersection in MeshPolygon + coding standard
eliminating the test variable
Cleaning up the polygon from internal triangles
This commit is contained in:
oan 2012-05-25 16:17:12 +04:00
parent 416594fec8
commit 90dc2e5b07
3 changed files with 1609 additions and 1041 deletions

View File

@ -28,6 +28,7 @@ class Delaun from BRepMesh
uses Integer from Standard,
SequenceOfInteger from TColStd,
MapOfInteger from TColStd,
Array1OfInteger from TColStd,
Box2d from Bnd,
CircleTool from BRepMesh,
@ -209,16 +210,51 @@ class Delaun from BRepMesh
--vertex : in Vertex from BRepMesh;
---Purpose: Creates the triangles on new nodes
is private;
IntSegSeg (me : in out;
theEdge1 : in Edge from BRepMesh;
theEdge2 : in Edge from BRepMesh)
---Purpose: Check intersection between the two segments.
returns Boolean is private;
KillInternalTriangles(me: in out;
theEdgeId : Integer from Standard;
theIgnoredEdges : in MapOfInteger from TColStd;
theLoopEdges : out MapOfIntegerInteger from BRepMesh)
---Purpose: Removes triangles within polygon
is private;
CleanupMesh(me: in out)
---Purpose: Cleanup mesh from the free triangles
is private;
RemovePivotTriangles(me: in out;
theEdgeInfo : Integer from Standard;
thePivotNode : Integer from Standard;
theInfectedEdges : out MapOfInteger from TColStd;
theLoopEdges : out MapOfIntegerInteger from BRepMesh;
isFirstPass : Boolean from Standard)
---Purpose: Removes triangles around the given pivot node
is private;
CleanupPolygon(me: in out;
thePolygon : in SequenceOfInteger from TColStd;
theInfectedEdges : out MapOfInteger from TColStd;
theLoopEdges : out MapOfIntegerInteger from BRepMesh)
---Purpose: Remove internal triangles from the given polygon
is private;
fields MeshData : DataStructureOfDelaun from BRepMesh;
PositiveOrientation : Boolean from Standard;
tCircles : CircleTool from BRepMesh;
supVert1 : Integer from Standard;
supVert2 : Integer from Standard;
supVert3 : Integer from Standard;
supTrian : Triangle from BRepMesh;
mapEdges : MapOfInteger from BRepMesh;
fields myMeshData : DataStructureOfDelaun from BRepMesh;
myPositiveOrientation : Boolean from Standard;
myCircles : CircleTool from BRepMesh;
mySupVert1 : Integer from Standard;
mySupVert2 : Integer from Standard;
mySupVert3 : Integer from Standard;
mySupTrian : Triangle from BRepMesh;
myMapEdges : MapOfInteger from BRepMesh;
end Delaun;

File diff suppressed because it is too large Load Diff

View File

@ -25,19 +25,19 @@
inline const BRepMesh_Vertex& BRepMesh_Delaun::GetVertex
(const Standard_Integer vIndex) const
{
return MeshData->GetNode(vIndex);
return myMeshData->GetNode(vIndex);
}
inline const BRepMesh_Edge& BRepMesh_Delaun::GetEdge
(const Standard_Integer eIndex) const
{
return MeshData->GetLink(eIndex);
return myMeshData->GetLink(eIndex);
}
inline const BRepMesh_Triangle& BRepMesh_Delaun::GetTriangle
(const Standard_Integer tIndex) const
{
return MeshData->GetElement(tIndex);
return myMeshData->GetElement(tIndex);
}