MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0023948Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2013-05-08 12:052014-11-11 12:58
Reporterifv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformAOSLOS VersionL
Product Version[OCCT] 6.6.0 
Target Version[OCCT] 6.8.0Fixed in Version[OCCT] 6.8.0 
Summary0023948: Wrong intersection between a surface of revolution and a plane.
DescriptionThe issue is aftermath of 0022766: Wrong results done by several algorithms for the case of intersection between a surface of revolution and a plane.
Source shapes are a couple of faces f1, f2.
Source shapes are attached to 0022766,

Case 2.
The intersection between two faces produces 4 curves c_1, c_2, c_3, c_4.
c_1 - seems to be Ok;
c_2 - seems to have wrong derivative on the end with maximal value of the parameter;
c_3 - is BSplineCurve[Degree 1, 2 Poles, 2 Knots]. The two poles are equal 3D-points;
c_4 - the same as c_3;
-------------
Case 3.
 c_1 is the intesection curve between s1, s2;
 The 3D-points Pi [i=1,2...NbP] are taken from c_1 at different values of the parameter.
 The distances between points Pi [i=1,2...NbP] and s2 obtained by projection algorithm are wrong.
Steps To Reproduce#-------------------
#Case 2
restore f1
restore f2
bopcurves f1 f2

#-------------------
#Case 3
restore f1
restore f2
bopcurves f1 f2
mksurf s1 f1
mksurf s2 f2
xdistcs c_1 s2 0 1 10

TagsNo tags attached.
Test case numberbugs modalg_5(010) bug23948_1,bug23948_2
Attached Files? file icon cci.bmp (556,254 bytes) 2013-07-15 15:08
? file icon joint.bmp (1,607,906 bytes) 2013-08-21 14:23
pdf file icon Doc1.pdf (108,645 bytes) 2013-08-28 16:10

- Relationships
child of 0022766closedifv Wrong results done by several algorithms for the case of intersection between a surface of revolution and a plane 

-  Notes
(0025066)
nbv (developer)
2013-07-15 15:12
edited on: 2013-07-15 15:12

This bug is not confirmed.

On MASTER in Case # 2, existing intersection algorithm produces only two curves (c_1 and c_2). They seem to be valid. See attached “cci.bmp” file.

                Draw[]> bopcurves f1 f2
                 Tolerance Reached=8.2086287267263525e-005
                 c_1 c_2

In Case # 3, we have following output:
                Draw[]> xdistcs c_1 s1 0 1 10
                 T=0 D=0
                 T=0.111111 D=0
                 T=0.222222 D=0
                 T=0.333333 D=0
                 T=0.444444 D=0
                 T=0.555556 D=0
                 T=0.666667 D=0
                 T=0.777778 D=0
                 T=0.888889 D=0
                 T=1 D=0

                Draw[]> xdistcs c_1 s2 0 1 10
                 T=0 D=7.94411e-015
                 T=0.111111 D=1.06581e-014
                 T=0.222222 D=8.14029e-015
                 T=0.333333 D=3.97205e-015
                 T=0.444444 D=5.1022e-015
                 T=0.555556 D=1.83103e-015
                 T=0.666667 D=5.32907e-015
                 T=0.777778 D=8.88178e-016
                 T=0.888889 D=1.33227e-015
                 T=1 D=2.06009e-015

                Draw[]> xdistcs c_2 s1 0 1 10
                 T=0 D=0
                 T=0.111111 D=0
                 T=0.222222 D=0
                 T=0.333333 D=0
                 T=0.444444 D=0
                 T=0.555556 D=0
                 T=0.666667 D=0
                 T=0.777778 D=0
                 T=0.888889 D=0
                 T=1 D=0

                Draw[16]> xdistcs c_2 s2 0 1 10
                 T=0 D=7.10543e-015
                 T=0.111111 D=7.10543e-015
                 T=0.222222 D=3.55271e-015
                 T=0.333333 D=1.08052e-014
                 T=0.444444 D=1.98603e-015
                 T=0.555556 D=2.51215e-015
                 T=0.666667 D=0
                 T=0.777778 D=3.55271e-015
                 T=0.888889 D=1.33227e-015
                 T=1 D=6.49437e-017

All distances are OK.

(0025282)
nbv (developer)
2013-08-12 10:34

This bug is not confirmed.
(0025340)
ifv (developer)
2013-08-16 17:36

At list one defect - "c_2 - seems to have wrong derivative on the end with maximal value of the parameter", see case 2, exists and can be seen on cci.bmp;
(0025365)
nbv (developer)
2013-08-21 14:23

We have an intersection the cone (shape is got by revolution of line about axis, which is not perpendicular it) and the plane. Intersection result must be hyperbola. But because we have surface of revolution (not cone), hyperbola is interpolated by B-spline. Joint of two found B- spline curves is showed in attached file joint.bmp.
This joint is smooth. There is difference in orientation only.

Do following script to make sure:

cval c_1 1 x1 y1 z1 dx1 dy1 dz1
cval c_2 1 x2 y2 z2 dx2 dy2 dz2
dset l1s dx1*dx1+dy1*dy1+dz1*dz1
dset l2s dx2*dx2+dy2*dy2+dz2*dz2
dset l1 sqrt(l1s)
dset l2 sqrt(l2s)

dset cosa (dx1*dx2+dy1*dy2+dz1*dz2)/(l1*l2)

Result value of cosa is -1.0000000000000002. I.e. 1st derivatives of c_1 and c_2 are collinear in joint.
(0025366)
nbv (developer)
2013-08-21 14:25

I think, this is no wrong.
(0025402)
nbv (developer)
2013-08-28 16:31
edited on: 2013-08-28 17:29

In an attached Doc1.pdf file, intersection result is studied detail.
Result is the one-sheet hyperboloid (not cone, as it was said above). Cone is found, when source line is in one plane with rotation axis and they are not perpendicular. In our case these lines are skew lines.

In example, two lines (intersection result) are represented by two B-spline curves. c_2 "contains" both one line and part of second line; c_1 contains other part of the second line (see "joint.bmp").

(0025404)
nbv (developer)
2013-08-28 16:55
edited on: 2013-08-28 17:29

For confirmation of previously mentioned, let consider some points in the found curves:
Points on c_1 curve:

Parameter Point
0 (-25, -25, 24.999999999999993)
0.2 (-25, -20.000088459965539, 15.000176919931073)
0.4 (-25, -15.000176919933448, 5.0003538398668921)
0.6 (-25, -10.000265379898702, -4.999469240202596)
0.8 (-25, -5.0003538398623153, -14.999292320275362)
1 (-25, -0.00044229982700724757, -24.999115400345975)
    
Points on c_2 curve:

Parameter Point
0 (-25, 25, 25.000000000000007)
0.2 (-25, 19.997146141002126, 14.994292282004281)
0.4 (-25, 14.994292282003221, 4.9885845640064517)
0.6 (-25, 9.9914384230040998, -5.0171231539917764)
0.8 (-25, 4.9885845640038502, -15.022830871992301)
1 (-25, -0.00044229982700374126, -24.999115400345975)
    
Point (-25, -0.00044229982700374126, -24.999115400345975) is in two curves. But it is in z=-2*y-25 line, whereas point (-25, 4.9885845640038502, -15.022830871992301) (for c_2 curve) is in z=2*y-25 line. All enumerated points of c_1 curve is in z=-2*y-25 line.

(0026629)
nbv (developer)
2013-11-14 16:04

Try the following script, please:

Draw[]> maxtol f1
Draw[]> maxtol f2
Draw[]> proj c_2 -25 0 -25
Draw[]> length ext_1

We get: tolerance is 3.00000e-003, extrema's length (distance between theoretical intersection point of two curves (-25, 0, -25) and found intersection curve) is 0.00082535903692036304 < tolerance.

CONCLUSION:
Intersector works properly. Cause of incorrect result is big tolerance. "Incorrect" intersection point of c_1 and c_2 curves is result of work of IntPatch_TheIWalking algorithm.
(0031021)
pkv (developer)
2014-08-22 07:25

I've checked the test cases of the issue on dev version.
The problems do not exist.


The issue should be closed.
(0031077)
bugmaster (administrator)
2014-08-26 09:54

Dear MKV,

Please create testing case if it is necessary
(0031097)
git (administrator)
2014-08-26 15:20

Branch CR23948 has been created by mkv.

SHA-1: 6074fa18fbf3210f6430a6ec59a6d992aea2becf


Detailed log of new commits:

Author: mkv
Date: Tue Aug 26 15:18:46 2014 +0400

    Adding testing cases

Author: mkv
Date: Tue Aug 26 15:16:21 2014 +0400

    0023948: Wrong intersection between a surface of revolution and a plane.
(0031098)
mkv (tester)
2014-08-26 15:23

Dear BugMaster,
test cases bugs modalg_5(010) bug23948_1,bug23948_2 are created and pushed to new git branch CR23948
(0031450)
git (administrator)
2014-09-08 15:50

Branch CR23948 has been deleted by inv.

SHA-1: 6074fa18fbf3210f6430a6ec59a6d992aea2becf

- Related Changesets
occt: master 6da50d26
Timestamp: 2014-08-28 10:50:35
Author: mkv
Committer: bugmaster
Details ] Diff ]
0023948: Wrong intersection between a surface of revolution and a plane.

Adding testing cases
add - tests/bugs/modalg_5/bug23948_1 Diff ] File ]
add - tests/bugs/modalg_5/bug23948_2 Diff ] File ]

- Issue History
Date Modified Username Field Change
2013-05-08 12:05 ifv New Issue
2013-05-08 12:05 ifv Assigned To => ifv
2013-05-08 12:07 ifv Relationship added child of 0022766
2013-07-08 10:53 ifv Assigned To ifv => nbv
2013-07-15 15:08 nbv File Added: cci.bmp
2013-07-15 15:12 nbv Note Added: 0025066
2013-07-15 15:12 nbv Note Edited: 0025066 View Revisions
2013-08-12 10:34 nbv Note Added: 0025282
2013-08-12 10:34 nbv Assigned To nbv => ifv
2013-08-12 10:34 nbv Status new => resolved
2013-08-16 17:36 ifv Note Added: 0025340
2013-08-16 17:36 ifv Status resolved => feedback
2013-08-21 14:23 nbv Note Added: 0025365
2013-08-21 14:23 nbv File Added: joint.bmp
2013-08-21 14:25 nbv Note Added: 0025366
2013-08-28 16:10 nbv File Added: Doc1.pdf
2013-08-28 16:31 nbv Note Added: 0025402
2013-08-28 16:55 nbv Note Added: 0025404
2013-08-28 16:57 nbv Note Edited: 0025404 View Revisions
2013-08-28 17:29 nbv Note Edited: 0025402 View Revisions
2013-08-28 17:29 nbv Note Edited: 0025404 View Revisions
2013-11-14 16:04 nbv Note Added: 0026629
2013-11-15 12:11 ifv Assigned To ifv => pkv
2013-11-15 12:11 ifv Status feedback => resolved
2013-12-21 10:13 abv Target Version 6.7.0 => 6.7.1
2014-04-04 17:11 abv Target Version 6.7.1 => 6.8.0
2014-08-22 07:25 pkv Note Added: 0031021
2014-08-22 07:26 pkv Assigned To pkv => inv
2014-08-22 07:26 pkv Status resolved => feedback
2014-08-22 08:38 abv Summary Bug is second part of 0022766:Wrong results done by several algorithms for the case of intersection between a surface of revoluti => Wrong intersection between a surface of revolution and a plane.
2014-08-22 08:38 abv Description Updated View Revisions
2014-08-26 09:53 bugmaster Assigned To inv => mkv
2014-08-26 09:54 bugmaster Note Added: 0031077
2014-08-26 15:20 git Note Added: 0031097
2014-08-26 15:23 mkv Note Added: 0031098
2014-08-26 15:23 mkv Test case number => bugs modalg_5(010) bug23948_1,bug23948_2
2014-08-26 15:23 mkv Assigned To mkv => bugmaster
2014-08-26 15:23 mkv Status feedback => tested
2014-08-29 15:32 bugmaster Changeset attached => occt master 6da50d26
2014-08-29 15:32 bugmaster Status tested => verified
2014-08-29 15:32 bugmaster Resolution open => fixed
2014-09-08 15:50 git Note Added: 0031450
2014-11-11 12:45 aiv Fixed in Version => 6.8.0
2014-11-11 12:58 aiv Status verified => closed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker