Archived issue #0023860
Bad memory access intersecting two nearly coincident cylindrical faces
Description
Executing the following code results in an access violation in Release on Windows and MacOS. It throws an exception in debug.
Steps to reproduce
gp_Ax3 axes1(gp_Pnt(1031.3339148728076, -113.25868616662650, 56.152387686082520),
gp_Dir(-0.86602540378443815, 0.50000000000000089, 0.00000000000000000),
gp_Dir(-0.50000000000000089, -0.86602540378443815, 0.00000000000000000));
Handle(Geom_CylindricalSurface) surface1(new Geom_CylindricalSurface(axes1, 76.499999999999986));
gp_Ax3 axes2(gp_Pnt(1017.0706583606553, -103.24955863669388, 56.152387686082548),
gp_Dir(0.86602540378443915, -0.49999999999999933, 0.00000000000000000),
gp_Dir(0.49999999999999933, 0.86602540378443915, 0.00000000000000000));
Handle(Geom_CylindricalSurface) surface2(new Geom_CylindricalSurface(axes2, 76.499999999999986));
BRep_Builder builder;
TopoDS_Face face1;
TopoDS_Face face2;
builder.MakeFace(face1, surface1, Precision::Confusion());
builder.MakeFace(face2, surface2, Precision::Confusion());
IntTools_FaceFace intersection;
intersection.SetParameters(false, true, true, Precision::Confusion());
intersection.Perform(face1, face2);
gp_Dir(-0.86602540378443815, 0.50000000000000089, 0.00000000000000000),
gp_Dir(-0.50000000000000089, -0.86602540378443815, 0.00000000000000000));
Handle(Geom_CylindricalSurface) surface1(new Geom_CylindricalSurface(axes1, 76.499999999999986));
gp_Ax3 axes2(gp_Pnt(1017.0706583606553, -103.24955863669388, 56.152387686082548),
gp_Dir(0.86602540378443915, -0.49999999999999933, 0.00000000000000000),
gp_Dir(0.49999999999999933, 0.86602540378443915, 0.00000000000000000));
Handle(Geom_CylindricalSurface) surface2(new Geom_CylindricalSurface(axes2, 76.499999999999986));
BRep_Builder builder;
TopoDS_Face face1;
TopoDS_Face face2;
builder.MakeFace(face1, surface1, Precision::Confusion());
builder.MakeFace(face2, surface2, Precision::Confusion());
IntTools_FaceFace intersection;
intersection.SetParameters(false, true, true, Precision::Confusion());
intersection.Perform(face1, face2);
Public activity
23 archived notes
Participants are labeled by their role within this record.
It is needed to create a test case.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: vmigunov
Date: Wed Jun 29 09:58:57 2022 +0300
0023860: Bad memory access intersecting two nearly coincident cylindrical faces
Test of 2 nearly coincident cylindrical faces intersection is added
[revision removed]
Detailed log of new commits:
Author: vmigunov
Date: Wed Jun 29 09:58:57 2022 +0300
0023860: Bad memory access intersecting two nearly coincident cylindrical faces
Test of 2 nearly coincident cylindrical faces intersection is added
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
See branch CR23860
No need to convert curves to edges:
Check of picture for each edge is redundant:
Both edges could be shown at once, you may use
Also, I would expect the check of some numeric values of the result, at least the number of curves, and probably some other values of those curves.
mkedge e1 c_1 mkedge e2 c_2
Check of picture for each edge is redundant:
checkview -display e1 -2d -path ${imagedir}/${test_image}_e1.png
checkview -display e2 -2d -path ${imagedir}/${test_image}_e2.png
Both edges could be shown at once, you may use
xwd ${imagedir}/${test_image}.png
Also, I would expect the check of some numeric values of the result, at least the number of curves, and probably some other values of those curves.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Done. See branch CR23860.
Commenter 3, please make review of this patch.
Please, use construction 'puts "REQUIRED ALL"' in case with bad but expected function behavior.
In this case, nessesary to use another tcl constructions like:
set r [expr]
if {$r != val} { puts "error" }
In this case, nessesary to use another tcl constructions like:
set r [expr]
if {$r != val} { puts "error" }
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Done. See branch CR23860.
Branch for integrate CR23860
It is needed to pass false in the first parameter of the call to intersection.SetParameters. It is not so when we use bopcurves command.
Please also rerun tests on jenkins.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Please add new option -noapprox instead of -2d12.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
Branch CR23860 seems to be valid
please put a clear resolution of the bug here and into git commit.
From the current discussion and patch it is completely unclear what has been done and for which purpose.
Was bug solved by some other patch?
In which OCCT version it was last reproducible if any?
Please, close current bug.
The problem was resolved in previous versions.
The problem was resolved in previous versions.