MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027892Open CASCADE[OCCT] OCCT:Modeling Algorithmspublic2016-09-22 06:502016-12-09 16:38
Reporterabv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0027892: Construction error in offset
DescriptionThe changes made in 0026329 lead to regression on test offset with_intersect J9: offset algorithm crashes with exception Standard_ConstructionError "BRepOffset_MakeOffset::TrimEdge no projection". The exception is generated in BRepOffset_MakeOffset.cxx, at line 1056, due to the fact that point being projected is not located on the curve. The point here has coordinates (0,0,0), which indicates that it has not been initialized. Apparently this highlights some flaw in the algorithm.
Steps To ReproduceAfter integration of 0026329:

test offset with_intersect J9
TagsNo tags attached.
Test case numberoffset with_intersect_20 J9, offset with_intersect_80 J9
Attached Files? file icon f1.brep (4,287 bytes) 2016-10-04 13:53
? file icon f4.brep (1,658 bytes) 2016-10-04 13:53
png file icon fix.PNG (22,910 bytes) 2016-10-04 14:07
png file icon master.PNG (25,452 bytes) 2016-10-04 14:07

- Relationships
parent of 0027929closedapn Methods D0 and D1 for trimmed offset surface return different values if the surface has osculating surface 
child of 0026329closedkgv Restore floating point signals handling in DRAW 

-  Notes
(0058197)
git (administrator)
2016-09-27 13:04

Branch CR27892 has been created by nbv.

SHA-1: 31ab7cfe3b011087e4d023d4fdb23dabb375782b


Detailed log of new commits:

Author: nbv
Date: Tue Sep 27 12:21:24 2016 +0300

    0027892: Construction error in offset
    
    Field Geom_OffsetSurface::myOscSurf was lost when trimming offset-surface. This problem has been solved while fixing.

Author: ifv
Date: Tue Aug 9 20:12:59 2016 +0300

    0026329: Restore floating point signals handling in DRAW
    
    Added DRAW command dsetsignal, resetting OSD signal handler with either armed or disabled FPE handler, according to an option.
    If called without arguments, it sets FPE handler only if environment variable OSD_FPE is defined (with value different from 0).
    On start, DRAW calls dsetsignal to set FPE signal if CSF_FPE is defined.
    Test bugs fclasses bug6143 uses dsetsignal to set FPE handler unconditionally before the test command, and resets it to default at the end.
    
    A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:
    
    - Global functions Sinh() and Cosh() defined in Standard_Real.hxx are improved to raise Standard_NumericError exception if argument is too big (greater than 710.47586), instead of relying on system treatment of floating point overflow. These functions are used instead of sinh and cosh in ElCLib.cxx.
    
    - Maximal value of parameter on hyperbola is restricted by 23 (corresponding to ~1e10 in 3d) in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.
    
    - Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. These methods are used in Extrema_GenExtCS.cxx to restrict domain search in the case of offset of hyperbola, in order to get rid of floating point overflow. All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.
    
    - Protection against division by zero has been implemented in ApproxInt_KnotTools.cxx, BRepClass3d_SClassifier.cxx, BRepGProp_Face.cxx, BRepMesh_FastDiscretFace.cxx, Geom2dGcc_Circ2d2TanOnIter.cxx, Geom2dInt_Geom2dCurveTool.cxx, IntPolyh_MaillageAffinage.cxx.
    
    - Protection against calling of math functions of infinite arguments has been added in BRepCheck_Edge.cxx, BRepLib.cxx, CSLib_NormalPolyDef.cxx, Extrema_FuncExtPC.gxx, Extrema_GExtPC.gxx, Extrema_GLocateExtPC.gxx, Intf_InterferencePolygonPolyhedron.gxx, ShapeAnalysis_Surface.cxx, ShapeAnalysis_TransferParametersProj.cxx, ShapeAnalysis_Wire.cxx, math_FunctionSetRoot.cxx.
    
    - Proper initialization of local variables is done in BOPAlgo_PaveFiller_6.cxx, XSDRAWSTLVRML.cxx.
    
    - Inconsistent usage of Standard_Boolean* to access integer data in HLR (caused by 0027772) is corrected
    
    Some test cases have been updated to actual state.
(0058199)
git (administrator)
2016-09-27 13:07

Branch CR27892 has been updated forcibly by nbv.

SHA-1: 60f549c561108250358f7d697646a1e2720ef908
(0058201)
nbv (developer)
2016-09-27 13:09
edited on: 2016-09-27 14:10

Dear Mikhail,

Please review CR27892 branch.

Test cases "offset with_intersect J9" and "offset with_intersect_80 K8" have been reverted to their state on the MASTER.

(0058213)
msv (developer)
2016-09-27 14:49

Please, make all changes only in OffsetSurface, without changing its API, as we agreed.
(0058223)
git (administrator)
2016-09-27 17:51

Branch CR27892_1 has been created by nbv.

SHA-1: 69fad86f49be1b3a59273972d41f9ce776dd9871


Detailed log of new commits:

Author: nbv
Date: Tue Sep 27 17:46:14 2016 +0300

    0027892: Construction error in offset
    
    Field Geom_OffsetSurface::myOscSurf was lost when trimming offset-surface. This problem has been solved while fixing.
(0058224)
nbv (developer)
2016-09-27 17:52

Done!

Dear Mikhail,

Please review CR27892_1 branch.
(0058229)
git (administrator)
2016-09-27 19:48

Branch CR27892_1 has been updated forcibly by msv.

SHA-1: 272f7ea6a3d57e6cd610284373d9c21155d1c7c7
(0058230)
msv (developer)
2016-09-27 19:49

I have corrected the commit message.
Reviewed.
Please test.
(0058234)
git (administrator)
2016-09-28 09:36

Branch CR27892_1 has been updated forcibly by msv.

SHA-1: c5f80e46c0fd3dde95d54c7647d7a3f37a5e6c23
(0058235)
nbv (developer)
2016-09-28 10:18

Method Value for Geom_OffsetSurface uses field myOscSurf in case when the normal to basis surface is small. If myOscSurf is null then the value is computed by another algorithm and (in most cases) has become wrong.

As result, earlier (when myOscSurf was not initialized) intersection result of two offset surfaces (indeed, offset surfaces are not intersected; they are converted to B-spline before intersection algorithm launching) was wrong (section edge was incorrect). Therefore, in place of the code where the common vertex of two edges (at least, one of them is intersection edge) is taken, wrong vertex is returned. It was the reason of described exception.

After the fix, correct surfaces are intersected and the result is correct (section) edge. Therefore, all common vertices are found correctly.

P.S.

On the current MASTER, field myOscSurf is initialized correctly even for trimmed surface. The reason, why it is not after the fix 0026329 is not investigated.
(0058278)
mkv (tester)
2016-09-28 17:26

Dear BugMaster,
Branch CR27892_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 272f7ea6a3d57e6cd610284373d9c21155d1c7c7

Number of compiler warnings:

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

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1133

Regressions/Differences/Improvements:

http://occt-tests/CR27892_1-master-OCCT/Debian70-64/bugs/modalg_4/bug8842_8.html [^]
http://occt-tests/CR27892_1-master-OCCT/Windows-64-VC10/bugs/modalg_4/bug8842_8.html [^]
bugs modalg_4 bug8842_8: FAILED

http://occt-tests/CR27892_1-master-Products/Debian70-64/emesh/bugs/bug26326_1.html [^]
http://occt-tests/CR27892_1-master-Products/Windows-64-VC10/emesh/bugs/bug26326_1.html [^]
emesh bugs bug26326_1: IMPROVEMENT

Testing cases:
http://occt-tests/CR27892_1-master-OCCT/Debian70-64/offset/with_intersect_20/J9.html [^]
http://occt-tests/CR27892_1-master-OCCT/Windows-64-VC10/offset/with_intersect_20/J9.html [^]
offset with_intersect_20 J9: BAD (known problem)
http://occt-tests/CR27892_1-master-OCCT/Debian70-64/offset/with_intersect_80/J9.html [^]
http://occt-tests/CR27892_1-master-OCCT/Windows-64-VC10/offset/with_intersect_80/J9.html [^]
offset with_intersect_80 J9: BAD (known problem)

Testing on Linux:
occt component :
Total MEMORY difference: 90980156 / 90236020 [+0.82%]
Total CPU difference: 19329.229999999854 / 19249.509999999875 [+0.41%]
products component :
Total MEMORY difference: 30024241 / 30053704 [-0.10%]
Total CPU difference: 5111.049999999978 / 5152.219999999975 [-0.80%]

Testing on Windows:
occt component :
Total MEMORY difference: 57216986 / 57221541 [-0.01%]
Total CPU difference: 17950.73866809867 / 18310.78897609872 [-1.97%]
products component :
Total MEMORY difference: 21272053 / 21235672 [+0.17%]
Total CPU difference: 4901.832221799954 / 4988.631178199945 [-1.74%]

There are following differences in images found by testdiff.
http://occt-tests/CR27892_1-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
IMAGE bugs modalg_4 bug8842_8: bug8842_8.png differs

http://occt-tests/CR27892_1-master-Products/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
IMAGE emesh bugs bug26326_1: bug26326_1.png differs
(0058279)
mkv (tester)
2016-09-28 17:27

Dear msv,
Branch CR27892_1 has been rejected due to:
- regressions/differences/improvements
- differences in images
(0058392)
nbv (developer)
2016-10-04 14:06
edited on: 2016-10-04 14:09

About the regression in "bugs modalg_4 bug8842_8" test case.

By the reason described in the issue 0027929, intersection between two offset surfaces cannot be found:

Draw[]> restore f1.brep
Draw[]> restore f4.brep
Draw[]> bsection rr f1 f4
Draw[]> nbs rr
# FIX: VERTEX : 4; EDGE : 2
# MASTER: VERTEX : 2; EDGE : 1

Draw[9]> lprops rr 1.0e-4
# FIX: 0.0199311
# MASTER: 87.8157

See fix.png and master.png attached pictures in order to understand differences (on the fix, ZOOM is required in order to see section result). As result, on the fix, the offset shell cannot be built correctly.

This situation should be fixed in frame of the issue 0027929.

(0058394)
nbv (developer)
2016-10-04 14:25

emesh bugs bug26326_1: IMPROVEMENT

On the my machine, the situation is the same as on the MASTER.
(0058395)
git (administrator)
2016-10-04 14:31

Branch CR27892_2 has been created by nbv.

SHA-1: 24fd3625b67cbcd1b226898378522386fe95910e


Detailed log of new commits:

Author: nbv
Date: Tue Sep 27 17:46:14 2016 +0300

    0027892: Construction error in offset
    
    Provide proper initialization of the field Geom_OffsetSurface::myOscSurf in the case of creating offset of the trimmed bspline surface.
    
    Adjusting test cases according to their new behavior.
(0058396)
nbv (developer)
2016-10-04 14:32

Dear Mikhail,

Please review CR27892_2 branch. Only test case has been corrected.
(0058401)
msv (developer)
2016-10-04 15:44

Reviewed. However, I recommend to postpone integration of this fix till resolution of 0027929.
(0058418)
mkv (tester)
2016-10-05 12:50

Dear BugMaster,
Branch CR27892_2 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 24fd3625b67cbcd1b226898378522386fe95910e

Number of compiler warnings:

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

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1132

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27892_2-master-OCCT/Debian70-64/offset/with_intersect_20/J9.html [^]
http://occt-tests/CR27892_2-master-OCCT/Windows-64-VC10/offset/with_intersect_20/J9.html [^]
offset with_intersect_20 J9: BAD (known problem)
http://occt-tests/CR27892_2-master-OCCT/Debian70-64/offset/with_intersect_80/J9.html [^]
http://occt-tests/CR27892_2-master-OCCT/Windows-64-VC10/offset/with_intersect_80/J9.html [^]
offset with_intersect_80 J9: BAD (known problem)

Testing on Linux:
occt component :
Total MEMORY difference: 90808033 / 90432455 [+0.42%]
Total CPU difference: 19343.93999999981 / 19274.589999999782 [+0.36%]
products component :
Total MEMORY difference: 29998286 / 30036359 [-0.13%]
Total CPU difference: 5161.799999999972 / 5173.459999999983 [-0.23%]

Testing on Windows:
occt component :
Total MEMORY difference: 57230022 / 57236340 [-0.01%]
Total CPU difference: 19176.157723298707 / 18116.099728098634 [+5.85%]
products component :
Total MEMORY difference: 21274979 / 21238613 [+0.17%]
Total CPU difference: 5429.7240056999735 / 4976.229098699953 [+9.11%]

There are following differences in images found by testdiff.
http://occt-tests/CR27892_2-master-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html [^]
IMAGE bugs modalg_4 bug8842_8: bug8842_8.png differs
(0058419)
mkv (tester)
2016-10-05 12:51

Waiting resolution of 0027929
(0058452)
nbv (developer)
2016-10-06 11:43

Dear Mikhail (MKV),

Now bug 0027929 is tested. The regression in "bugs modalg_4 bug8842_8" has been fixed.

Therefore, please reclassify this issue as TESTED, too.

TIA.
(0059453)
git (administrator)
2016-10-28 21:41

Branch CR27892 has been deleted by kgv.

SHA-1: 60f549c561108250358f7d697646a1e2720ef908
(0059454)
git (administrator)
2016-10-28 21:42

Branch CR27892_1 has been deleted by kgv.

SHA-1: c5f80e46c0fd3dde95d54c7647d7a3f37a5e6c23
(0059455)
git (administrator)
2016-10-28 21:42

Branch CR27892_2 has been deleted by kgv.

SHA-1: 24fd3625b67cbcd1b226898378522386fe95910e

- Related Changesets
occt: master 41ce5887
Timestamp: 2016-09-27 14:46:14
Author: nbv
Committer: apn
Details ] Diff ]
0027892: Construction error in offset

Provide proper initialization of the field Geom_OffsetSurface::myOscSurf in the case of creating offset of the trimmed bspline surface.

Adjusting test cases according to their new behavior.
mod - src/Geom/Geom_OffsetSurface.cxx Diff ] File ]
mod - tests/bugs/modalg_4/bug8842_8 Diff ] File ]
mod - tests/offset/with_intersect_20/J9 Diff ] File ]
mod - tests/offset/with_intersect_80/J9 Diff ] File ]
mod - tests/offset/with_intersect_80/K8 Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-09-22 06:50 abv New Issue
2016-09-22 06:50 abv Assigned To => msv
2016-09-22 06:50 abv Relationship added child of 0026329
2016-09-22 14:44 msv Assigned To msv => nbv
2016-09-22 14:44 msv Status new => assigned
2016-09-27 13:04 git Note Added: 0058197
2016-09-27 13:07 git Note Added: 0058199
2016-09-27 13:09 nbv Note Added: 0058201
2016-09-27 13:09 nbv Assigned To nbv => msv
2016-09-27 13:09 nbv Status assigned => resolved
2016-09-27 13:10 nbv Note Edited: 0058201 View Revisions
2016-09-27 14:10 nbv Note Edited: 0058201 View Revisions
2016-09-27 14:49 msv Note Added: 0058213
2016-09-27 14:49 msv Assigned To msv => nbv
2016-09-27 14:49 msv Status resolved => assigned
2016-09-27 17:51 git Note Added: 0058223
2016-09-27 17:52 nbv Note Added: 0058224
2016-09-27 17:52 nbv Assigned To nbv => msv
2016-09-27 17:52 nbv Status assigned => resolved
2016-09-27 19:48 git Note Added: 0058229
2016-09-27 19:49 msv Note Added: 0058230
2016-09-27 19:49 msv Assigned To msv => bugmaster
2016-09-27 19:49 msv Status resolved => reviewed
2016-09-27 20:02 mkv Assigned To bugmaster => mkv
2016-09-28 09:36 git Note Added: 0058234
2016-09-28 10:18 nbv Note Added: 0058235
2016-09-28 17:26 mkv Note Added: 0058278
2016-09-28 17:27 mkv Note Added: 0058279
2016-09-28 17:27 mkv Assigned To mkv => msv
2016-09-28 17:27 mkv Status reviewed => assigned
2016-09-28 17:27 mkv Test case number => offset with_intersect_20 J9, offset with_intersect_80 J9
2016-09-28 17:28 nbv Assigned To msv => nbv
2016-10-04 13:51 nbv Relationship added parent of 0027929
2016-10-04 13:53 nbv File Added: f1.brep
2016-10-04 13:53 nbv File Added: f4.brep
2016-10-04 14:06 nbv Note Added: 0058392
2016-10-04 14:07 nbv File Added: fix.PNG
2016-10-04 14:07 nbv File Added: master.PNG
2016-10-04 14:09 nbv Note Edited: 0058392 View Revisions
2016-10-04 14:25 nbv Note Added: 0058394
2016-10-04 14:31 git Note Added: 0058395
2016-10-04 14:32 nbv Note Added: 0058396
2016-10-04 14:32 nbv Assigned To nbv => msv
2016-10-04 14:32 nbv Status assigned => resolved
2016-10-04 15:44 msv Note Added: 0058401
2016-10-04 15:44 msv Assigned To msv => bugmaster
2016-10-04 15:44 msv Status resolved => reviewed
2016-10-04 17:27 mkv Assigned To bugmaster => mkv
2016-10-05 12:50 mkv Note Added: 0058418
2016-10-05 12:51 mkv Note Added: 0058419
2016-10-05 12:51 mkv Assigned To mkv => nbv
2016-10-05 12:51 mkv Status reviewed => feedback
2016-10-06 11:43 nbv Note Added: 0058452
2016-10-06 11:43 nbv Assigned To nbv => mkv
2016-10-06 12:26 apn Assigned To mkv => bugmaster
2016-10-06 12:26 apn Status feedback => tested
2016-10-07 16:09 apn Changeset attached => occt master 41ce5887
2016-10-07 16:09 apn Assigned To bugmaster => apn
2016-10-07 16:09 apn Status tested => verified
2016-10-07 16:09 apn Resolution open => fixed
2016-10-28 21:41 git Note Added: 0059453
2016-10-28 21:42 git Note Added: 0059454
2016-10-28 21:42 git Note Added: 0059455
2016-12-09 16:30 user533 Status verified => closed
2016-12-09 16:38 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker