mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-06 18:26:22 +03:00
0027718: Class GeomPlate_CurveConstraint contains two same constructors
Two constructors have been combined to one.
This commit is contained in:
parent
a85215df86
commit
990ab183dd
@ -54,67 +54,53 @@ myLProp(2,1.e-4)
|
|||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// Constructeurs avec courbe sur surface
|
// Constructeurs avec courbe sur surface
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint (const Handle(Adaptor3d_HCurveOnSurface)& Boundary,
|
GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint (const Handle(Adaptor3d_HCurve)& Boundary,
|
||||||
const Standard_Integer Tang,
|
const Standard_Integer Tang,
|
||||||
const Standard_Integer NPt,
|
const Standard_Integer NPt,
|
||||||
const Standard_Real TolDist,
|
const Standard_Real TolDist,
|
||||||
const Standard_Real TolAng,
|
const Standard_Real TolAng,
|
||||||
const Standard_Real TolCurv
|
const Standard_Real TolCurv
|
||||||
) :
|
) :
|
||||||
myFrontiere(Boundary),
|
|
||||||
myLProp(2,TolDist),
|
myLProp(2,TolDist),
|
||||||
myTolDist(TolDist),
|
myTolDist(TolDist),
|
||||||
myTolAng(TolAng),
|
myTolAng(TolAng),
|
||||||
myTolCurv(TolCurv)
|
myTolCurv(TolCurv)
|
||||||
{ myOrder=Tang;
|
{
|
||||||
|
myOrder=Tang;
|
||||||
if ((Tang<-1)||(Tang>2))
|
if ((Tang<-1)||(Tang>2))
|
||||||
Standard_Failure::Raise("GeomPlate : The continuity is not G0 G1 or G2");
|
Standard_Failure::Raise("GeomPlate : The continuity is not G0 G1 or G2");
|
||||||
myNbPoints=NPt;
|
myNbPoints=NPt;
|
||||||
myConstG0=Standard_True;
|
myConstG0=Standard_True;
|
||||||
myConstG1=Standard_True;
|
myConstG1=Standard_True;
|
||||||
myConstG2=Standard_True;
|
myConstG2=Standard_True;
|
||||||
if (myFrontiere.IsNull())
|
|
||||||
Standard_Failure::Raise("GeomPlate_CurveConstraint : Curve must be on a Surface");
|
|
||||||
Handle(Geom_Surface) Surf;
|
|
||||||
Handle(GeomAdaptor_HSurface) GS1;
|
|
||||||
GS1 = Handle(GeomAdaptor_HSurface)::DownCast(myFrontiere->ChangeCurve().GetSurface());
|
|
||||||
if (!GS1.IsNull()) {
|
|
||||||
Surf=GS1->ChangeSurface().Surface();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
// Handle(BRepAdaptor_HSurface) BS1;
|
|
||||||
// BS1=Handle(BRepAdaptor_HSurface)::DownCast(myFrontiere->ChangeCurve().GetSurface());
|
|
||||||
// Surf = BRep_Tool::Surface(BS1->ChangeSurface().Face());
|
|
||||||
Standard_Failure::Raise("GeomPlate_CurveConstraint : Surface must be GeomAdaptor_Surface");
|
|
||||||
}
|
|
||||||
myLProp.SetSurface(Surf);
|
|
||||||
my2dCurve.Nullify();
|
|
||||||
myHCurve2d.Nullify();
|
|
||||||
myTolU=0.;
|
|
||||||
myTolV=0.;
|
|
||||||
myG0Crit.Nullify();
|
|
||||||
myG1Crit.Nullify();
|
|
||||||
myG2Crit.Nullify();
|
|
||||||
|
|
||||||
}
|
myFrontiere = Handle(Adaptor3d_HCurveOnSurface)::DownCast(Boundary);
|
||||||
|
|
||||||
|
if (myFrontiere.IsNull())
|
||||||
|
{
|
||||||
|
my3dCurve = Boundary;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Handle(Geom_Surface) Surf;
|
||||||
|
Handle(GeomAdaptor_HSurface) GS1 = Handle(GeomAdaptor_HSurface)::
|
||||||
|
DownCast(myFrontiere->ChangeCurve().GetSurface());
|
||||||
|
|
||||||
|
if (!GS1.IsNull()) {
|
||||||
|
Surf=GS1->ChangeSurface().Surface();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Handle(BRepAdaptor_HSurface) BS1;
|
||||||
|
// BS1=Handle(BRepAdaptor_HSurface)::DownCast(myFrontiere->
|
||||||
|
// ChangeCurve().GetSurface());
|
||||||
|
// Surf = BRep_Tool::Surface(BS1->ChangeSurface().Face());
|
||||||
|
Standard_Failure::Raise(
|
||||||
|
"GeomPlate_CurveConstraint : Surface must be GeomAdaptor_Surface");
|
||||||
|
}
|
||||||
|
|
||||||
|
myLProp.SetSurface(Surf);
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
|
||||||
// Constructeurs avec courbe 3d (pour continuite G0 G-1)
|
|
||||||
//---------------------------------------------------------
|
|
||||||
GeomPlate_CurveConstraint :: GeomPlate_CurveConstraint (const Handle(Adaptor3d_HCurve)& Boundary,
|
|
||||||
const Standard_Integer Tang,
|
|
||||||
const Standard_Integer NPt,
|
|
||||||
const Standard_Real TolDist) :
|
|
||||||
my3dCurve(Boundary),
|
|
||||||
myLProp(2,TolDist),
|
|
||||||
myTolDist(TolDist)
|
|
||||||
{ myOrder=Tang;
|
|
||||||
if ((Tang!=-1)&&(Tang!=0))
|
|
||||||
Standard_Failure::Raise("GeomPlate : The continuity is not G0 or G-1");
|
|
||||||
myNbPoints=NPt;
|
|
||||||
myConstG0=Standard_True;
|
|
||||||
myConstG1=Standard_True;
|
|
||||||
myConstG2=Standard_True;
|
|
||||||
my2dCurve.Nullify();
|
my2dCurve.Nullify();
|
||||||
myHCurve2d.Nullify();
|
myHCurve2d.Nullify();
|
||||||
myTolU=0.;
|
myTolU=0.;
|
||||||
@ -123,6 +109,7 @@ myTolDist(TolDist)
|
|||||||
myG1Crit.Nullify();
|
myG1Crit.Nullify();
|
||||||
myG2Crit.Nullify();
|
myG2Crit.Nullify();
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// Fonction : FirstParameter
|
// Fonction : FirstParameter
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
@ -60,16 +60,7 @@ public:
|
|||||||
//! TolCurv is the maximum error to satisfy for G2 constraints
|
//! TolCurv is the maximum error to satisfy for G2 constraints
|
||||||
//! These errors can be replaced by laws of criterion.
|
//! These errors can be replaced by laws of criterion.
|
||||||
//! Raises ConstructionError if Order is not -1 , 0, 1, 2
|
//! Raises ConstructionError if Order is not -1 , 0, 1, 2
|
||||||
Standard_EXPORT GeomPlate_CurveConstraint(const Handle(Adaptor3d_HCurveOnSurface)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1);
|
Standard_EXPORT GeomPlate_CurveConstraint(const Handle(Adaptor3d_HCurve)& Boundary, const Standard_Integer Order, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001, const Standard_Real TolAng = 0.01, const Standard_Real TolCurv = 0.1);
|
||||||
|
|
||||||
//! Create a constraint
|
|
||||||
//! Order is the order of the constraint. The possible values for order are -1,0.
|
|
||||||
//! Order i means constraints Gi
|
|
||||||
//! Npt is the number of points associated with the constraint.
|
|
||||||
//! TolDist is the maximum error to satisfy for G0 constraints
|
|
||||||
//! These errors can be replaced by laws of criterion.
|
|
||||||
//! Raises ConstructionError if Order is not 0 or -1
|
|
||||||
Standard_EXPORT GeomPlate_CurveConstraint(const Handle(Adaptor3d_HCurve)& Boundary, const Standard_Integer Tang, const Standard_Integer NPt = 10, const Standard_Real TolDist = 0.0001);
|
|
||||||
|
|
||||||
//! Allows you to set the order of continuity required for
|
//! Allows you to set the order of continuity required for
|
||||||
//! the constraints: G0, G1, and G2, controlled
|
//! the constraints: G0, G1, and G2, controlled
|
||||||
|
Loading…
x
Reference in New Issue
Block a user