mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023860: Bad memory access intersecting two nearly coincident cylindrical faces
Test of 2 nearly coincident cylindrical faces intersection is added
This commit is contained in:
@@ -103,7 +103,7 @@ static Standard_Integer mkvolume (Draw_Interpretor&, Standard_Integer, const c
|
||||
"-na - disables the approximation of the section curves.\n",
|
||||
__FILE__, bsection, g);
|
||||
//
|
||||
theCommands.Add("bopcurves", "use bopcurves F1 F2 [-2d/-2d1/-2d2] "
|
||||
theCommands.Add("bopcurves", "use bopcurves F1 F2 [-2d/-2d1/-2d2] [-noapprox] "
|
||||
"[-p u1 v1 u2 v2 (to add start points] [-v (for extended output)]",
|
||||
__FILE__, bopcurves, g);
|
||||
theCommands.Add("mkvolume", "make solids from set of shapes.\nmkvolume r b1 b2 ... [-c] [-ni] [-ai]",
|
||||
@@ -544,7 +544,7 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
|
||||
const char** a)
|
||||
{
|
||||
if (n<3) {
|
||||
di << "Usage: bopcurves F1 F2 [-2d/-2d1/-2d2] "
|
||||
di << "Usage: bopcurves F1 F2 [-2d/-2d1/-2d2] [-noapprox] "
|
||||
"[-p u1 v1 u2 v2 (to add start points] [-v (for extended output)]\n";
|
||||
return 1;
|
||||
}
|
||||
@@ -597,6 +597,9 @@ Standard_Integer bopcurves (Draw_Interpretor& di,
|
||||
else if (!strcasecmp(a[i],"-2d2")) {
|
||||
aToApproxC2dOnS2 = Standard_True;
|
||||
}
|
||||
else if (!strcasecmp(a[i],"-noapprox")) {
|
||||
aToApproxC3d = Standard_False;
|
||||
}
|
||||
else if (!strcasecmp(a[i],"-p")) {
|
||||
IntSurf_PntOn2S aPt;
|
||||
const Standard_Real aU1 = Draw::Atof(a[++i]);
|
||||
|
39
tests/bugs/modalg_8/bug23860
Normal file
39
tests/bugs/modalg_8/bug23860
Normal file
@@ -0,0 +1,39 @@
|
||||
puts "================================================="
|
||||
puts "0023860: Bad memory access intersecting two nearly coincident cylindrical faces"
|
||||
puts "================================================="
|
||||
puts ""
|
||||
|
||||
cylinder c1 1031.3339148728076 -113.25868616662650 56.152387686082520 \
|
||||
-0.86602540378443815 0.50000000000000089 0.00000000000000000 \
|
||||
-0.50000000000000089 -0.86602540378443815 0.00000000000000000 \
|
||||
76.499999999999986
|
||||
cylinder c2 1017.0706583606553 -103.24955863669388 56.152387686082548 \
|
||||
0.86602540378443915 -0.49999999999999933 0.00000000000000000 \
|
||||
0.49999999999999933 0.86602540378443915 0.00000000000000000 \
|
||||
76.499999999999986
|
||||
mkface f1 c1
|
||||
mkface f2 c2
|
||||
|
||||
set curves_found [lindex [split [bopcurves f1 f2 -2d -noapprox] "\n"] 1]
|
||||
if { $curves_found != "2 curve(s) found." } {
|
||||
puts "Error wrong curves number"
|
||||
}
|
||||
|
||||
smallview
|
||||
donly c_1 c_2
|
||||
fit
|
||||
xwd ${imagedir}/${casename}_1.png
|
||||
|
||||
set lines [split [dump c_1] "\n"]
|
||||
|
||||
if { [lindex $lines 4] != " Origin :1031.71804748645, -112.593348962955, -20.34375449469 " ||
|
||||
[lindex $lines 5] != " Axis :-0.866025403784438, 0.500000000000001, 0 " } {
|
||||
puts "Error: wrong first curve"
|
||||
}
|
||||
|
||||
set lines [split [dump c_2] "\n"]
|
||||
|
||||
if { [lindex $lines 4] != " Origin :1031.71804748645, -112.593348962957, 132.648529866855 " ||
|
||||
[lindex $lines 5] != " Axis :-0.866025403784438, 0.500000000000001, 0 "} {
|
||||
puts "Error: wrong second curve"
|
||||
}
|
Reference in New Issue
Block a user