Archived issue #0032859
Modeling Algorithms - BRepLib_FindSurface not return an expect plane
Description
there are two bugs :
> bug1: we expect plane's dx is [1, 0, 0], but return [0, 1, 0], After analyse I find that the return normal is [0, 2.[revision removed]-33,1], it should be [0, 0, 1]
we can use newell's method to calc the normal
> bug2: The wire is made by Steps to reproduce the problem, then invoke the BRepLib_FindSurface function, it returns plan1. After serialize and deserialize the wire, the BRepLib_FindSurface function return plane2. plane1 and plane2 are different.
After anylise I find deserialize has changed the first Edge's data, I think deserialize should not change the input data[Attachment 2 (BREP)]
> this isuee fix the first bug
> bug1: we expect plane's dx is [1, 0, 0], but return [0, 1, 0], After analyse I find that the return normal is [0, 2.[revision removed]-33,1], it should be [0, 0, 1]
we can use newell's method to calc the normal
> bug2: The wire is made by Steps to reproduce the problem, then invoke the BRepLib_FindSurface function, it returns plan1. After serialize and deserialize the wire, the BRepLib_FindSurface function return plane2. plane1 and plane2 are different.
After anylise I find deserialize has changed the first Edge's data, I think deserialize should not change the input data[Attachment 2 (BREP)]
> this isuee fix the first bug
Steps to reproduce
gp_Pnt pt0(-500, 25, -6);
gp_Pnt pt1(-450, -25, -6);
gp_Pnt pt2(450, -25, -6);
gp_Pnt pt3(500, 25, -6);
BRepBuilderAPI_MakeVertex v0(pt0);
TopoDS_Vertex vertex0 = v0.Vertex();
BRepBuilderAPI_MakeVertex v1(pt1);
TopoDS_Vertex vertex1 = v1.Vertex();
BRepBuilderAPI_MakeVertex v2(pt2);
TopoDS_Vertex vertex2 = v2.Vertex();
BRepBuilderAPI_MakeVertex v3(pt3);
TopoDS_Vertex vertex3 = v3.Vertex();
BRepBuilderAPI_MakeEdge e0(vertex0, vertex1);
TopoDS_Edge edge0 = e0.Edge();
BRepBuilderAPI_MakeEdge e1(vertex1, vertex2);
TopoDS_Edge edge1 = e1.Edge();
BRepBuilderAPI_MakeEdge e2(vertex2, vertex3);
TopoDS_Edge edge2 = e2.Edge();
BRepBuilderAPI_MakeEdge e3(vertex3, vertex0);
TopoDS_Edge edge3 = e3.Edge();
BRepBuilderAPI_MakeWire w0(edge0, edge1, edge2, edge3);
TopoDS_Wire wire = w0.Wire();
BRepLib_FindSurface findPlane(wire);
Handle(Geom_Surface) plane = findPlane.Surface();
gp_Pnt pt1(-450, -25, -6);
gp_Pnt pt2(450, -25, -6);
gp_Pnt pt3(500, 25, -6);
BRepBuilderAPI_MakeVertex v0(pt0);
TopoDS_Vertex vertex0 = v0.Vertex();
BRepBuilderAPI_MakeVertex v1(pt1);
TopoDS_Vertex vertex1 = v1.Vertex();
BRepBuilderAPI_MakeVertex v2(pt2);
TopoDS_Vertex vertex2 = v2.Vertex();
BRepBuilderAPI_MakeVertex v3(pt3);
TopoDS_Vertex vertex3 = v3.Vertex();
BRepBuilderAPI_MakeEdge e0(vertex0, vertex1);
TopoDS_Edge edge0 = e0.Edge();
BRepBuilderAPI_MakeEdge e1(vertex1, vertex2);
TopoDS_Edge edge1 = e1.Edge();
BRepBuilderAPI_MakeEdge e2(vertex2, vertex3);
TopoDS_Edge edge2 = e2.Edge();
BRepBuilderAPI_MakeEdge e3(vertex3, vertex0);
TopoDS_Edge edge3 = e3.Edge();
BRepBuilderAPI_MakeWire w0(edge0, edge1, edge2, edge3);
TopoDS_Wire wire = w0.Wire();
BRepLib_FindSurface findPlane(wire);
Handle(Geom_Surface) plane = findPlane.Surface();
Public activity
9 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: gelin
Date: Wed Mar 2 11:17:31 2022 +0800
0032859: BRepLib_FindSurface not return an excepted plane
[revision removed]
Detailed log of new commits:
Author: gelin
Date: Wed Mar 2 11:17:31 2022 +0800
0032859: BRepLib_FindSurface not return an excepted plane
Commenter 2, you everywhere in this bug use the word "excepted" (synonym "excluded"). Did you mean "expected" ("anticipated")?
Branch [archived branch] has been created by Participant.
[revision removed]
No new revisions were added by this update.
[revision removed]
No new revisions were added by this update.
Branch CR32859_1 is ready for review
Test results:
http://jenkins-test-08.nnov.opencascade.com/view/CR32859_1-master-ifv/view/COMPARE/
Test results:
http://jenkins-test-08.nnov.opencascade.com/view/CR32859_1-master-ifv/view/COMPARE/
Reviewed. Please integrate CR32859_1 into OCCT.
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - changes and them, and you can discard any commits you make in this
[revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18959.200000000466 / 18756.090000000648 [+1.08%]
Products
Total CPU difference: 12020.780000000137 / 11992.830000000133 [+0.23%]
Windows-64-VC14:
OCCT
Total CPU difference: 20894.5625 / 20851.65625 [+0.21%]
Products
Total CPU difference: 13470.484375 / 13574.0625 [-0.76%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - changes and them, and you can discard any commits you make in this
[revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.
Number of compiler warnings:
No new/fixed warnings
Regressions/Differences/Improvements:
No regressions/differences
CPU differences:
Debian80-64:
OCCT
Total CPU difference: 18959.200000000466 / 18756.090000000648 [+1.08%]
Products
Total CPU difference: 12020.780000000137 / 11992.830000000133 [+0.23%]
Windows-64-VC14:
OCCT
Total CPU difference: 20894.5625 / 20851.65625 [+0.21%]
Products
Total CPU difference: 13470.484375 / 13574.0625 [-0.76%]
Image differences :
No differences that require special attention
Memory differences :
No differences that require special attention
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]