Salome HOME
Merge commit 'f709219506b7cd587e94abc5ebed18d629df92d8'
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Offset.h
index 3a809f302fb0be8b487ca6d79880b03c6327045f..8f21441f8e293ea63783d859ef824b5c83a5d27e 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2020  CEA/DEN, EDF R&D
+// Copyright (C) 2020-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -28,6 +28,8 @@
 #include <GeomAPI_Edge.h>
 
 class GeomAlgoAPI_MakeShape;
+class GeomAlgoAPI_Offset;
+class GeomAlgoAPI_WireBuilder;
 
 /**\class SketchPlugin_Offset
  * \ingroup Plugins
@@ -50,6 +52,34 @@ public:
     return MY_KIND;
   }
 
+  /// Type of joint
+  inline static const std::string& JOINT_ID()
+  {
+    static const std::string ID("offset_joint");
+    return ID;
+  }
+
+  /// Keep distance joint (add arcs where needed)
+  inline static const std::string& JOINT_KEEP_DISTANCE()
+  {
+    static const std::string ID("KeepDistance");
+    return ID;
+  }
+
+  /// Arcs joint (make fillets on all straight lines intersections)
+  inline static const std::string& JOINT_ARCS()
+  {
+    static const std::string ID("Arcs");
+    return ID;
+  }
+
+  /// Lines joint (do not add new arcs, prolongate and intersect adjacent lines)
+  inline static const std::string& JOINT_LINES()
+  {
+    static const std::string ID("Lines");
+    return ID;
+  }
+
   /// list of offset edges
   inline static const std::string& EDGES_ID()
   {
@@ -71,6 +101,13 @@ public:
     return ID;
   }
 
+  /// attribute to approx by segments and arcs
+  inline static const std::string& APPROX_ID()
+  {
+    static const std::string ID("approx");
+    return ID;
+  }
+
   /// name for add wire action
   inline static const std::string& ADD_WIRE_ACTION_ID()
   {
@@ -140,6 +177,11 @@ private:
                        std::set<FeaturePtr>& theProcessedEdgesSet,
                        std::list<FeaturePtr>& theChain,
                        const bool isPrepend = false);
+
+  void makeFillet (const double theValue,
+                   const std::shared_ptr<GeomAlgoAPI_WireBuilder>&,
+                   const std::shared_ptr<GeomAlgoAPI_Offset>&,
+                   std::list< std::shared_ptr<GeomAlgoAPI_MakeShape> >& theOffsetAlgos);
 };
 
 #endif