1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0028248: [Regression] HLR Algo result is retrieved from the last added shape only

Mistakes in retrieving of HLRBRep_EdgeData by value instead of reference have been corrected.
This commit is contained in:
msv 2017-12-19 16:01:06 +03:00 committed by bugmaster
parent 81a2800c0d
commit 0ab4e62183
2 changed files with 38 additions and 3 deletions

View File

@ -165,7 +165,7 @@ void HLRBRep_InternalAlgo::Update ()
SB.Bounds(v1,v2,e1,e2,f1,f2);
for (Standard_Integer e = e1; e <= e2; e++) {
HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
HLRAlgo::DecodeMinMax(ed.MinMax(), TheMin, TheMax);
if (FirstTime) {
FirstTime = Standard_False;
@ -307,7 +307,7 @@ void HLRBRep_InternalAlgo::InitEdgeStatus ()
Standard_Integer nf = myDS->NbFaces();
for (Standard_Integer e = 1; e <= ne; e++) {
HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
if (ed.Selected()) ed.Status().ShowAll();
}
// for (Standard_Integer f = 1; f <= nf; f++) {
@ -368,7 +368,7 @@ void HLRBRep_InternalAlgo::Select ()
Standard_Integer nf = myDS->NbFaces();
for (Standard_Integer e = 1; e <= ne; e++) {
HLRBRep_EdgeData ed = aEDataArray.ChangeValue(e);
HLRBRep_EdgeData& ed = aEDataArray.ChangeValue(e);
ed.Selected(Standard_True);
}

View File

@ -0,0 +1,35 @@
puts "======="
puts "OCC28248"
puts "======="
puts ""
################################################################
# HLR Algo result is retrieved from the last added shape only
################################################################
box b1 -10 -10 0 20 20 5
pcylinder c1 5 10
hprj proj 0 0 0 0 1 0 0 0 1
hremove
houtl b1_outl b1
hfill b1_outl proj 0
hload b1_outl
houtl c1_outl c1
hfill c1_outl proj 0
hload c1_outl
hsetprj proj
hupdate
hhide
hres2d
compound vl v1l vnl vol vil hl h1l hnl hol hil result
checknbshapes result -edge 16
don result
smallview +X+Y
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png