mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0023938: Crash at StepToTopoDS_TranslateEdgeLoop::Init() &StepToTopoDS_TranslateEdge::Init()
necessary checks were added
This commit is contained in:
parent
ac4aaa9821
commit
2a141d40f0
@ -291,6 +291,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
|
|||||||
StepEdge1 = StepEdge; //
|
StepEdge1 = StepEdge; //
|
||||||
Handle(StepShape_EdgeCurve) EC = Handle(StepShape_EdgeCurve)::DownCast(StepEdge);
|
Handle(StepShape_EdgeCurve) EC = Handle(StepShape_EdgeCurve)::DownCast(StepEdge);
|
||||||
Handle(StepGeom_Curve) C = EC->EdgeGeometry();
|
Handle(StepGeom_Curve) C = EC->EdgeGeometry();
|
||||||
|
if (!C.IsNull()){
|
||||||
if (C->IsKind(STANDARD_TYPE(StepGeom_SurfaceCurve))) {
|
if (C->IsKind(STANDARD_TYPE(StepGeom_SurfaceCurve))) {
|
||||||
Handle(StepGeom_SurfaceCurve) Sc = Handle(StepGeom_SurfaceCurve)::DownCast(C);
|
Handle(StepGeom_SurfaceCurve) Sc = Handle(StepGeom_SurfaceCurve)::DownCast(C);
|
||||||
C = Sc->Curve3d();
|
C = Sc->Curve3d();
|
||||||
@ -300,6 +301,7 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
|
|||||||
// StepPCurve = StepPCurve1;
|
// StepPCurve = StepPCurve1;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//// else if (C->IsKind(STANDARD_TYPE(StepGeom_Polyline))) { }
|
//// else if (C->IsKind(STANDARD_TYPE(StepGeom_Polyline))) { }
|
||||||
// else if (C->IsKind(STANDARD_TYPE(StepGeom_Pcurve))) {
|
// else if (C->IsKind(STANDARD_TYPE(StepGeom_Pcurve))) {
|
||||||
// if (modepcurve != 3) {
|
// if (modepcurve != 3) {
|
||||||
@ -462,8 +464,12 @@ void StepToTopoDS_TranslateEdgeLoop::Init(const Handle(StepShape_FaceBound)& Fac
|
|||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
// CASE 1 : The Edge Geometry is of Pcurve Type
|
// CASE 1 : The Edge Geometry is of Pcurve Type
|
||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
|
if (C.IsNull())
|
||||||
if (C->IsKind(STANDARD_TYPE(StepGeom_Pcurve))) {
|
{
|
||||||
|
aTool.ComputePCurve(Standard_True);
|
||||||
|
hasPcurve = Standard_False;
|
||||||
|
}
|
||||||
|
else if (C->IsKind(STANDARD_TYPE(StepGeom_Pcurve))) {
|
||||||
Handle(StepGeom_Pcurve) StepPCurve = Handle(StepGeom_Pcurve)::DownCast(C);
|
Handle(StepGeom_Pcurve) StepPCurve = Handle(StepGeom_Pcurve)::DownCast(C);
|
||||||
C2d = myTranEdge.MakePCurve (StepPCurve,ConvSurf);
|
C2d = myTranEdge.MakePCurve (StepPCurve,ConvSurf);
|
||||||
// -- Statistics --
|
// -- Statistics --
|
||||||
|
Loading…
x
Reference in New Issue
Block a user