DiscussionsIssue archiveOCCT:Modeling Algorithms

Archived issue #0025214

HLR fails to project edges

CommunityOCCT:Modeling Algorithmsclosed7 public notes

Search issues

Description

The HLR algorithm stops with a Standard_OutOfRange Exception, when used on edges or on shapes that don't have faces (vertexes, wires)
There are reports that this worked in the past <6.7.0.

Steps to reproduce

Handle( HLRBRep_Algo ) brep_hlr = new HLRBRep_Algo;
brep_hlr->Add(Input);
gp_Ax2 transform(gp_Pnt(0,0,0),gp_Dir(Direction.x,Direction.y,Direction.z));
HLRAlgo_Projector projector( transform );
brep_hlr->Projector(projector);
brep_hlr->Update();
brep_hlr->Hide();

The "Input" shape was a line (edge) from 0,0,0 to 1,0,0. The Direction was 0,0,-1

Additional information

Public activity

7 archived notes

Participants are labeled by their role within this record.

01Author
#6 0x00007f48e2058028 in HLRBRep_Data::Update (this=0x2538130, P=...)
    at occt/src/HLRBRep/HLRBRep_Data.cxx:636
636 fd = &(myFData.ChangeValue(1));
(gdb) p myFData
$9 = {myLowerBound = 0, myUpperBound = 0, myStart = 0x4ef2298, isAllocated = 1}
02Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: msv
Date: Tue Oct 25 11:54:34 2016 +0300

    0025214: HLR fails to project edges
    
    Avoid getting non-existing array items. Use reference to array items instead of pointers where it is possible.
    Create test case. Before the fix this test raised exception in debug mode.
03Commenter 3
Dear Julia, please review the fix.
04Commenter 4
Ok.
05Commenter 5
Dear BugMaster,
Branch CR25214 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: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 63 (63 on master)
Windows: 0 (0 on master)
MacOS : 1122

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR25214-master-OCCT/Debian70-64/bugs/modalg_6/bug25214.html
http://occt-tests/CR25214-master-OCCT/Windows-64-VC10/bugs/modalg_6/bug25214.html
bugs modalg_6 bug25214: OK

Testing on Linux:
occt component :
Total MEMORY difference: 90563016 / 90345060 [+0.24%]
Total CPU difference: 19228.72999999978 / 19232.579999999845 [-0.02%]
products component :
Total MEMORY difference: 30112020 / 30089650 [+0.07%]
Total CPU difference: 5278.899999999971 / 5340.149999999966 [-1.15%]

Testing on Windows:
occt component :
Total MEMORY difference: 57212398 / 57220230 [-0.01%]
Total CPU difference: 18472.484012598594 / 18211.026336598778 [+1.44%]
products component :
Total MEMORY difference: 21307596 / 21272088 [+0.17%]
Total CPU difference: 5094.041053899957 / 5194.536898099958 [-1.93%]

There are no differences in images found by testdiff.
06Commenter 6
Dear BugMaster,
Branch CR25214 is TESTED.
07Commenter 2
Branch [archived branch] has been deleted by Commenter 3.

[revision removed]