0027491: GeomAdaptor_Curve Is Not Thread-Safe (Anymore?)
[occt.git] / src / Geom2dAdaptor / Geom2dAdaptor_Curve.hxx
index 89b51cd..1bf3d2a 100644 (file)
@@ -51,6 +51,10 @@ class Geom2d_BSplineCurve;
 //! An interface between the services provided by any
 //! curve from the package Geom2d and those required
 //! of the curve by algorithms which use it.
+//!
+//! Polynomial coefficients of BSpline curves used for their evaluation are
+//! cached for better performance. Therefore these evaluations are not
+//! thread-safe and parallel evaluations need to be prevented.
 class Geom2dAdaptor_Curve  : public Adaptor2d_Curve2d
 {
 public:
@@ -192,6 +196,8 @@ private:
   GeomAbs_CurveType myTypeCurve;
   Standard_Real myFirst;
   Standard_Real myLast;
+
+  Handle(Geom2d_BSplineCurve) myBSplineCurve; ///< B-spline representation to prevent castings
   Handle(BSplCLib_Cache) myCurveCache; ///< Cached data for B-spline or Bezier curve
   Handle(Geom2dEvaluator_Curve) myNestedEvaluator; ///< Calculates value of offset curve