1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0029524: Modeling Algorithms - access violation in HLRBRep_PolyAlgo while computing HLR for triangulation-only surface

This commit is contained in:
kgv 2018-02-22 18:42:15 +03:00 committed by bugmaster
parent db5d29de1c
commit ff6d145402
2 changed files with 28 additions and 7 deletions

View File

@ -438,13 +438,20 @@ void HLRBRep_PolyAlgo::StoreShell (const TopoDS_Shape& Shape,
PD (f) = new HLRAlgo_PolyData();
psd->PolyData().ChangeValue(iFace) = PD(f);
PID(f) = new HLRAlgo_PolyInternalData(nbN,nbT);
Handle(HLRAlgo_PolyInternalData)& pid =
*(Handle(HLRAlgo_PolyInternalData)*)&(PID(f));
Handle(Geom_Surface) S = BRep_Tool::Surface(F);
if (S->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
S = Handle(Geom_RectangularTrimmedSurface)::DownCast(S)->BasisSurface();
GeomAdaptor_Surface AS(S);
pid->Planar(AS.GetType() == GeomAbs_Plane);
Handle(HLRAlgo_PolyInternalData)& pid = *(Handle(HLRAlgo_PolyInternalData)*)&(PID(f));
if (Handle(Geom_Surface) S = BRep_Tool::Surface(F))
{
if (Handle(Geom_RectangularTrimmedSurface) aRectTrimSurf = Handle(Geom_RectangularTrimmedSurface)::DownCast(S))
{
S = aRectTrimSurf->BasisSurface();
}
GeomAdaptor_Surface AS(S);
pid->Planar(AS.GetType() == GeomAbs_Plane);
}
else
{
pid->Planar (false);
}
HLRAlgo_Array1OfTData* TData = &pid->TData();
HLRAlgo_Array1OfPISeg* PISeg = &pid->PISeg();
HLRAlgo_Array1OfPINod* PINod = &pid->PINod();

View File

@ -0,0 +1,14 @@
puts "========"
puts "0029524: Modeling Algorithms - access violation in HLRBRep_PolyAlgo while computing HLR for triangulation-only surface"
puts "========"
puts ""
pload VISUALIZATION XDE MODELING
readstl m [locate_data_file model_stl_045.stl] triangulation
vclear
vinit View1
vdisplay -dispMode 1 m
vfit
vdump $imagedir/${casename}_shading.png
vhlr on -showHidden 0 -algoType polyAlgo
vdump $imagedir/${casename}_hlr.png