1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024955: Misuse of DownCast

Code where DownCast was applied to Handle of the type being not a base class of the target one is revised and (hopefully) corrected.
Code corrected following review remarks
GeomConvert::CurveToBSplineCurve() is called even for b-spline curves to ensure that result is non-periodic
Check for conic is corrected
This commit is contained in:
abv
2014-06-05 14:14:14 +04:00
committed by apn
parent 3a01a933af
commit 5e5b6f81c1
7 changed files with 182 additions and 204 deletions

View File

@@ -93,7 +93,7 @@ is
---Purpose: Sets the tool for dividing edges on Face.
GetSplitSurfaceTool (me) returns SplitSurface from ShapeUpgrade
is virtual protected;
is virtual;
---Purpose: Returns the tool for splitting surfaces.
-- This tool must be already initialized.

View File

@@ -73,7 +73,7 @@ double ShapeUpgrade_ShapeDivideAngle::MaxAngle () const
Handle(ShapeUpgrade_FaceDivide) faceTool = GetSplitFaceTool();
if ( faceTool.IsNull() ) return 0.;
Handle(ShapeUpgrade_SplitSurfaceAngle) tool =
Handle(ShapeUpgrade_SplitSurfaceAngle)::DownCast ( faceTool );
Handle(ShapeUpgrade_SplitSurfaceAngle)::DownCast (faceTool->GetSplitSurfaceTool());
return ( tool.IsNull() ? 0. : tool->MaxAngle() );
}