View Issue Details

IDProjectCategoryView StatusLast Update
0025368CommunityOCCT:Modeling Algorithmspublic2014-11-12 09:53
Reportershoogen Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformLinuxOSDebian 6.0 
Product Version6.7.1 
Target Version6.8.0Fixed in Version6.8.0 
Summary0025368: BREPExtrma DistShapeShape gives wrong result for Sphere and Line
DescriptionI want to get the the intersection point of a Face (or Shell) and a Line. This works well with cylindrical and conical surfaces. But for a sphere there is always a non-zero distance reported, even thou there is an intersection.
TagsNo tags attached.
Test case numberbugs modalg_5(010) bug25368_1, bug25368_2

Attached Files

  • sphere-edge-solution.png (30,559 bytes)

Activities

shoogen

2014-10-14 15:57

reporter   ~0033069

Always was the wrong word. The result for the sphere is correct at it poles.

shoogen

2014-10-14 23:50

reporter   ~0033090

Last edited: 2014-10-14 23:59

the sympton is that the result should include Face/Edge solution, which it does not.

psphere Sphere 5 -90 90 360
polyline Line 0 0 0.2 10 10 0.2

#i haven't yet found out how to reproduce in DRAWEXE
>>> e=doc.Line.Shape.Edges[0]
>>> s=doc.Sphere.Shape.Shells[0]
>>> e.distToShape(s)
#
# distance 3.5298725189445594
# solution1 (Vector (2.4919871588754225, 2.4919871588754225, 0.2), Vector (4.983974317750845, -1.220721639053237e-15, 0.40000000000000024))
# support geom [('Edge', 0, 3.524202037341219, 'Edge', 1, 6.363270887213245)])

shoogen

2014-10-15 00:11

reporter  

sphere-edge-solution.png (30,559 bytes)

shoogen

2014-10-15 00:39

reporter   ~0033091

Last edited: 2014-10-15 00:59

I tried
> psphere Sphere 5 -90 90 360
> polyline Line 0 0 0.2 10 10 0.2
> explode Sphere Sh
> explode Line E
> dist Line_1 Sphere_1
#did not return a result
> distmini d Line_1 Sphere_1
the distance value is : 3.52987
the number of solutions is :1

solution number 1:
the type of the solution on the first shape is 1
the type of the solution on the second shape is 1
the coordinates of the point on the first shape are:
X=2.49199 Y=2.49199 Z=0.2
the coordinates of the point on the second shape are:
X=4.98397 Y=-1.22072e-15 Z=0.4
parameter on the first edge : t= 3.5242
parameter on the second edge : t=6.36327

d_val d

git

2014-10-24 09:46

administrator   ~0033670

Branch CR25368 has been created by aml.

SHA-1: 95e6c80273613fe712dd7e64f2680a9c7f82e68e


Detailed log of new commits:

Author: aml
Date: Fri Oct 24 07:44:40 2014 +0400

    0025368: BREPExtrma DistShapeShape gives wrong result for Sphere and Line
    
    Changed analytical Sphere/Line extrema algorithm.
    Test cases added.

aml

2014-10-24 09:50

developer   ~0033671

Dear ifv,
Please check current state of branch CR25368.

Fixed analytical extrema sphere / line algorithm.

ifv

2014-10-24 10:16

developer   ~0033674

1. There is class, which intersects line and sphere, so it i9s not necessary to write new code in Extrema algo.
2. I think, bechaviour of analitycal Extrema must remain unchanged, intersector algo it is better to use on level of BRepExtrema.

git

2014-10-27 13:40

administrator   ~0033719

Branch CR25368 has been updated forcibly by aml.

SHA-1: 8177fdd552646c6cd19d1088eae51041af85adec

aml

2014-10-27 13:45

developer   ~0033720

Dear ifv,

Please check current state of branch CR25368.

ifv

2014-10-27 16:02

developer   ~0033732

Ok

apv

2014-10-28 16:23

tester   ~0033777

Dear BugMaster,

Branch CR25368 (and products from GIT master) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 8177fdd552646c6cd19d1088eae51041af85adec

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 11 (11 on master)
   Windows: 1 (1 on master)

Regressions/Differences:
Not detected

Testing cases:
bugs modalg_5(010) bug25368_1 - OK
http://occt-tests/CR25368-master-occt/Debian60-64/bugs/modalg_5/bug25368_1.html
http://occt-tests/CR25368-master-occt/Windows-32-VC10/bugs/modalg_5/bug25368_1.html
bugs modalg_5(010) bug25368_2 - OK
http://occt-tests/CR25368-master-occt/Debian60-64/bugs/modalg_5/bug25368_2.html
http://occt-tests/CR25368-master-occt/Windows-32-VC10/bugs/modalg_5/bug25368_2.html

Testing on Linux:
Total MEMORY difference: 371838292 / 371808660
Total CPU difference: 47225.109999999935 / 48296.64000000005

Testing on Windows:
Total MEMORY difference: 276412396 / 273080016
Total CPU difference: 38675.0 / 37050.71875

git

2014-11-12 09:53

administrator   ~0034321

Branch CR25368 has been deleted by inv.

SHA-1: 8177fdd552646c6cd19d1088eae51041af85adec

Related Changesets

occt: master db914841

2014-10-24 03:44:40

aml


Committer: bugmaster Details Diff
0025368: BREPExtrma DistShapeShape gives wrong result for Sphere and Line

Changed analytical Sphere/Line and Cylinder/Line extrema algorithms. Now they search perpendicular and intersection points.
Test cases added.
Affected Issues
0025368
mod - src/Extrema/Extrema_ExtElCS.cxx Diff File
add - tests/bugs/modalg_5/bug25368_1 Diff File
add - tests/bugs/modalg_5/bug25368_2 Diff File

Issue History

Date Modified Username Field Change
2014-10-14 15:48 shoogen New Issue
2014-10-14 15:48 shoogen Assigned To => ifv
2014-10-14 15:57 shoogen Note Added: 0033069
2014-10-14 16:09 ifv Assigned To ifv => aml
2014-10-14 16:10 ifv Status new => assigned
2014-10-14 23:50 shoogen Note Added: 0033090
2014-10-14 23:59 shoogen Note Edited: 0033090
2014-10-15 00:11 shoogen File Added: sphere-edge-solution.png
2014-10-15 00:39 shoogen Note Added: 0033091
2014-10-15 00:59 shoogen Note Edited: 0033091
2014-10-24 09:46 git Note Added: 0033670
2014-10-24 09:50 aml Note Added: 0033671
2014-10-24 09:50 aml Assigned To aml => ifv
2014-10-24 09:50 aml Status assigned => resolved
2014-10-24 10:16 ifv Note Added: 0033674
2014-10-24 10:16 ifv Status resolved => feedback
2014-10-27 10:49 aml Assigned To ifv => aml
2014-10-27 13:40 git Note Added: 0033719
2014-10-27 13:45 aml Note Added: 0033720
2014-10-27 13:45 aml Assigned To aml => ifv
2014-10-27 13:45 aml Status feedback => resolved
2014-10-27 16:02 ifv Note Added: 0033732
2014-10-27 16:02 ifv Assigned To ifv => bugmaster
2014-10-27 16:02 ifv Status resolved => reviewed
2014-10-27 18:12 apv Assigned To bugmaster => apv
2014-10-28 16:20 apv Test case number => bugs modalg_5(010) bug25368_1, bug25368_2
2014-10-28 16:23 apv Note Added: 0033777
2014-10-28 16:23 apv Assigned To apv => bugmaster
2014-10-28 16:23 apv Status reviewed => tested
2014-10-30 10:17 bugmaster Target Version => 6.8.0
2014-10-31 14:03 bugmaster Changeset attached => occt master db914841
2014-10-31 14:03 bugmaster Status tested => verified
2014-10-31 14:03 bugmaster Resolution open => fixed
2014-11-11 12:43 aiv Fixed in Version => 6.8.0
2014-11-11 13:03 aiv Status verified => closed
2014-11-12 09:53 git Note Added: 0034321