DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0025892

Wrong result obtained by projection algorithm.

Open CASCADEOCCT:Modeling Algorithmsclosed20 public notes

Search issues

Description

Wrong result obtained by projection algorithm.

Steps to reproduce

# Use the following DRAW commands to reproduce the problem:
#
#----------------------------------001
restore c001 c
restore f001 f
mksurface s f

project cx c s
#
# the result is:
An exception was caught 58004BCC : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x00000000 during 'READ' operation
** Exception ** 58004BCC : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at
address 0x00000000 during 'READ' operation

#----------------------------------002
restore c002 c
restore f002 f
mksurface s f

project cx c s
#
# the result is:
An exception was caught 58004BCC : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x00000000 during 'READ' operation
** Exception ** 58004BCC : OSD_Exception_ACCESS_VIOLATION: ACCESS VIOLATION at address 0x00000000 during 'READ' operation

#----------------------------------003
restore c003 c
restore s003 s

project cx c s

#----------------------------------004
restore c004 c
restore s004 s

project cx c s


#----------------------------------005
restore c005 c
restore s005 s

project cx c s

#----------------------------------006
restore c006 c
restore s006 s

project cx c s


#----------------------------------007
restore c007 c
restore s007 s

project cx c s

#----------------------------------008
restore c008 c
restore s008 s

project cx c s

#----------------------------------009
restore c009 c
restore s009 s

project cx c s

#----------------------------------010
restore c010 c
restore s019 s

project cx c s

#----------------------------------011
restore c011 c
restore s011 s

project cx c s

#----------------------------------012
restore c012 c
restore s012 s

project cx c s

#----------------------------------013
restore c013 c
restore s013 s

project cx c s

#----------------------------------014
restore c014 c
restore s014 s

project cx c s

Public activity

20 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: aml
Date: Mon Mar 16 15:57:12 2015 +0300

    0025892: Wrong result obtained by projection algorithm.
    
    1) Treatment of case when projection algorithm to BSpline surface return null 2d curve.
    2) Changed approximation of next step in default projection algorithm.
02Commenter 2
problems from 1 till 12 seems to be fixed. Cases 13 and 14 are require additional investigations.
03Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
04Commenter 4
Dear msv,
Please check current state of branch CR25892.

First and Second cases are changed to "Projection Failed", due to too big distance between curve and surface, other cases are fixed.
05Commenter 5
Please complete the fix as we agreed.
06Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
07Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
08Commenter 8
Dear msv,
Please check updated branch CR25892.
09Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: aml
Date: Wed Mar 18 14:59:15 2015 +0300

    "Period jump" handling evaded in case when curve not computed.

10Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
11Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
12Commenter 12
Reviewed.
13Commenter 13
Dear Commenter 1,
Branch CR25892 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)

products component :
Linux: 11 (11 on master)
Windows: 4 (4 on master)

Regressions/Differences:
http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_2/bug469.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_2/bug469.html
bugs moddata_2(012) bug469: FAILED

http://occt-tests/CR25892-master-products-64/Debian60-64/sat/doc_5/H5.html
sat doc_5(005) H5: FAILED
http://occt-tests/CR25892-master-products-64/Windows-64-VC10/sat/doc_5/H6.html
sat doc_5(005) H6: FAILED

Testing cases:
http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_01.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_01.html
bugs moddata_3(013) bug25892_01: FAILED

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_02.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_02.html
bugs moddata_3(013) bug25892_02: FAILED

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_03.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_03.html
bugs moddata_3(013) bug25892_03: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_04.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_04.html
bugs moddata_3(013) bug25892_04: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_05.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_05.html
bugs moddata_3(013) bug25892_05: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_06.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_06.html
bugs moddata_3(013) bug25892_06: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_07.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_07.html
bugs moddata_3(013) bug25892_07: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_08.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_08.html
bugs moddata_3(013) bug25892_08: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_09.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_09.html
bugs moddata_3(013) bug25892_09: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_10.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_10.html
bugs moddata_3(013) bug25892_10: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_11.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_11.html
bugs moddata_3(013) bug25892_11: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_12.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_12.html
bugs moddata_3(013) bug25892_12: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_13.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_13.html
bugs moddata_3(013) bug25892_13: OK

http://occt-tests/CR25892-master-occt-64/Debian60-64/bugs/moddata_3/bug25892_14.html
http://occt-tests/CR25892-master-occt-64/Windows-64-VC10/bugs/moddata_3/bug25892_14.html
bugs moddata_3(013) bug25892_14: OK

Testing on Linux:
occt component :
Total MEMORY difference: 90109226 / 90070244
Total CPU difference: 58412.49999999991 / 58858.889999999985
products component :
Total MEMORY difference: 23019300 / 23022486
Total CPU difference: 14960.699999999979 / 15931.619999999983

Testing on Windows:
occt component :
Total MEMORY difference: 57853394 / 57855642
Total CPU difference: 48544.421875 / 54827.71875
products component :
Total MEMORY difference: 15047439 / 15048440
Total CPU difference: 16693.546875 / 16745.484375

There are no differences in images found by testdiff.
14Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mkv
Date: Thu Mar 19 11:46:53 2015 +0300

    Test cases for issue CR25892

15Commenter 15
Dear aml,
could you please review test case
bugs moddata_3(013) bug25892_01 - bug25892_14
16Commenter 16
Dear mkv,

I Regressions

bugs moddata_2(012) bug469: FAILED
New behavior is better than master - boolean operation performed in branch and didn't finished in master. Please update test case.

sat doc_5(005) H5: FAILED
Tolerance decreased 5 times. Please use new values to update reference data.

sat doc_5(005) H6: FAILED
Bad result on bad input data, please update test case.

II Test cases
Test case 1 - 2
bugs moddata_3(013) bug25892_01: FAILED
bugs moddata_3(013) bug25892_02: FAILED
Projection should fail in this cases. Update tests to current behavior.

Test case 3 - 14:
Test cases are OK
17Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mkv
Date: Thu Mar 19 16:27:34 2015 +0300

    Small correction of test cases fot CR25892

18Commenter 18
Dear Commenter 1,

test cases
bugs moddata_3(013) bug25892_01, bug25892_02
are corrected and updated in branch CR25892 of occt git-repository.

test cases
sat doc_5(005) H5, H6
are corrected and updated in branch CR25892 of products git-repository.
19Commenter 19
Small remark about troubles in tests bug25892_01 and bug25892_02:

Bad projection caused by ProjLib_ComputeApproxOnPolarSurface::BuildInitialCurve2d() function where initial projected curve is computed.
In this function maximum projection distance is declared:
  
  Standard_Real DistTol3d = 100.0*Tol3d;
  
Distance between curve and surface are greater than "DistTol3d" value in cases mentioned above. This is formal reason of "Projection fail" state.

Tol3d variable used as tolerance / precision when project of single points, so, it is not possible to increase its value. I think that is better to divide DistTol3d and Tol3d variables into two separate and independent variables and have both of them as input.
  
According to this approach, first test case can be healed, but second have too bad curve.
20Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]