View Issue Details

IDProjectCategoryView StatusLast Update
0029405CommunityOCCT:Modeling Algorithmspublic2021-12-13 14:56
Reportereryar Assigned Tosmoskvin 
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2015 
Product Version7.2.0 
Target Version7.6.0Fixed in Version7.6.0 
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

Relationships

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

Activities

eryar

2017-12-29 10:59

developer   ~0073187

Dear OCC Team,
Happy new year 2018!

msv

2017-12-29 12:10

developer   ~0073190

Dear eryar,
Please provide a test case to reproduce such exception.
HNY 2018!

eryar

2017-12-29 13:20

developer   ~0073192

Last edited: 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

msv

2017-12-29 14:47

developer   ~0073194

Thank you for the script.

git

2021-08-13 16:39

administrator   ~0103190

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

git

2021-09-01 14:50

administrator   ~0103631

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: ef4023cecad340cddc40e2013957ee4cc36c1291

git

2021-09-21 13:14

administrator   ~0104256

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.

git

2021-09-27 16:14

administrator   ~0104405

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.

git

2021-09-30 18:07

administrator   ~0104455

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: 03d60605adf0db9c4b98fe8009c22568c2642824

vkuzin

2021-10-05 15:04

developer   ~0104519

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/

git

2021-10-08 10:42

administrator   ~0104540

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: 50be1e38fa26f82935fb28cb0a4c097219787f3a

vkuzin

2021-10-08 12:48

developer   ~0104544

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/

kgv

2021-10-08 14:30

developer   ~0104547

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.

msv

2021-10-08 15:30

developer   ~0104550

#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.

git

2021-10-08 16:22

administrator   ~0104552

Branch CR29405 has been updated forcibly by vkuzin.

SHA-1: 02077b04bedd6cc8503f0d1641b49a0f7816e7d5

vkuzin

2021-10-08 16:26

developer   ~0104553

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/

msv

2021-10-08 16:35

developer   ~0104554

For integration:
occt - CR29405
products - none

kgv

2021-10-08 22:20

developer   ~0104558

Last edited: 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.

smoskvin

2021-10-09 12:07

administrator   ~0104569

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

git

2021-12-13 14:56

administrator   ~0105850

Branch CR29405 has been deleted by kgv.

SHA-1: 02077b04bedd6cc8503f0d1641b49a0f7816e7d5

Related Changesets

occt: master 96b92906

2021-08-13 11:43:22

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.
Affected Issues
0029405
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
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
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
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
2021-12-13 14:56 git Note Added: 0105850