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

0025621: CAST analysis - Avoid constructors not supplying an initial value for all non-static data members

The constructors of classes from following files have been fixed to ensure that all non-static fields are initialized:

    Adaptor2d_Line2d.cxx
    Adaptor3d_IsoCurve.cxx
    Adaptor3d_OffsetCurve.cxx
    AdvApp2Var_ApproxAFunc2Var.cxx
    AIS_Dimension.cxx
    AIS_InteractiveContext.cxx
    Aspect_DisplayConnection.cxx
    BiTgte_CurveOnEdge.cxx
    BiTgte_CurveOnVertex.cxx
    BRepAdaptor_CompCurve.cxx
    BRepMesh_Circle.hxx
    BRepMesh_Delaun.cxx
    BRepToIGES_BREntity.cxx
    ChFi2d_AnaFilletAlgo.cxx
    ChFi2d_ChamferAPI.cxx
    ChFi2d_FilletAlgo.cxx
    ChFi2d_FilletAlgo.hxx
    Extrema_ExtPExtS.cxx
    Font_FTFont.cxx
    GccEnt_QualifiedCirc.cxx
    Geom2dAdaptor_Curve.cxx
    IGESData_IGESEntity.cxx
    IGESData_DefSwitch.cxx
    IGESToBRep_CurveAndSurface.cxx
    LDOM_XmlReader.cxx
    math_TrigonometricFunctionRoots.cxx
    NCollection_ListNode.hxx
    ProjLib_CompProjectedCurve.cxx
    ProjLib_ComputeApproxOnPolarSurface.cxx
    Select3D_Box2d.hxx
    Select3D_PointData.hxx
This commit is contained in:
azn 2014-12-25 10:00:13 +03:00 committed by abv
parent 460f4f693a
commit cbff1e5531
30 changed files with 713 additions and 400 deletions

View File

@ -98,16 +98,18 @@ namespace
//purpose :
//=======================================================================
AIS_Dimension::AIS_Dimension (const AIS_KindOfDimension theType)
: AIS_InteractiveObject(),
myCustomValue (0.0),
myIsValueCustom (Standard_False),
mySpecialSymbol (' '),
: AIS_InteractiveObject (),
mySelToleranceForText2d(0.0),
myCustomValue (0.0),
myIsValueCustom (Standard_False),
myIsTextPositionFixed (Standard_False),
mySpecialSymbol (' '),
myDisplaySpecialSymbol (AIS_DSS_No),
myGeometryType (GeometryType_UndefShapes),
myIsPlaneCustom (Standard_False),
myFlyout (0.0),
myIsGeometryValid (Standard_False),
myKindOfDimension (theType)
myGeometryType (GeometryType_UndefShapes),
myIsPlaneCustom (Standard_False),
myFlyout (0.0),
myIsGeometryValid (Standard_False),
myKindOfDimension (theType)
{
}

View File

@ -78,7 +78,10 @@ mgrSelector(new SelectMgr_SelectionManager()),
myMainPM(new PrsMgr_PresentationManager3d(MainViewer->Viewer())),
myMainVwr(MainViewer),
myMainSel(new StdSelect_ViewerSelector3d()),
myToHilightSelected( Standard_True ),
myWasLastMain(Standard_False),
myCurrentTouched(Standard_False),
mySelectedTouched(Standard_False),
myToHilightSelected(Standard_True),
myFilters(new SelectMgr_OrFilter()),
myDefaultDrawer(new Prs3d_Drawer()),
myDefaultColor(Quantity_NOC_GOLDENROD),
@ -88,6 +91,7 @@ myPreselectionColor(Quantity_NOC_GREEN),
mySubIntensity(Quantity_NOC_GRAY40),
myDisplayMode(0),
myCurLocalIndex(0),
myAISCurDetected(0),
myZDetectionFlag(0),
myIsAutoActivateSelMode( Standard_True )
{

View File

@ -25,6 +25,7 @@
//=======================================================================
Adaptor2d_Line2d::Adaptor2d_Line2d()
: myUfirst(0.0), myUlast (0.0)
{
}
@ -33,10 +34,11 @@ Adaptor2d_Line2d::Adaptor2d_Line2d()
//purpose :
//=======================================================================
Adaptor2d_Line2d::Adaptor2d_Line2d(const gp_Pnt2d& P, const gp_Dir2d& D,
const Standard_Real UFirst,
const Standard_Real ULast):
myUfirst(UFirst),myUlast(ULast),myAx2d(P,D)
Adaptor2d_Line2d::Adaptor2d_Line2d(const gp_Pnt2d& P,
const gp_Dir2d& D,
const Standard_Real UFirst,
const Standard_Real ULast)
: myUfirst(UFirst), myUlast(ULast), myAx2d(P,D)
{
}

View File

@ -35,24 +35,26 @@
//purpose :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve() :
myIso(GeomAbs_NoneIso),
myFirst ( 0. ),
myLast ( 0. ),
myParameter ( 0. )
{}
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve()
: myIso (GeomAbs_NoneIso),
myFirst (0.0),
myLast (0.0),
myParameter(0.0)
{
}
//=======================================================================
//function : Adaptor3d_IsoCurve
//purpose :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S) :
myFirst ( 0. ),
myLast ( 0. ),
myParameter ( 0. )
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S)
: mySurface (S),
myIso (GeomAbs_NoneIso),
myFirst (0.0),
myLast (0.0),
myParameter(0.0)
{
Load(S);
}
//=======================================================================
@ -61,11 +63,15 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S) :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S,
const GeomAbs_IsoType Iso,
const Standard_Real Param)
const GeomAbs_IsoType theIso,
const Standard_Real theParam)
: mySurface (S),
myIso (GeomAbs_NoneIso),
myFirst (0.0),
myLast (0.0),
myParameter(0.0)
{
Load(S);
Load(Iso,Param);
Load(theIso, theParam);
}
//=======================================================================
@ -73,14 +79,18 @@ Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S,
//purpose :
//=======================================================================
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& S,
const GeomAbs_IsoType Iso,
const Standard_Real Param,
const Standard_Real WFirst,
const Standard_Real WLast)
Adaptor3d_IsoCurve::Adaptor3d_IsoCurve(const Handle(Adaptor3d_HSurface)& theS,
const GeomAbs_IsoType theIso,
const Standard_Real theParam,
const Standard_Real theWFirst,
const Standard_Real theWLast)
: mySurface (theS),
myIso (theIso),
myFirst (theWFirst),
myLast (theWLast),
myParameter(theParam)
{
Load(S);
Load(Iso,Param,WFirst,WLast);
Load(theIso, theParam, theWFirst, theWLast);
}
//=======================================================================

View File

@ -28,22 +28,11 @@
//purpose :
//=======================================================================
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve() :
myOffset( 0.),
myFirst ( 0.),
myLast ( 0.)
{}
//=======================================================================
//function : Adaptor3d_OffsetCurve
//purpose :
//=======================================================================
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C) :
myFirst ( 0.),
myLast ( 0.)
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve()
: myOffset(0.0),
myFirst (0.0),
myLast (0.0)
{
Load(C);
}
//=======================================================================
@ -51,13 +40,12 @@ Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C
//purpose :
//=======================================================================
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C,
const Standard_Real Offset) :
myFirst ( 0.),
myLast ( 0.)
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& theCurve)
: myCurve (theCurve),
myOffset(0.0),
myFirst (0.0),
myLast (0.0)
{
Load(C);
Load(Offset);
}
//=======================================================================
@ -65,13 +53,30 @@ Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C
//purpose :
//=======================================================================
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(const Handle(Adaptor2d_HCurve2d)& C,
const Standard_Real Offset,
const Standard_Real WFirst,
const Standard_Real WLast)
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve
(const Handle(Adaptor2d_HCurve2d)& theCurve, const Standard_Real theOffset)
: myCurve (theCurve),
myOffset(theOffset),
myFirst (theCurve->FirstParameter()),
myLast (theCurve->LastParameter())
{
}
//=======================================================================
//function : Adaptor3d_OffsetCurve
//purpose :
//=======================================================================
Adaptor3d_OffsetCurve::Adaptor3d_OffsetCurve(
const Handle(Adaptor2d_HCurve2d)& theCurve,
const Standard_Real theOffset,
const Standard_Real theWFirst,
const Standard_Real theWLast )
: myCurve (theCurve),
myOffset(theOffset),
myFirst (theWFirst),
myLast (theWLast)
{
Load(C);
Load(Offset,WFirst,WLast);
}
//=======================================================================
@ -104,8 +109,8 @@ void Adaptor3d_OffsetCurve::Load( const Standard_Real Offset)
//=======================================================================
void Adaptor3d_OffsetCurve::Load(const Standard_Real Offset,
const Standard_Real WFirst,
const Standard_Real WLast)
const Standard_Real WFirst,
const Standard_Real WLast)
{
myOffset = Offset;
myFirst = WFirst;

View File

@ -48,54 +48,57 @@
//purpose :
//=======================================================================
AdvApp2Var_ApproxAFunc2Var::
AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS,
const Standard_Integer Num2DSS,
const Standard_Integer Num3DSS,
const Handle(TColStd_HArray1OfReal)& OneDTol,
const Handle(TColStd_HArray1OfReal)& TwoDTol,
const Handle(TColStd_HArray1OfReal)& ThreeDTol,
const Handle(TColStd_HArray2OfReal)& OneDTolFr,
const Handle(TColStd_HArray2OfReal)& TwoDTolFr,
const Handle(TColStd_HArray2OfReal)& ThreeDTolFr,
const Standard_Real FirstInU,
const Standard_Real LastInU,
const Standard_Real FirstInV,
const Standard_Real LastInV,
const GeomAbs_IsoType FavorIso,
const GeomAbs_Shape ContInU,
const GeomAbs_Shape ContInV,
const Standard_Integer PrecisCode,
const Standard_Integer MaxDegInU,
const Standard_Integer MaxDegInV,
const Standard_Integer MaxPatch,
const AdvApp2Var_EvaluatorFunc2Var& Func,
AdvApprox_Cutting& UChoice,
AdvApprox_Cutting& VChoice) :
my1DTolerances(OneDTol),
my2DTolerances(TwoDTol),
my3DTolerances(ThreeDTol),
my1DTolOnFront(OneDTolFr),
my2DTolOnFront(TwoDTolFr),
my3DTolOnFront(ThreeDTolFr),
myFirstParInU(FirstInU),
myLastParInU(LastInU),
myFirstParInV(FirstInV),
myLastParInV(LastInV),
myFavoriteIso(FavorIso),
myContInU(ContInU),
myContInV(ContInV),
myPrecisionCode(PrecisCode),
myMaxDegInU(MaxDegInU),
myMaxDegInV(MaxDegInV),
myMaxPatches(MaxPatch),
myDone(Standard_False),
myHasResult(Standard_False),
myCriterionError(0.)
AdvApp2Var_ApproxAFunc2Var::AdvApp2Var_ApproxAFunc2Var(
const Standard_Integer Num1DSS,
const Standard_Integer Num2DSS,
const Standard_Integer Num3DSS,
const Handle(TColStd_HArray1OfReal)& OneDTol,
const Handle(TColStd_HArray1OfReal)& TwoDTol,
const Handle(TColStd_HArray1OfReal)& ThreeDTol,
const Handle(TColStd_HArray2OfReal)& OneDTolFr,
const Handle(TColStd_HArray2OfReal)& TwoDTolFr,
const Handle(TColStd_HArray2OfReal)& ThreeDTolFr,
const Standard_Real FirstInU,
const Standard_Real LastInU,
const Standard_Real FirstInV,
const Standard_Real LastInV,
const GeomAbs_IsoType FavorIso,
const GeomAbs_Shape ContInU,
const GeomAbs_Shape ContInV,
const Standard_Integer PrecisCode,
const Standard_Integer MaxDegInU,
const Standard_Integer MaxDegInV,
const Standard_Integer MaxPatch,
const AdvApp2Var_EvaluatorFunc2Var& Func,
AdvApprox_Cutting& UChoice,
AdvApprox_Cutting& VChoice)
: my1DTolerances (OneDTol),
my2DTolerances (TwoDTol),
my3DTolerances (ThreeDTol),
my1DTolOnFront (OneDTolFr),
my2DTolOnFront (TwoDTolFr),
my3DTolOnFront (ThreeDTolFr),
myFirstParInU (FirstInU),
myLastParInU (LastInU),
myFirstParInV (FirstInV),
myLastParInV (LastInV),
myFavoriteIso (FavorIso),
myContInU (ContInU),
myContInV (ContInV),
myPrecisionCode (PrecisCode),
myMaxDegInU (MaxDegInU),
myMaxDegInV (MaxDegInV),
myMaxPatches (MaxPatch),
myDone (Standard_False),
myHasResult (Standard_False),
myDegreeInU (0),
myDegreeInV (0),
myCriterionError(0.0)
{
myNumSubSpaces[0] = Num1DSS;
myNumSubSpaces[1] = Num2DSS;
myNumSubSpaces[2] = Num3DSS;
Init();
Perform(UChoice, VChoice, Func);
ConvertBS();
@ -106,54 +109,58 @@ myCriterionError(0.)
//purpose :
//=======================================================================
AdvApp2Var_ApproxAFunc2Var::
AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS,
const Standard_Integer Num2DSS,
const Standard_Integer Num3DSS,
const Handle(TColStd_HArray1OfReal)& OneDTol,
const Handle(TColStd_HArray1OfReal)& TwoDTol,
const Handle(TColStd_HArray1OfReal)& ThreeDTol,
const Handle(TColStd_HArray2OfReal)& OneDTolFr,
const Handle(TColStd_HArray2OfReal)& TwoDTolFr,
const Handle(TColStd_HArray2OfReal)& ThreeDTolFr,
const Standard_Real FirstInU,
const Standard_Real LastInU,
const Standard_Real FirstInV,
const Standard_Real LastInV,
const GeomAbs_IsoType FavorIso,
const GeomAbs_Shape ContInU,
const GeomAbs_Shape ContInV,
const Standard_Integer PrecisCode,
const Standard_Integer MaxDegInU,
const Standard_Integer MaxDegInV,
const Standard_Integer MaxPatch,
const AdvApp2Var_EvaluatorFunc2Var& Func,
const AdvApp2Var_Criterion& Crit,
AdvApprox_Cutting& UChoice,
AdvApprox_Cutting& VChoice) :
my1DTolerances(OneDTol),
my2DTolerances(TwoDTol),
my3DTolerances(ThreeDTol),
my1DTolOnFront(OneDTolFr),
my2DTolOnFront(TwoDTolFr),
my3DTolOnFront(ThreeDTolFr),
myFirstParInU(FirstInU),
myLastParInU(LastInU),
myFirstParInV(FirstInV),
myLastParInV(LastInV),
myFavoriteIso(FavorIso),
myContInU(ContInU),
myContInV(ContInV),
myPrecisionCode(PrecisCode),
myMaxDegInU(MaxDegInU),
myMaxDegInV(MaxDegInV),
myMaxPatches(MaxPatch),
myDone(Standard_False),
myHasResult(Standard_False)
AdvApp2Var_ApproxAFunc2Var::AdvApp2Var_ApproxAFunc2Var(
const Standard_Integer Num1DSS,
const Standard_Integer Num2DSS,
const Standard_Integer Num3DSS,
const Handle(TColStd_HArray1OfReal)& OneDTol,
const Handle(TColStd_HArray1OfReal)& TwoDTol,
const Handle(TColStd_HArray1OfReal)& ThreeDTol,
const Handle(TColStd_HArray2OfReal)& OneDTolFr,
const Handle(TColStd_HArray2OfReal)& TwoDTolFr,
const Handle(TColStd_HArray2OfReal)& ThreeDTolFr,
const Standard_Real FirstInU,
const Standard_Real LastInU,
const Standard_Real FirstInV,
const Standard_Real LastInV,
const GeomAbs_IsoType FavorIso,
const GeomAbs_Shape ContInU,
const GeomAbs_Shape ContInV,
const Standard_Integer PrecisCode,
const Standard_Integer MaxDegInU,
const Standard_Integer MaxDegInV,
const Standard_Integer MaxPatch,
const AdvApp2Var_EvaluatorFunc2Var& Func,
const AdvApp2Var_Criterion& Crit,
AdvApprox_Cutting& UChoice,
AdvApprox_Cutting& VChoice)
: my1DTolerances (OneDTol),
my2DTolerances (TwoDTol),
my3DTolerances (ThreeDTol),
my1DTolOnFront (OneDTolFr),
my2DTolOnFront (TwoDTolFr),
my3DTolOnFront (ThreeDTolFr),
myFirstParInU (FirstInU),
myLastParInU (LastInU),
myFirstParInV (FirstInV),
myLastParInV (LastInV),
myFavoriteIso (FavorIso),
myContInU (ContInU),
myContInV (ContInV),
myPrecisionCode (PrecisCode),
myMaxDegInU (MaxDegInU),
myMaxDegInV (MaxDegInV),
myMaxPatches (MaxPatch),
myDone (Standard_False),
myHasResult (Standard_False),
myDegreeInU (0),
myDegreeInV (0),
myCriterionError(0.0)
{
myNumSubSpaces[0] = Num1DSS;
myNumSubSpaces[1] = Num2DSS;
myNumSubSpaces[2] = Num3DSS;
Init();
Perform(UChoice, VChoice, Func, Crit);
ConvertBS();

View File

@ -28,22 +28,48 @@
#include <TopExp.hxx>
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve()
: TFirst (0.0),
TLast (0.0),
PTol (0.0),
myPeriod(0.0),
CurIndex(-1),
Forward (Standard_False),
IsbyAC (Standard_False),
Periodic(Standard_False)
{
}
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W,
const Standard_Boolean AC)
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
const Standard_Boolean theIsAC)
: myWire (theWire),
TFirst (0.0),
TLast (0.0),
PTol (0.0),
myPeriod(0.0),
CurIndex(-1),
Forward (Standard_False),
IsbyAC (theIsAC),
Periodic(Standard_False)
{
Initialize(W, AC);
Initialize(theWire, theIsAC);
}
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& W,
const Standard_Boolean AC,
const Standard_Real First,
const Standard_Real Last,
const Standard_Real Tol)
BRepAdaptor_CompCurve::BRepAdaptor_CompCurve(const TopoDS_Wire& theWire,
const Standard_Boolean theIsAC,
const Standard_Real theFirst,
const Standard_Real theLast,
const Standard_Real theTolerance)
: myWire (theWire),
TFirst (theFirst),
TLast (theLast),
PTol (theTolerance),
myPeriod(0.0),
CurIndex(-1),
Forward (Standard_False),
IsbyAC (theIsAC),
Periodic(Standard_False)
{
Initialize(W, AC, First, Last, Tol);
Initialize(theWire, theIsAC, theFirst, theLast, theTolerance);
}
void BRepAdaptor_CompCurve::Initialize(const TopoDS_Wire& W,

View File

@ -28,17 +28,17 @@ public:
DEFINE_STANDARD_ALLOC
//! Default constructor.
Standard_EXPORT BRepMesh_Circle()
BRepMesh_Circle() : myRadius(0.0)
{
}
//! Constructor.
//! @param theLocation location of a circle.
//! @param theRadius radius of a circle.
Standard_EXPORT BRepMesh_Circle(const gp_XY& theLocation,
const Standard_Real theRadius)
: myLocation(theLocation),
myRadius (theRadius)
BRepMesh_Circle(const gp_XY& theLocation,
const Standard_Real theRadius)
: myLocation(theLocation),
myRadius (theRadius)
{
}

View File

@ -75,10 +75,9 @@ namespace {
//function : BRepMesh_Delaun
//purpose : Creates the triangulation with an empty Mesh data structure
//=======================================================================
BRepMesh_Delaun::BRepMesh_Delaun(
BRepMesh::Array1OfVertexOfDelaun& theVertices)
: myCircles(theVertices.Length(), new NCollection_IncAllocator(
BRepMesh::MEMORY_BLOCK_SIZE_HUGE))
BRepMesh_Delaun::BRepMesh_Delaun(BRepMesh::Array1OfVertexOfDelaun& theVertices)
: myCircles (theVertices.Length(), new NCollection_IncAllocator(
BRepMesh::MEMORY_BLOCK_SIZE_HUGE))
{
if ( theVertices.Length() > 2 )
{
@ -96,9 +95,9 @@ BRepMesh_Delaun::BRepMesh_Delaun(
BRepMesh_Delaun::BRepMesh_Delaun(
const Handle( BRepMesh_DataStructureOfDelaun )& theOldMesh,
BRepMesh::Array1OfVertexOfDelaun& theVertices)
: myCircles( theVertices.Length(), theOldMesh->Allocator() )
: myMeshData( theOldMesh ),
myCircles ( theVertices.Length(), theOldMesh->Allocator() )
{
myMeshData = theOldMesh;
if ( theVertices.Length() > 2 )
Init( theVertices );
}
@ -110,9 +109,9 @@ BRepMesh_Delaun::BRepMesh_Delaun(
BRepMesh_Delaun::BRepMesh_Delaun(
const Handle( BRepMesh_DataStructureOfDelaun )& theOldMesh,
BRepMesh::Array1OfInteger& theVertexIndices)
: myCircles( theVertexIndices.Length(), theOldMesh->Allocator() )
: myMeshData( theOldMesh ),
myCircles ( theVertexIndices.Length(), theOldMesh->Allocator() )
{
myMeshData = theOldMesh;
if ( theVertexIndices.Length() > 2 )
{
Bnd_Box2d aBox;

View File

@ -63,8 +63,11 @@ char Name[100];
//=======================================================================
BRepToIGES_BREntity::BRepToIGES_BREntity()
: TheUnitFactor(1.0),
myConvSurface(Interface_Static::IVal("write.convertsurface.mode")),
myPCurveMode (Interface_Static::IVal("write.surfacecurve.mode")),
TheMap (new Transfer_FinderProcess())
{
Init();
}
//=======================================================================

View File

@ -31,6 +31,7 @@
//======================================================================
BiTgte_CurveOnEdge::BiTgte_CurveOnEdge()
: myType(GeomAbs_OtherCurve)
{
}
@ -40,10 +41,13 @@ BiTgte_CurveOnEdge::BiTgte_CurveOnEdge()
//purpose :
//=======================================================================
BiTgte_CurveOnEdge::BiTgte_CurveOnEdge(const TopoDS_Edge& EonF,
const TopoDS_Edge& Edge)
BiTgte_CurveOnEdge::BiTgte_CurveOnEdge(const TopoDS_Edge& theEonF,
const TopoDS_Edge& theEdge)
: myEdge(theEdge),
myEonF(theEonF),
myType(GeomAbs_OtherCurve)
{
Init(EonF,Edge);
Init(theEonF, theEdge);
}
@ -53,7 +57,7 @@ BiTgte_CurveOnEdge::BiTgte_CurveOnEdge(const TopoDS_Edge& EonF,
//=======================================================================
void BiTgte_CurveOnEdge::Init(const TopoDS_Edge& EonF,
const TopoDS_Edge& Edge)
const TopoDS_Edge& Edge)
{
Standard_Real f,l;

View File

@ -27,6 +27,7 @@
//======================================================================
BiTgte_CurveOnVertex::BiTgte_CurveOnVertex()
: myFirst(0.0), myLast(0.0)
{
}
@ -36,10 +37,11 @@ BiTgte_CurveOnVertex::BiTgte_CurveOnVertex()
//purpose :
//=======================================================================
BiTgte_CurveOnVertex::BiTgte_CurveOnVertex(const TopoDS_Edge& EonF,
const TopoDS_Vertex& V )
BiTgte_CurveOnVertex::BiTgte_CurveOnVertex(const TopoDS_Edge& theEonF,
const TopoDS_Vertex& theVertex)
: myFirst(0.0), myLast(0.0)
{
Init(EonF,V);
Init(theEonF, theVertex);
}
@ -49,7 +51,7 @@ BiTgte_CurveOnVertex::BiTgte_CurveOnVertex(const TopoDS_Edge& EonF,
//=======================================================================
void BiTgte_CurveOnVertex::Init(const TopoDS_Edge& EonF,
const TopoDS_Vertex& V )
const TopoDS_Vertex& V)
{
BRep_Tool::Range(EonF,myFirst,myLast);
myPnt = BRep_Tool::Pnt(V);

View File

@ -80,8 +80,25 @@ static Standard_Boolean IsEqual(const gp_Pnt2d& p1, const gp_Pnt2d& p2)
// An empty constructor.
// Use the method Init() to initialize the class.
ChFi2d_AnaFilletAlgo::ChFi2d_AnaFilletAlgo()
: segment1(Standard_False),
x11(0.0),
y11(0.0),
x12(0.0),
y12(0.0),
xc1(0.0),
yc1(0.0),
radius1(0.0),
cw1(Standard_False),
segment2(Standard_False),
x21(0.0),
y21(0.0),
x22(0.0),
y22(0.0),
xc2(0.0),
yc2(0.0),
radius2(0.0),
cw2(Standard_False)
{
}
// An constructor.
@ -89,7 +106,26 @@ ChFi2d_AnaFilletAlgo::ChFi2d_AnaFilletAlgo()
// - segment
// - arc of circle.
ChFi2d_AnaFilletAlgo::ChFi2d_AnaFilletAlgo(const TopoDS_Wire& theWire,
const gp_Pln& thePlane)
const gp_Pln& thePlane)
: plane(thePlane),
segment1(Standard_False),
x11(0.0),
y11(0.0),
x12(0.0),
y12(0.0),
xc1(0.0),
yc1(0.0),
radius1(0.0),
cw1(Standard_False),
segment2(Standard_False),
x21(0.0),
y21(0.0),
x22(0.0),
y22(0.0),
xc2(0.0),
yc2(0.0),
radius2(0.0),
cw2(Standard_False)
{
Init(theWire, thePlane);
}
@ -101,6 +137,25 @@ ChFi2d_AnaFilletAlgo::ChFi2d_AnaFilletAlgo(const TopoDS_Wire& theWire,
ChFi2d_AnaFilletAlgo::ChFi2d_AnaFilletAlgo(const TopoDS_Edge& theEdge1,
const TopoDS_Edge& theEdge2,
const gp_Pln& thePlane)
: plane(thePlane),
segment1(Standard_False),
x11(0.0),
y11(0.0),
x12(0.0),
y12(0.0),
xc1(0.0),
yc1(0.0),
radius1(0.0),
cw1(Standard_False),
segment2(Standard_False),
x21(0.0),
y21(0.0),
x22(0.0),
y22(0.0),
xc2(0.0),
yc2(0.0),
radius2(0.0),
cw2(Standard_False)
{
// Make a wire consisting of two edges.
Init(theEdge1, theEdge2, thePlane);

View File

@ -23,32 +23,38 @@
// An empty constructor.
ChFi2d_ChamferAPI::ChFi2d_ChamferAPI()
: myStart1(0.0),
myEnd1 (0.0),
myStart2(0.0),
myEnd2 (0.0),
myCommonStart1(Standard_False),
myCommonStart2(Standard_False)
{
}
// A constructor accepting a wire consisting of two linear edges.
ChFi2d_ChamferAPI::ChFi2d_ChamferAPI(const TopoDS_Wire& theWire) :
myStart1(0.),
myEnd1(0.),
myStart2(0.),
myEnd2(0.),
myCommonStart1(Standard_False),
myCommonStart2(Standard_False)
ChFi2d_ChamferAPI::ChFi2d_ChamferAPI(const TopoDS_Wire& theWire)
: myStart1(0.0),
myEnd1 (0.0),
myStart2(0.0),
myEnd2 (0.0),
myCommonStart1(Standard_False),
myCommonStart2(Standard_False)
{
Init(theWire);
}
// A constructor accepting two linear edges.
ChFi2d_ChamferAPI::ChFi2d_ChamferAPI(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2) :
myStart1(0.),
myEnd1(0.),
myStart2(0.),
myEnd2(0.),
myCommonStart1(Standard_False),
myCommonStart2(Standard_False)
ChFi2d_ChamferAPI::ChFi2d_ChamferAPI(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2)
: myEdge1(theEdge1),
myEdge2(theEdge2),
myStart1(0.0),
myEnd1 (0.0),
myStart2(0.0),
myEnd2 (0.0),
myCommonStart1(Standard_False),
myCommonStart2(Standard_False)
{
Init(theEdge1, theEdge2);
}
// Initializes the class by a wire consisting of two libear edges.

View File

@ -35,11 +35,26 @@
#include <BRepAdaptor_Curve.hxx>
ChFi2d_FilletAlgo::ChFi2d_FilletAlgo()
: myStart1(0.0),
myEnd1 (0.0),
myStart2(0.0),
myEnd2 (0.0),
myRadius(0.0),
myStartSide (Standard_False),
myEdgesExchnged(Standard_False),
myDegreeOfRecursion(0)
{
}
ChFi2d_FilletAlgo::ChFi2d_FilletAlgo(const TopoDS_Wire& theWire, const gp_Pln& thePlane)
: myStart1(0.0),
myEnd1 (0.0),
myStart2(0.0),
myEnd2 (0.0),
myRadius(0.0),
myStartSide (Standard_False),
myEdgesExchnged(Standard_False),
myDegreeOfRecursion(0)
{
Init(theWire, thePlane);
}
@ -47,6 +62,16 @@ ChFi2d_FilletAlgo::ChFi2d_FilletAlgo(const TopoDS_Wire& theWire, const gp_Pln& t
ChFi2d_FilletAlgo::ChFi2d_FilletAlgo(const TopoDS_Edge& theEdge1,
const TopoDS_Edge& theEdge2,
const gp_Pln& thePlane)
: myEdge1(theEdge1),
myEdge2(theEdge2),
myStart1(0.0),
myEnd1 (0.0),
myStart2(0.0),
myEnd2 (0.0),
myRadius(0.0),
myStartSide (Standard_False),
myEdgesExchnged(Standard_False),
myDegreeOfRecursion(0)
{
Init(theEdge1, theEdge2, thePlane);
}
@ -615,6 +640,12 @@ TopoDS_Edge ChFi2d_FilletAlgo::Result(const gp_Pnt& thePoint, TopoDS_Edge& theEd
return aResult;
}
FilletPoint::FilletPoint(const Standard_Real theParam)
: myParam (theParam),
myParam2(0.0)
{
}
void FilletPoint::appendValue(Standard_Real theValue, Standard_Boolean theValid)
{
Standard_Integer a;

View File

@ -145,27 +145,32 @@ class FilletPoint
{
public:
//! Creates a point on a first curve by parameter on this curve.
FilletPoint(Standard_Real theParam) : myParam2(0.)
{myParam = theParam;}
FilletPoint(const Standard_Real theParam);
//! Changes the point position by changing point parameter on the first curve.
void setParam(Standard_Real theParam) {myParam = theParam;}
//! Returns the point parameter on the first curve.
Standard_Real getParam() const {return myParam;}
//! Returns number of found values of function in this point.
Standard_Integer getNBValues() {return myV.Length();}
//! Returns value of function in this point.
Standard_Real getValue(int theIndex) {return myV.Value(theIndex);}
//! Returns derivatives of function in this point.
Standard_Real getDiff(int theIndex) {return myD.Value(theIndex);}
//! Returns true if function is valid (rediuses vectors of fillet do not intersect any curve).
Standard_Boolean isValid(int theIndex) {return (Standard_Boolean)myValid.Value(theIndex);}
//! Returns the index of the nearest value
int getNear(int theIndex) {return myNear.Value(theIndex);}
//! Defines the parameter of the projected point on the second curve.
void setParam2(const Standard_Real theParam2) {myParam2 = theParam2;}
//! Returns the parameter of the projected point on the second curve.
Standard_Real getParam2() { return myParam2 ; }
@ -179,14 +184,17 @@ public:
//! Computes difference between this point and the given. Stores difference in myD.
Standard_Boolean calculateDiff(FilletPoint*);
//! Filters out the values and leaves the most optimal one.
void FilterPoints(FilletPoint*);
//! Returns a pointer to created copy of the point
//! warning: this is not the full copy! Copies only: myParam, myV, myD, myValid
FilletPoint* Copy();
//! Returns the index of the solution or zero if there is no solution
Standard_Integer hasSolution(Standard_Real theRadius);
//! For debug only
Standard_Real LowerValue()
{

View File

@ -144,9 +144,17 @@ void Extrema_ExtPExtS::MakePreciser (Standard_Real& U,
}
//=============================================================================
Extrema_ExtPExtS::Extrema_ExtPExtS ()
Extrema_ExtPExtS::Extrema_ExtPExtS()
: myuinf(0.0),
myusup(0.0),
mytolu(0.0),
myvinf(0.0),
myvsup(0.0),
mytolv(0.0),
myIsAnalyticallyComputable(Standard_False),
myDone(Standard_False),
myNbExt(Standard_False)
{
myDone = Standard_False;
}
//=============================================================================
@ -159,6 +167,16 @@ Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt&
const Standard_Real theVsup,
const Standard_Real theTolU,
const Standard_Real theTolV)
: myuinf(theUmin),
myusup(theUsup),
mytolu(theTolU),
myvinf(theVmin),
myvsup(theVsup),
mytolv(theTolV),
myS (theS),
myIsAnalyticallyComputable(Standard_False),
myDone(Standard_False),
myNbExt(Standard_False)
{
Initialize (theS,
theUmin,
@ -176,6 +194,16 @@ Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt&
const Handle(Adaptor3d_HSurfaceOfLinearExtrusion)& theS,
const Standard_Real theTolU,
const Standard_Real theTolV)
: myuinf(theS->FirstUParameter()),
myusup(theS->LastUParameter()),
mytolu(theTolU),
myvinf(theS->FirstVParameter()),
myvsup(theS->LastVParameter()),
mytolv(theTolV),
myS (theS),
myIsAnalyticallyComputable(Standard_False),
myDone(Standard_False),
myNbExt(Standard_False)
{
Initialize (theS,
theS->FirstUParameter(),
@ -187,6 +215,7 @@ Extrema_ExtPExtS::Extrema_ExtPExtS (const gp_Pnt&
Perform (theP);
}
//=======================================================================
//function : Initialize
//purpose :

View File

@ -26,11 +26,11 @@ IMPLEMENT_STANDARD_RTTIEXT(Font_FTFont, Standard_Transient)
// purpose :
// =======================================================================
Font_FTFont::Font_FTFont (const Handle(Font_FTLibrary)& theFTLib)
: myFTLib (theFTLib),
myFTFace (NULL),
myPointSize (0),
myLoadFlags (FT_LOAD_NO_HINTING | FT_LOAD_TARGET_NORMAL),
myUChar (0)
: myFTLib (theFTLib),
myFTFace (NULL),
myPointSize (0U),
myLoadFlags (FT_LOAD_NO_HINTING | FT_LOAD_TARGET_NORMAL),
myUChar (0U)
{
if (myFTLib.IsNull())
{

View File

@ -44,10 +44,9 @@ Standard_Boolean GccEnt_QualifiedCirc::
else { return Standard_False; }
}
GccEnt_QualifiedCirc::
GccEnt_QualifiedCirc (const gp_Circ2d& Qualified,
const GccEnt_Position Qualifier) {
TheQualified = Qualified;
TheQualifier = Qualifier;
}
GccEnt_QualifiedCirc::GccEnt_QualifiedCirc(const gp_Circ2d& theQualified,
const GccEnt_Position theQualifier)
: TheQualified(theQualified),
TheQualifier(theQualifier)
{
}

View File

@ -122,9 +122,9 @@ GeomAbs_Shape Geom2dAdaptor_Curve::LocalContinuity(const Standard_Real U1,
//=======================================================================
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve()
: myTypeCurve(GeomAbs_OtherCurve),
myFirst(0.),
myLast(0.)
: myTypeCurve(GeomAbs_OtherCurve),
myFirst (0.0),
myLast (0.0)
{
}
@ -133,9 +133,12 @@ Geom2dAdaptor_Curve::Geom2dAdaptor_Curve()
//purpose :
//=======================================================================
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C)
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& theCrv)
: myTypeCurve(GeomAbs_OtherCurve),
myFirst (0.0),
myLast (0.0)
{
Load(C);
Load(theCrv);
}
//=======================================================================
@ -143,11 +146,14 @@ Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C)
//purpose :
//=======================================================================
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& C,
const Standard_Real UFirst,
const Standard_Real ULast)
Geom2dAdaptor_Curve::Geom2dAdaptor_Curve(const Handle(Geom2d_Curve)& theCrv,
const Standard_Real theUFirst,
const Standard_Real theULast)
: myTypeCurve(GeomAbs_OtherCurve),
myFirst (theUFirst),
myLast (theULast)
{
Load(C,UFirst,ULast);
Load(theCrv, theUFirst, theULast);
}

View File

@ -18,20 +18,62 @@
// soit comme reference (-> valeur < 0), la reference elle-meme est ailleurs
IGESData_DefSwitch::IGESData_DefSwitch () { theval = 0; }
void IGESData_DefSwitch::SetVoid () { theval = 0; }
void IGESData_DefSwitch::SetReference () { theval = -1; }
void IGESData_DefSwitch::SetRank (const Standard_Integer val)
{ theval = val; }
IGESData_DefType IGESData_DefSwitch::DefType () const
//=======================================================================
//function : IGESData_DefSwitch
//purpose : Default constructor.
//=======================================================================
IGESData_DefSwitch::IGESData_DefSwitch()
: theval(0)
{
if (theval < 0) return IGESData_DefReference;
if (theval > 0) return IGESData_DefValue;
}
//=======================================================================
//function : SetVoid
//purpose :
//=======================================================================
void IGESData_DefSwitch::SetVoid()
{
theval = 0;
}
//=======================================================================
//function : SetReference
//purpose :
//=======================================================================
void IGESData_DefSwitch::SetReference()
{
theval = -1;
}
//=======================================================================
//function : SetRank
//purpose :
//=======================================================================
void IGESData_DefSwitch::SetRank(const Standard_Integer theRank)
{
theval = theRank;
}
//=======================================================================
//function : DefType
//purpose :
//=======================================================================
IGESData_DefType IGESData_DefSwitch::DefType() const
{
if (theval < 0)
return IGESData_DefReference;
if (theval > 0)
return IGESData_DefValue;
return IGESData_DefVoid;
}
Standard_Integer IGESData_DefSwitch::Value () const { return theval; }
//=======================================================================
//function : Value
//purpose :
//=======================================================================
Standard_Integer IGESData_DefSwitch::Value() const
{
return theval;
}

View File

@ -24,21 +24,38 @@
#define ThisEntity Handle(IGESData_IGESEntity)::DownCast(This())
// theStatusNum :
#define IGESFlagAssocs 131072
#define IGESFlagProps 262144
#define IGESFourStatus 65535
#define IGESStatusField 15
#define IGESShiftSubord 4
#define IGESShiftUse 8
#define IGESShiftHier 12
namespace
{
static const Standard_Integer IGESFlagAssocs = 131072;
static const Standard_Integer IGESFlagProps = 262144;
static const Standard_Integer IGESFourStatus = 65535;
static const Standard_Integer IGESStatusField = 15;
static const Standard_Integer IGESShiftSubord = 4;
static const Standard_Integer IGESShiftUse = 8;
static const Standard_Integer IGESShiftHier = 12;
}
//=======================================================================
//function : IGESData_IGESEntity
//purpose : Default constructor.
//=======================================================================
IGESData_IGESEntity::IGESData_IGESEntity()
: theType (0),
theForm (0),
theDefLevel (0),
theStatusNum (0),
theLWeightNum (0),
theLWeightVal (0.0),
theSubScriptN (0)
{
theRes1[0] = theRes2[0] = '\0';
}
IGESData_IGESEntity::IGESData_IGESEntity ()
{ Clear(); theRes1[0] = theRes2[0] = '\0'; }
void IGESData_IGESEntity::Clear ()
//=======================================================================
//function : Clear
//purpose :
//=======================================================================
void IGESData_IGESEntity::Clear ()
{
// Handle et DefSwitch
theStructure.Nullify();

View File

@ -68,8 +68,22 @@
//=======================================================================
IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface()
: myEps (1.e-04),
myEpsCoeff (1.e-06),
myEpsGeom (1.e-04),
myMinTol (-1.0),
myMaxTol (-1.0),
myModeIsTopo (Standard_True),
myModeApprox (Standard_False),
myContIsOpti (Standard_False),
myUnitFactor (1.0),
mySurfaceCurve(0),
myContinuity (0),
myUVResolution(0.0),
myIsResolCom (Standard_False),
myTP (new Transfer_TransientProcess())
{
Init();
UpdateMinMaxTol();
}
@ -80,24 +94,23 @@ IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface()
IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface
(const IGESToBRep_CurveAndSurface& other)
: myEps (other.myEps),
myEpsCoeff (other.myEpsCoeff),
myEpsGeom (other.myEpsGeom),
myMinTol (other.myMinTol),
myMaxTol (other.myMaxTol),
myModeIsTopo (other.myModeIsTopo),
myModeApprox (other.myModeApprox),
myContIsOpti (other.myContIsOpti),
myUnitFactor (other.myUnitFactor),
mySurfaceCurve(other.mySurfaceCurve),
myContinuity (other.myContinuity),
mySurface (other.mySurface),
myUVResolution(other.myUVResolution),
myIsResolCom (other.myIsResolCom),
myModel (other.myModel),
myTP (other.myTP)
{
myEps = other.GetEpsilon();
myEpsCoeff = other.GetEpsCoeff();
myEpsGeom = other.GetEpsGeom();
myMaxTol = other.GetMaxTol();
myModeIsTopo = other.GetModeTransfer();
myModeApprox = other.GetModeApprox();
myContIsOpti = other.GetOptimized();
myUnitFactor = other.GetUnitFactor();
mySurfaceCurve = other.GetSurfaceCurve();
myContinuity = other.GetContinuity();
myModel = other.GetModel();
myTP = other.GetTransferProcess();
myMinTol = other.GetMinTol();
mySurface = other.Surface();
myIsResolCom = other.myIsResolCom;
myUVResolution = other.myUVResolution;
}
@ -113,20 +126,21 @@ IGESToBRep_CurveAndSurface::IGESToBRep_CurveAndSurface
const Standard_Boolean mode,
const Standard_Boolean modeapprox,
const Standard_Boolean optimized)
: myEps (eps),
myEpsCoeff (epsCoeff),
myEpsGeom (epsGeom),
myMinTol (-1.0),
myMaxTol (-1.0),
myModeIsTopo (mode),
myModeApprox (modeapprox),
myContIsOpti (optimized),
myUnitFactor (1.0),
mySurfaceCurve(0),
myContinuity (0),
myUVResolution(0.0),
myIsResolCom (Standard_False),
myTP (new Transfer_TransientProcess())
{
myEps = eps;
myEpsCoeff = epsCoeff;
myEpsGeom = epsGeom;
myModeIsTopo = mode;
myModeApprox = modeapprox;
myContIsOpti = optimized;
myUnitFactor = 1.;
mySurfaceCurve = 0;
myContinuity = 0;
myTP = new Transfer_TransientProcess();
myIsResolCom = Standard_False;
myUVResolution = 0.;
UpdateMinMaxTol();
}

View File

@ -63,36 +63,40 @@ static Standard_Boolean isName (const char * aString,
//purpose : Constructor (file descriptor)
//=======================================================================
LDOM_XmlReader::LDOM_XmlReader (const int aFileDes,
const Handle(LDOM_MemManager)& aDocument,
TCollection_AsciiString& anErrorString)
: myEOF (Standard_False),
myFileDes (aFileDes),
myIStream (cin), // just a placeholder, myIStream will never be used anyway
myError (anErrorString),
myDocument (aDocument),
myElement (NULL),
myPtr (&myBuffer[0]),
myEndPtr (&myBuffer[0])
{}
LDOM_XmlReader::LDOM_XmlReader (const int theFileDes,
const Handle(LDOM_MemManager)& theDocument,
TCollection_AsciiString& theErrorString)
: myEOF (Standard_False),
myFileDes (theFileDes),
myIStream (cin), // just a placeholder, myIStream will never be used anyway
myError (theErrorString),
myDocument (theDocument),
myElement (NULL),
myLastChild(NULL),
myPtr (&myBuffer[0]),
myEndPtr (&myBuffer[0])
{
}
//=======================================================================
//function : LDOM_XmlReader()
//purpose : Constructor (istream)
//=======================================================================
LDOM_XmlReader::LDOM_XmlReader (istream& anInput,
const Handle(LDOM_MemManager)& aDocument,
TCollection_AsciiString& anErrorString)
: myEOF (Standard_False),
myFileDes (FILE_NONVALUE),
myIStream (anInput),
myError (anErrorString),
myDocument (aDocument),
myElement (NULL),
myPtr (&myBuffer[0]),
myEndPtr (&myBuffer[0])
{}
LDOM_XmlReader::LDOM_XmlReader (istream& theInput,
const Handle(LDOM_MemManager)& theDocument,
TCollection_AsciiString& theErrorString)
: myEOF (Standard_False),
myFileDes (FILE_NONVALUE),
myIStream (theInput),
myError (theErrorString),
myDocument (theDocument),
myElement (NULL),
myLastChild(NULL),
myPtr (&myBuffer[0]),
myEndPtr (&myBuffer[0])
{
}
//=======================================================================
//function : ReadRecord

View File

@ -31,7 +31,7 @@ public:
public:
//! The only constructor
NCollection_ListNode (NCollection_ListNode* theNext)
{ myNext = theNext; }
: myNext(theNext) {}
//! Next pointer access
NCollection_ListNode*& Next (void)

View File

@ -496,6 +496,10 @@ static Standard_Boolean InitialPoint(const gp_Pnt& Point,
//=======================================================================
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve()
: myNbCurves(0),
myTolU (0.0),
myTolV (0.0),
myMaxDist (0.0)
{
}
@ -504,15 +508,19 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve()
//purpose :
//=======================================================================
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve(
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_HCurve)& C,
const Standard_Real TolU,
const Standard_Real TolV)
: mySurface(S), myCurve(C), myNbCurves(0), myTolU(TolU), myTolV(TolV),
myMaxDist(-1)
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve
(const Handle(Adaptor3d_HSurface)& theSurface,
const Handle(Adaptor3d_HCurve)& theCurve,
const Standard_Real theTolU,
const Standard_Real theTolV)
: mySurface (theSurface),
myCurve (theCurve),
myNbCurves(0),
mySequence(new ProjLib_HSequenceOfHSequenceOfPnt()),
myTolU (theTolU),
myTolV (theTolV),
myMaxDist (-1.0)
{
mySequence = new ProjLib_HSequenceOfHSequenceOfPnt();
Init();
}
@ -521,16 +529,20 @@ ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve(
//purpose :
//=======================================================================
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve(
const Handle(Adaptor3d_HSurface)& S,
const Handle(Adaptor3d_HCurve)& C,
const Standard_Real TolU,
const Standard_Real TolV,
const Standard_Real MaxDist)
: mySurface(S), myCurve(C), myNbCurves(0), myTolU(TolU), myTolV(TolV),
myMaxDist(MaxDist)
ProjLib_CompProjectedCurve::ProjLib_CompProjectedCurve
(const Handle(Adaptor3d_HSurface)& theSurface,
const Handle(Adaptor3d_HCurve)& theCurve,
const Standard_Real theTolU,
const Standard_Real theTolV,
const Standard_Real theMaxDist)
: mySurface (theSurface),
myCurve (theCurve),
myNbCurves(0),
mySequence(new ProjLib_HSequenceOfHSequenceOfPnt()),
myTolU (theTolU),
myTolV (theTolV),
myMaxDist (theMaxDist)
{
mySequence = new ProjLib_HSequenceOfHSequenceOfPnt();
Init();
}

View File

@ -350,7 +350,11 @@ class ProjLib_PolarFunction : public AppCont_Function
//purpose :
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface(){}
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface()
: myProjIsDone(Standard_False),
myTolerance (-1.0)
{
}
//=======================================================================
@ -359,15 +363,14 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface(){}
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
(const Handle(Adaptor2d_HCurve2d)& InitialCurve2d,
const Handle(Adaptor3d_HCurve)& Curve,
const Handle(Adaptor3d_HSurface)& S,
const Standard_Real tol3d):myProjIsDone(Standard_False) //OCC217
//const Standard_Real tolerance):myProjIsDone(Standard_False)
(const Handle(Adaptor2d_HCurve2d)& theInitialCurve2d,
const Handle(Adaptor3d_HCurve)& theCurve,
const Handle(Adaptor3d_HSurface)& theSurface,
const Standard_Real theTolerance3D)
: myProjIsDone(Standard_False),
myTolerance (theTolerance3D)
{
myTolerance = tol3d; //OCC217
//myTolerance = Max(Tolerance,Precision::PApproximation());
myBSpline = Perform(InitialCurve2d,Curve,S);
myBSpline = Perform(theInitialCurve2d, theCurve, theSurface);
}
//=======================================================================
//function : ProjLib_ComputeApproxOnPolarSurface
@ -375,21 +378,23 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
(const Handle(Adaptor2d_HCurve2d)& InitialCurve2d,
const Handle(Adaptor2d_HCurve2d)& InitialCurve2dBis,
const Handle(Adaptor3d_HCurve)& Curve,
const Handle(Adaptor3d_HSurface)& S,
const Standard_Real tol3d):myProjIsDone(Standard_False) //OCC217
//const Standard_Real tolerance):myProjIsDone(Standard_False)
{// InitialCurve2d and InitialCurve2dBis are two pcurves of the sewing
myTolerance = tol3d; //OCC217
//myTolerance = Max(tolerance,Precision::PApproximation());
Handle(Geom2d_BSplineCurve) bsc = Perform(InitialCurve2d,Curve,S);
(const Handle(Adaptor2d_HCurve2d)& theInitialCurve2d,
const Handle(Adaptor2d_HCurve2d)& theInitialCurve2dBis,
const Handle(Adaptor3d_HCurve)& theCurve,
const Handle(Adaptor3d_HSurface)& theSurface,
const Standard_Real theTolerance3D)
: myProjIsDone(Standard_False),
myTolerance (theTolerance3D)
{
// InitialCurve2d and InitialCurve2dBis are two pcurves of the sewing
Handle(Geom2d_BSplineCurve) bsc =
Perform(theInitialCurve2d, theCurve, theSurface);
if(myProjIsDone) {
gp_Pnt2d P2dproj, P2d, P2dBis;
P2dproj = bsc->StartPoint();
P2d = InitialCurve2d->Value(InitialCurve2d->FirstParameter());
P2dBis = InitialCurve2dBis->Value(InitialCurve2dBis->FirstParameter());
P2d = theInitialCurve2d->Value(theInitialCurve2d->FirstParameter());
P2dBis = theInitialCurve2dBis->Value(theInitialCurve2dBis->FirstParameter());
Standard_Real Dist, DistBis;
Dist = P2dproj.Distance(P2d);
@ -414,17 +419,21 @@ ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
//=======================================================================
ProjLib_ComputeApproxOnPolarSurface::ProjLib_ComputeApproxOnPolarSurface
(const Handle(Adaptor3d_HCurve)& Curve,
const Handle(Adaptor3d_HSurface)& S,
const Standard_Real tol3d):myProjIsDone(Standard_False) //OCC217
//const Standard_Real tolerance):myProjIsDone(Standard_False)
(const Handle(Adaptor3d_HCurve)& theCurve,
const Handle(Adaptor3d_HSurface)& theSurface,
const Standard_Real theTolerance3D)
: myProjIsDone(Standard_False),
myTolerance (theTolerance3D)
{
myTolerance = tol3d; //OCC217
//myTolerance = Max(tolerance,Precision::PApproximation());
const Handle(Adaptor2d_HCurve2d) InitCurve2d ;
myBSpline = Perform(InitCurve2d,Curve,S);
const Handle(Adaptor2d_HCurve2d) anInitCurve2d;
myBSpline = Perform(anInitCurve2d, theCurve, theSurface);
}
//=======================================================================
//function : Concat
//purpose :
//=======================================================================
static Handle(Geom2d_BSplineCurve) Concat(Handle(Geom2d_BSplineCurve) C1,
Handle(Geom2d_BSplineCurve) C2,
Standard_Real theUJump,

View File

@ -23,8 +23,11 @@ struct Select3D_Box2d
Standard_ShortReal xmin, ymin, xmax, ymax;
Select3D_Box2d()
: xmin( ShortRealLast() ),
ymin( ShortRealLast() ),
xmax( ShortRealFirst() ),
ymax( ShortRealFirst() )
{
SetVoid();
}
Select3D_Box2d(const Bnd_Box2d& theBox)

View File

@ -25,11 +25,11 @@ public:
// Constructs internal arrays of 2D and 3D points defined
// by number of points theNbPoints
Select3D_PointData (const Standard_Integer theNbPoints)
: mynbpoints(theNbPoints)
{
if (theNbPoints <= 0)
Standard_ConstructionError::Raise("Select3D_PointData");
mynbpoints = theNbPoints;
mypolyg3d = new Select3D_Pnt[mynbpoints];
mypolyg2d = new Select3D_Pnt2d[mynbpoints];
}

View File

@ -31,7 +31,8 @@
#include <math_NewtonFunctionRoot.hxx>
class MyTrigoFunction: public math_FunctionWithDerivative {
class MyTrigoFunction: public math_FunctionWithDerivative
{
Standard_Real AA;
Standard_Real BB;
Standard_Real CC;
@ -39,22 +40,20 @@ class MyTrigoFunction: public math_FunctionWithDerivative {
Standard_Real EE;
public:
MyTrigoFunction(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D,
const Standard_Real E);
MyTrigoFunction(const Standard_Real A,
const Standard_Real B,
const Standard_Real C,
const Standard_Real D,
const Standard_Real E)
: AA(A), BB(B), CC(C), DD(D), EE(E)
{
}
Standard_Boolean Value(const Standard_Real X, Standard_Real& F);
Standard_Boolean Derivative(const Standard_Real X, Standard_Real& D);
Standard_Boolean Values(const Standard_Real X, Standard_Real& F, Standard_Real& D);
};
MyTrigoFunction::MyTrigoFunction(const Standard_Real A, const Standard_Real B, const Standard_Real C,
const Standard_Real D, const Standard_Real E) {
AA = A;
BB = B;
CC = C;
DD = D;
EE = E;
}
Standard_Boolean MyTrigoFunction::Value(const Standard_Real X, Standard_Real& F) {
Standard_Real CN= cos(X), SN = sin(X);
//-- F= AA*CN*CN+2*BB*CN*SN+CC*CN+DD*SN+EE;
@ -86,37 +85,52 @@ class MyTrigoFunction: public math_FunctionWithDerivative {
}
math_TrigonometricFunctionRoots::math_TrigonometricFunctionRoots(const Standard_Real D,
const Standard_Real E,
const Standard_Real InfBound,
const Standard_Real SupBound): Sol(1, 4) {
Standard_Real A = 0.0, B = 0.0, C = 0.0;
Perform(A, B, C, D, E, InfBound, SupBound);
math_TrigonometricFunctionRoots::math_TrigonometricFunctionRoots
(const Standard_Real theD,
const Standard_Real theE,
const Standard_Real theInfBound,
const Standard_Real theSupBound)
: NbSol (-1),
Sol (1, 4),
InfiniteStatus(Standard_False),
Done (Standard_False)
{
const Standard_Real A(0.0), B(0.0), C(0.0);
Perform(A, B, C, theD, theE, theInfBound, theSupBound);
}
math_TrigonometricFunctionRoots::math_TrigonometricFunctionRoots(const Standard_Real C,
const Standard_Real D,
const Standard_Real E,
const Standard_Real InfBound,
const Standard_Real SupBound): Sol(1, 4) {
Standard_Real A =0.0, B = 0.0;
Perform(A, B, C, D, E, InfBound, SupBound);
math_TrigonometricFunctionRoots::math_TrigonometricFunctionRoots
(const Standard_Real theC,
const Standard_Real theD,
const Standard_Real theE,
const Standard_Real theInfBound,
const Standard_Real theSupBound)
: NbSol (-1),
Sol (1, 4),
InfiniteStatus(Standard_False),
Done (Standard_False)
{
const Standard_Real A(0.0), B(0.0);
Perform(A, B, theC, theD, theE, theInfBound, theSupBound);
}
math_TrigonometricFunctionRoots::math_TrigonometricFunctionRoots(const Standard_Real A,
const Standard_Real B,
const Standard_Real C,
const Standard_Real D,
const Standard_Real E,
const Standard_Real InfBound,
const Standard_Real SupBound): Sol(1, 4) {
Perform(A, B, C, D, E, InfBound, SupBound);
math_TrigonometricFunctionRoots::math_TrigonometricFunctionRoots
(const Standard_Real theA,
const Standard_Real theB,
const Standard_Real theC,
const Standard_Real theD,
const Standard_Real theE,
const Standard_Real theInfBound,
const Standard_Real theSupBound)
: NbSol (-1),
Sol (1, 4),
InfiniteStatus(Standard_False),
Done (Standard_False)
{
Perform(theA, theB, theC, theD, theE, theInfBound, theSupBound);
}
void math_TrigonometricFunctionRoots::Perform(const Standard_Real A,