mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032485: Modeling Algorithms - Add Clone() function for adapters
Provide ShallowCopy() functions for adapters & evaluators of curves, 2d curves and surfaces. This will allow using copies of the same adapter in multi-thread calculations.
This commit is contained in:
@@ -29,6 +29,18 @@ GeomFill_SnglrFunc::GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC) :
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ShallowCopy
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(Adaptor3d_Curve) GeomFill_SnglrFunc::ShallowCopy() const
|
||||
{
|
||||
Handle(GeomFill_SnglrFunc) aCopy = new GeomFill_SnglrFunc(myHCurve->ShallowCopy());
|
||||
aCopy->ratio = ratio;
|
||||
return aCopy;
|
||||
}
|
||||
|
||||
void GeomFill_SnglrFunc::SetRatio(const Standard_Real Ratio)
|
||||
{
|
||||
ratio = Ratio;
|
||||
|
@@ -44,6 +44,9 @@ public:
|
||||
|
||||
|
||||
Standard_EXPORT GeomFill_SnglrFunc(const Handle(Adaptor3d_Curve)& HC);
|
||||
|
||||
//! Shallow copy of adaptor
|
||||
Standard_EXPORT virtual Handle(Adaptor3d_Curve) ShallowCopy() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT void SetRatio (const Standard_Real Ratio);
|
||||
|
||||
|
Reference in New Issue
Block a user