Salome HOME
[bos #33687] EDF 26791 - Points cloud on face
[modules/geom.git] / src / CurveCreator / CurveCreator_Utils.hxx
index 20ded32d5c7c064b80d4a4a8bd0942e3dd072267..b0e29b555003a6ebe39be3fb3ae7d7018acdc1f0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include <TopoDS_Wire.hxx>
 #include <TColgp_HArray1OfPnt.hxx>
 #include <Geom_BSplineCurve.hxx>
+#include <QColor>
 
 #include <list>
 #include <vector> // TODO: remove
+#include <NCollection_IndexedDataMap.hxx>
 
 class CurveCreator_Curve;
 
@@ -55,6 +57,21 @@ public:
                                                        Handle(V3d_View) theView,
                                                        int& x, int& y );
 
+  /**
+  * Generates a random color
+  */
+  CURVECREATOR_EXPORT static Quantity_Color getRandColor();
+
+  /**
+  * Convert QColor to Quantity_Color
+  */
+  CURVECREATOR_EXPORT static Quantity_Color colorConv(QColor color);
+
+  /**
+  * Convert Quantity_Color to QColor
+  */
+  CURVECREATOR_EXPORT static QColor colorConv(Quantity_Color color);
+
   /*!
    * \brief Returns the point clicked in 3D view.
    *
@@ -70,9 +87,11 @@ public:
    * Generates shape on the curve
    * \param theCurve a curve object, that contains data
    * \param theShape a generated shape
+   * \param Sect2Shape optional out map: section to constructed shape (wire+vertices)
    */
   CURVECREATOR_EXPORT static void constructShape( const CurveCreator_ICurve* theCurve,
-                                                  TopoDS_Shape& theShape );
+                                                  TopoDS_Shape& theShape,
+                                                  NCollection_IndexedDataMap<int, TopoDS_Shape>* Sect2Shape = NULL);
 
   /**
    * Generates a curve from a shape.