View Issue Details

IDProjectCategoryView StatusLast Update
0024005CommunityOCCT:Modeling Algorithmspublic2013-12-19 13:58
ReporterAaron Michalk Assigned Tobugmaster  
PrioritynormalSeveritymajor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2010 
Product Version6.5.5 
Target Version6.7.0Fixed in Version6.7.0 
Summary0024005: Intersecting a slightly off angle plane with a cylinder takes 7+ seconds
DescriptionIntersecting a slightly off angle plane with a cylinder takes 7+ seconds.
Steps To ReproduceExecute the following code:

Handle_Geom_Plane plane(new Geom_Plane(gp_Ax3(gp_Pnt(-72.948737453424499, 754.30437716359393, 259.52151854671678),
                                                gp_Dir(6.2471473085930200e-007, -0.99999999999980493, 0.00000000000000000),
                                                gp_Dir(0.99999999999980493, 6.2471473085930200e-007, 0.00000000000000000))));
Handle_Geom_CylindricalSurface cylinder(new Geom_CylindricalSurface(gp_Ax3(gp_Pnt(-6.4812490053250649, 753.39408794522092, 279.16400974257465),
                                                                            gp_Dir(1.0000000000000000, 7.4301205790404839e-016, -0.00000000000000000),
                                                                            gp_Dir(-7.4301205790404839e-016, 1.0000000000000000, 0.00000000000000000)),
                                                                    19.712534607908712));
BRep_Builder builder;
TopoDS_Face face1, face2;
builder.MakeFace(face1, plane, Precision::Confusion());
builder.MakeFace(face2, cylinder, Precision::Confusion());
IntTools_FaceFace intersection;
intersection.SetParameters(false, true, true, Precision::Confusion());
intersection.Perform(face1, face2);
TagsNo tags attached.
Test case numberbugs modalg_5(010) bug24005

Attached Files

  • zoom_eelipse.bmp (2,315,574 bytes)

Activities

mkv

2013-07-16 10:35

tester   ~0025071

Dear BugMaster,

Branch CR24005 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: a5428249eb092eac2ab1530278818391109aa696

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 8 (8 on master)

products component :
Linux: 0 (0 on master)
Windows: 63 (63 on master)

Regressions:
http://occt-tests/CR24005-master-occt/Windows-32-VC9/summary.html
http://occt-tests/CR24005-master-occt/Debian60-64/summary.html
boolean bfuse_complex(013) R2
bugs modalg_5(010) bug23985

Improvements:
No improvements

There are following differences in images found by testdiff.
http://occt-tests/CR24005-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
http://occt-tests/CR24005-master-occt/Debian60-64/diff-Debian60-64.html
IMAGE boolean bcut_complex K6: K6.png differs

nbv

2013-09-16 10:36

developer   ~0025583

Intersection result is an ellipse:

Ellipse
  Center :-1457200.77589906, 753.394087945221, 279.164009742575
  Axis :6.24714730859302e-007, -0.999999999999805, 0
  XAxis :0.999999999999805, 6.24714730859302e-007, 0
  YAxis :-0, 0, 1
  Radii :31554457.7935499, 19.7125346079087

Major radius of this ellipse is greater than minor radius in 1’600’730.6224786639 times.

Declared accuracy by CASCADE algorithms (for parameters value) is equal to 1e-9 (Precision::PConfusion()). For the found ellipse (it is “res” DRAW-variable), we have following:

        Draw[5]> cval res 1.551269784 x1 y1 z1
        Draw[7]> cval res 1.551269785 x2 y2 z2
        Draw[9]> dset ls (x1-x2)^2+(y1-y2)^2+(z1-z2)^2
        Draw[10]> dval sqrt(ls)
                        0.17761879938580066

I.e. small parameter step (1e-9) results in quite big step in the ellipse. Therefore, work with this ellipse is very difficult.

CASCADE guaranties stable work with ellipses, major radius of which is less on equal than 100’000 minor radiuses.

nbv

2013-09-16 10:50

developer   ~0025584

Last edited: 2013-09-16 10:50

Information for testing:

There is ready script to this bug:

pload ALL
pload QAcommands
dchrono cr start
puts [OCC24005 res]
dchrono cr stop
puts [dchrono cr show]

"OCC24005" DRAW-command is in src\QABugs\QABugs_19.cxx file.
Output is:

pln
cyl
res
Elapsed time: 0 Hours 0 Minutes 0.0930869244853 Seconds
CPU user time: 0.03125 seconds
CPU system time: 0 seconds

pln - DRAW-variable of given plane;
cyl - DRAW-variable of given cylinder;
res - DRAW-variable of result.

General execution time is 0.03125 seconds.

nbv

2013-09-16 10:53

developer   ~0025585

CR24005_1 is ready to review.

ifv

2013-09-16 14:30

developer   ~0025590

Fix is wrong

nbv

2013-09-17 17:03

developer   ~0025605

Branch CR24005_2 is ready to review.

ifv

2013-09-17 18:14

developer   ~0025607

Try to implement all treating in IntTools_FaceFace, do not change BOPTools

nbv

2013-09-18 11:56

developer   ~0025629

CR24005_3 is ready to review.

ifv

2013-09-18 12:27

developer   ~0025630

Ok

nbv

2013-09-19 09:58

developer  

zoom_eelipse.bmp (2,315,574 bytes)

nbv

2013-09-19 09:59

developer   ~0025642

Result is the ellipse with Radii 31554457.7935499 and 19.7125346079087 (see "dump res" DRAW-command).

In viewer it is shown as one line because to look 19.7125346079087 units on background 31554457.7935499 is very difficulty.

If we do "wzoom" then we will see some parts of the ellipse (see "zoom_eelipse.bmp" attached file).



Dear Mikhail!
Please use "dump res" DRAW-command in test case, if you did not do it.

mkv

2013-09-19 12:04

tester   ~0025645

Dear BugMaster,

Branch CR24005_3 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: e81c6d12b31e8fb5b490e12cb8c3e5258191651d

Number of compiler warnings:

occt component :
Linux: 782 (790 on master)
Windows: 392 (392 on master)

products component :
Linux: 191 (190 on master)
Windows: 287 (287 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
http://occt-tests/CR24005-3-master-occt/Debian60-64/bugs/modalg_5/bug24005.html
http://occt-tests/CR24005-3-master-occt/Windows-32-VC9/bugs/modalg_5/bug24005.html
bugs modalg_5(010) bug24005 is OK.

Testing on Linux:
Total MEMORY difference: 366645040 / 366609736
Total CPU difference: 48755.51000000068 / 43410.01000000102

Testing on Windows:
Total MEMORY difference: 428401396 / 429267924
Total CPU difference: 43244.53125 / 38316.4375

There are not differences in images found by testdiff.

Related Changesets

occt: master 788cbaf4

2013-09-19 12:46:17

nbv


Committer: bugmaster Details Diff
0024005: Intersecting a slightly off angle plane with a cylinder takes 7+ seconds

Checking of possibility of bad result.
Adding test case for issue CR24005
Correction of test case for issue CR24005
Affected Issues
0024005
mod - src/ChFi3d/ChFi3d_Builder_0.cxx Diff File
mod - src/Draft/Draft_Modification_1.cxx Diff File
mod - src/IntAna/IntAna_QuadQuadGeo.cxx Diff File
mod - src/IntPatch/IntPatch_GLine.cxx Diff File
mod - src/IntPatch/IntPatch_ImpImpIntersection_2.gxx Diff File
mod - src/IntPatch/IntPatch_Intersection.cdl Diff File
mod - src/IntPatch/IntPatch_Intersection.cxx Diff File
mod - src/IntTools/IntTools_FaceFace.cdl Diff File
mod - src/IntTools/IntTools_FaceFace.cxx Diff File
mod - src/QABugs/QABugs_19.cxx Diff File
add - tests/bugs/modalg_5/bug24005 Diff File

occt: master f92826eb

2013-10-04 08:39:02

bugmaster

Details Diff
0024005: Intersecting a slightly off angle plane with a cylinder takes 7+ seconds
Update testing case
Affected Issues
0024005
mod - tests/bugs/modalg_5/bug24005 Diff File

Issue History

Date Modified Username Field Change
2013-05-31 03:25 Aaron Michalk New Issue
2013-05-31 03:25 Aaron Michalk Assigned To => ifv
2013-07-08 10:52 ifv Assigned To ifv => nbv
2013-07-16 10:35 mkv Note Added: 0025071
2013-09-16 10:00 nbv Status new => assigned
2013-09-16 10:36 nbv Note Added: 0025583
2013-09-16 10:50 nbv Note Added: 0025584
2013-09-16 10:50 nbv Note Edited: 0025584
2013-09-16 10:53 nbv Note Added: 0025585
2013-09-16 10:53 nbv Assigned To nbv => ifv
2013-09-16 10:53 nbv Status assigned => resolved
2013-09-16 14:30 ifv Note Added: 0025590
2013-09-16 14:30 ifv Status resolved => feedback
2013-09-16 17:03 ifv Assigned To ifv => nbv
2013-09-17 17:03 nbv Note Added: 0025605
2013-09-17 17:03 nbv Assigned To nbv => ifv
2013-09-17 17:03 nbv Status feedback => resolved
2013-09-17 18:14 ifv Note Added: 0025607
2013-09-17 18:14 ifv Assigned To ifv => nbv
2013-09-17 18:14 ifv Status resolved => feedback
2013-09-18 11:56 nbv Note Added: 0025629
2013-09-18 11:56 nbv Assigned To nbv => ifv
2013-09-18 11:56 nbv Status feedback => resolved
2013-09-18 12:27 ifv Note Added: 0025630
2013-09-18 12:27 ifv Status resolved => reviewed
2013-09-18 15:25 mkv Assigned To ifv => mkv
2013-09-19 09:58 nbv File Added: zoom_eelipse.bmp
2013-09-19 09:59 nbv Note Added: 0025642
2013-09-19 12:04 mkv Note Added: 0025645
2013-09-19 12:05 mkv Test case number => bugs modalg_5(010) bug24005
2013-09-19 12:05 mkv Assigned To mkv => bugmaster
2013-09-19 12:05 mkv Status reviewed => tested
2013-09-19 15:50 bugmaster Target Version => 6.7.0
2013-09-20 15:44 bugmaster Changeset attached => occt master 788cbaf4
2013-09-20 15:44 bugmaster Status tested => verified
2013-09-20 15:44 bugmaster Resolution open => fixed
2013-10-04 12:48 bugmaster Changeset attached => occt master f92826eb
2013-12-19 13:52 bugmaster Status verified => closed
2013-12-19 13:58 bugmaster Fixed in Version => 6.7.0