1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

Integration of OCCT 6.5.0 from SVN

This commit is contained in:
bugmaster
2011-03-16 07:30:28 +00:00
committed by bugmaster
parent 4903637061
commit 7fd59977df
16375 changed files with 3882564 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
// File: ShapeUpgrade_ShapeDivideAngle.cxx
// Created: Thu May 6 10:38:17 1999
// Author: Pavel DURANDIN
// <pdn@friendox.nnov.matra-dtv.fr>
#include <ShapeUpgrade_ShapeDivideAngle.ixx>
#include <ShapeUpgrade_SplitSurfaceAngle.hxx>
#include <ShapeUpgrade_FaceDivide.hxx>
//=======================================================================
//function : ShapeUpgrade_ShapeDivideAngle
//purpose :
//=======================================================================
ShapeUpgrade_ShapeDivideAngle::ShapeUpgrade_ShapeDivideAngle (const Standard_Real MaxAngle)
{
InitTool ( MaxAngle );
}
//=======================================================================
//function : ShapeUpgrade_ShapeDivideAngle
//purpose :
//=======================================================================
ShapeUpgrade_ShapeDivideAngle::ShapeUpgrade_ShapeDivideAngle(const Standard_Real MaxAngle,
const TopoDS_Shape& S):
ShapeUpgrade_ShapeDivide(S)
{
InitTool ( MaxAngle );
}
//=======================================================================
//function : InitTool
//purpose :
//=======================================================================
void ShapeUpgrade_ShapeDivideAngle::InitTool (const Standard_Real MaxAngle)
{
Handle(ShapeUpgrade_FaceDivide) tool = GetSplitFaceTool();
tool->SetSplitSurfaceTool ( new ShapeUpgrade_SplitSurfaceAngle (MaxAngle) );
tool->SetWireDivideTool ( 0 ); // no splitting of wire
SetSplitFaceTool(tool);
}
//=======================================================================
//function : SetMaxAngle
//purpose :
//=======================================================================
void ShapeUpgrade_ShapeDivideAngle::SetMaxAngle (const Standard_Real MaxAngle)
{
InitTool ( MaxAngle );
}
//=======================================================================
//function : MaxAngle
//purpose :
//=======================================================================
double ShapeUpgrade_ShapeDivideAngle::MaxAngle () const
{
Handle(ShapeUpgrade_FaceDivide) faceTool = GetSplitFaceTool();
if ( faceTool.IsNull() ) return 0.;
Handle(ShapeUpgrade_SplitSurfaceAngle) tool =
Handle(ShapeUpgrade_SplitSurfaceAngle)::DownCast ( faceTool );
return ( tool.IsNull() ? 0. : tool->MaxAngle() );
}