MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029405Community[OCCT] OCCT:Modeling Algorithmspublic2017-12-29 10:572021-10-09 12:31
Reportereryar 
Assigned Tosmoskvin 
PrioritynormalSeveritycrash 
StatusverifiedResolutionfixed 
PlatformWindowsOSVC++ 2015OS Version64 bit
Product Version[OCCT] 7.2.0 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0029405: Modeling Algorithms - Check normal define status in HLRBRep_Data
DescriptionThe member variable mySLProps in class HLRBRep_Data, in some functions does not check normal define status by mySLProps.IsNormalDefined(), such as:
HLRBRep_Data::OrientOutLine();
HLRBRep_Data::OrientOthEdge();

When query the normal vector, it raise an exception:
gp_Vec Nm = mySLProps.Normal();
Steps To Reproducepload ALL
ptorus t 17.37 17.37 [dval 2.35*180/pi]
vdisplay t
vcomputehlr t t2 -algotype algo 0 50 0 0 -50 0 0 0 1
TagsNo tags attached.
Test case numberbugs modalg_7 bug29405
Attached Files

- Relationships
related to 0032292verifiedbugmaster Open CASCADE Coding Rules - improve HLRBRep_PolyAlgo readability part 1 

-  Notes
(0073187)
eryar (developer)
2017-12-29 10:59

Dear OCC Team,
Happy new year 2018!
(0073190)
msv (developer)
2017-12-29 12:10

Dear eryar,
Please provide a test case to reproduce such exception.
HNY 2018!
(0073192)
eryar (developer)
2017-12-29 13:20
edited on: 2017-12-29 13:21

# Draw Script:
pload ALL

dset p pi
ptorus t 17.37 17.37 "2.35 * 180 / p"

vdisplay t

houtl h t
hload h

hproj p1
hsetprj p1

hupdate

(0073194)
msv (developer)
2017-12-29 14:47

Thank you for the script.
(0103190)
git (administrator)
2021-08-13 16:39

Branch CR29405 has been created by vkuzin.

SHA-1: 367307b33a88d400ede484a33336083340b49bf8


Detailed log of new commits:

Author: vkuzin
Date: Fri Aug 13 16:36:46 2021 +0300

    added a test script for the bug 29405

Author: vkuzin
Date: Fri Aug 13 14:43:22 2021 +0300

    Fixed exception when trying to calculate line and edge normal
(0103631)
git (administrator)
2021-09-01 14:50

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: ef4023cecad340cddc40e2013957ee4cc36c1291
(0104256)
git (administrator)
2021-09-21 13:14

Branch CR29405 has been updated by vkuzin.

SHA-1: 30ddd4d731032b7849e8b2acb0c629dd9da9ad94


Detailed log of new commits:

Author: vkuzin
Date: Tue Sep 21 13:13:24 2021 +0300

    Merge branch 'CR29405' of ssh://git.dev.opencascade.org/occt [^] into CR29405

Author: vkuzin
Date: Fri Aug 13 14:43:22 2021 +0300

    0029405: Modeling Algorithms - Check normal define status in HLRBRep_Data
    
    Fixed exception when trying to calculate line and edge normal. Added a test script for the bug 29405.

(0104405)
git (administrator)
2021-09-27 16:14

Branch CR29405 has been updated by vkuzin.

SHA-1: 93ea9c807a070cbcd35950cf5faed40f7528052d


Detailed log of new commits:

Author: vkuzin
Date: Mon Sep 27 16:12:50 2021 +0300

    A zero derivative check, correction of the floating-point error, and division by the zero determinant were supplied.

(0104455)
git (administrator)
2021-09-30 18:07

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: 03d60605adf0db9c4b98fe8009c22568c2642824
(0104519)
vkuzin (developer)
2021-10-05 15:04

Check for the existence of a normal has been implemented at HLRBRep_Data::OrientOutLine();
HLRBRep_Data::OrientOthEdge();
A correct check for zero derivative, correction of floating point error and division by zero determinant directly in HLRBRep_EdgeFaceTool::CurvatureValue was set.
http://jenkins-test-occt.nnov.opencascade.com/view/CR29405-master-vkuzin/view/COMPARE/ [^]
(0104540)
git (administrator)
2021-10-08 10:42

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: 50be1e38fa26f82935fb28cb0a4c097219787f3a
(0104544)
vkuzin (developer)
2021-10-08 12:48

Corrects the check for the existence of a normal in HLRBRRep_EdgeFaceTool::CurvatureValue, since the check for correctly determining the existence of a normal is done above in the calling method HLBRRep_Data::OrientOutLine
http://jenkins-test-occt.nnov.opencascade.com/view/CR29405-master-vkuzin/view/COMPARE/ [^]
(0104547)
kgv (developer)
2021-10-08 14:30

Vitaly,

if patch is ready for review, please switch it to RESOLVED state
and prepare a branch with modifications squashed into a single commit with proper description.
(0104550)
msv (developer)
2021-10-08 15:30

#include <LProp_NotDefined.hxx>

Is this include necessary?

-	  gp_Vec Nm = mySLProps.Normal();
+	    gp_Vec Nm;
+	    Nm = mySLProps.Normal();

Why did you do this change? Please revert it.

-	  gp_Vec Nm = mySLProps.Normal();
+	  gp_Vec Nm;
+	  if (mySLProps.IsNormalDefined()) {
+	    Nm = mySLProps.Normal();

Why did you move declaration of Nm out of scope of "if"? As I see it is not used outside of it.

In HLRBRep_EdgeFaceTool::CurvatureValue, move definition of Nm to the place where it is used.
(0104552)
git (administrator)
2021-10-08 16:22

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: 02077b04bedd6cc8503f0d1641b49a0f7816e7d5
(0104553)
vkuzin (developer)
2021-10-08 16:26

Fixed exception when trying to calculate line and edge normal in methods HLRBRep_Data::OrientOutLine and HLRBRep_Data::OrientOthEdge, added a check for the existence of the normal before subsequent calculations. A correct check for zero derivative, correction of floating point error and division by zero determinant directly in HLRBRep_EdgeFaceTool::CurvatureValue was set.
http://jenkins-test-occt.nnov.opencascade.com/view/CR29405-master-vkuzin/view/COMPARE/ [^]
(0104554)
msv (developer)
2021-10-08 16:35

For integration:
occt - CR29405
products - none
(0104558)
kgv (developer)
2021-10-08 22:20
edited on: 2021-10-08 22:20

Vitaly, in next patches:
+pload ALL

Please load only plugins necessary for specific test case, not everything.

 Fixed exception when trying to calculate line and edge normal in methods HLRBRep_Data::OrientOutLine 
and HLRBRep_Data::OrientOthEdge, added a check for the existence of the normal before subsequent calculations. 
A correct check for zero derivative, correction of floating point error and division by zero determinant 
directly in HLRBRep_EdgeFaceTool::CurvatureValue was set.

Please put newlines into long commit description, so that it would be displayed properly in git clients.

+vcomputehlr t t2 -algotype algo 0 50 0 0 -50 0 0 0 1
\ No newline at end of file

Please make some screenshots via `vdump` while displaying something in 3D viewer.

(0104569)
smoskvin (administrator)
2021-10-09 12:07

Combination -
OCCT branch : IR-2021-10-08
master SHA - 56b495d93bc70a96c9f07a6025b83e2e5e70eef7
49e51745631c52b6c452c65adae4d6dfa21a1b1e
Products branch : IR-2021-10-08 SHA - fe10ebabd09fbeb2e94180b50cd581aa0612d135
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17935.650000000136 / 17754.63000000043 [+1.02%]
Products
Total CPU difference: 11611.53000000011 / 11405.930000000111 [+1.80%]
Windows-64-VC14:
OCCT
Total CPU difference: 19689.8125 / 19680.3125 [+0.05%]
Products
Total CPU difference: 12938.8125 / 12772.859375 [+1.30%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

- Related Changesets
occt: master 96b92906
Timestamp: 2021-08-13 11:43:22
Author: vkuzin
Committer: smoskvin
Details ] Diff ]
0029405: Modeling Algorithms - Check normal define status in HLRBRep_Data

Fixed exception when trying to calculate line and edge normal in methods HLRBRep_Data::OrientOutLine and HLRBRep_Data::OrientOthEdge, added a check for the existence of the normal before subsequent calculations. A correct check for zero derivative, correction of floating point error and division by zero determinant directly in HLRBRep_EdgeFaceTool::CurvatureValue was set.
mod - src/HLRBRep/HLRBRep_Data.cxx Diff ] File ]
mod - src/HLRBRep/HLRBRep_EdgeFaceTool.cxx Diff ] File ]
add - tests/bugs/modalg_7/bug29405 Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-12-29 10:57 eryar New Issue
2017-12-29 10:57 eryar Assigned To => msv
2017-12-29 10:59 eryar Note Added: 0073187
2017-12-29 12:10 msv Note Added: 0073190
2017-12-29 12:11 msv Assigned To msv => eryar
2017-12-29 12:11 msv Status new => feedback
2017-12-29 13:20 eryar Note Added: 0073192
2017-12-29 13:21 eryar Note Edited: 0073192 View Revisions
2017-12-29 13:57 eryar Assigned To eryar => msv
2017-12-29 14:47 msv Note Added: 0073194
2017-12-29 14:47 msv Status feedback => assigned
2018-01-10 15:13 msv Assigned To msv => isn
2018-01-10 15:13 msv Target Version => 7.4.0
2019-08-12 16:50 msv Target Version 7.4.0 => 7.5.0
2020-09-14 22:54 msv Target Version 7.5.0 => 7.6.0*
2021-07-09 15:26 utverdov Assigned To isn => user980
2021-07-09 15:39 bugmaster Assigned To user980 => vkuzin
2021-07-09 15:39 kgv Assigned To vkuzin => user980
2021-07-09 15:39 kgv Summary Check normal define status in HLRBRep_Data => Modeling Algorithms - Check normal define status in HLRBRep_Data
2021-07-09 15:41 bugmaster Assigned To user980 => vkuzin
2021-08-13 16:39 git Note Added: 0103190
2021-09-01 14:50 git Note Added: 0103631
2021-09-01 16:09 kgv Relationship added related to 0032292
2021-09-21 13:14 git Note Added: 0104256
2021-09-27 16:14 git Note Added: 0104405
2021-09-30 18:07 git Note Added: 0104455
2021-10-05 15:04 vkuzin Test case number => 29405
2021-10-05 15:04 vkuzin Note Added: 0104519
2021-10-05 15:04 vkuzin Steps to Reproduce Updated View Revisions
2021-10-06 14:31 vkuzin Assigned To vkuzin => eryar
2021-10-06 14:57 msv Assigned To eryar => vkuzin
2021-10-08 10:42 git Note Added: 0104540
2021-10-08 12:48 vkuzin Note Added: 0104544
2021-10-08 13:04 vkuzin Assigned To vkuzin => msv
2021-10-08 14:30 kgv Note Added: 0104547
2021-10-08 15:30 msv Note Added: 0104550
2021-10-08 15:30 msv Assigned To msv => vkuzin
2021-10-08 16:22 git Note Added: 0104552
2021-10-08 16:26 vkuzin Note Added: 0104553
2021-10-08 16:26 vkuzin Assigned To vkuzin => msv
2021-10-08 16:26 vkuzin Status assigned => resolved
2021-10-08 16:35 msv Note Added: 0104554
2021-10-08 16:35 msv Assigned To msv => bugmaster
2021-10-08 16:35 msv Status resolved => reviewed
2021-10-08 16:37 msv Test case number 29405 => bugs modalg_7 bug29405
2021-10-08 22:20 kgv Note Added: 0104558
2021-10-08 22:20 kgv Note Edited: 0104558 View Revisions
2021-10-09 12:07 smoskvin Note Added: 0104569
2021-10-09 12:07 smoskvin Status reviewed => tested
2021-10-09 12:31 smoskvin Changeset attached => occt master 96b92906
2021-10-09 12:31 smoskvin Assigned To bugmaster => smoskvin
2021-10-09 12:31 smoskvin Status tested => verified
2021-10-09 12:31 smoskvin Resolution open => fixed


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker