-// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
+// Copyright (C) 2014-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
#include <ModelAPI_Attribute.h>
#include <ModelAPI_AttributeRefAttr.h>
#include <GeomAPI_Shape.h>
+#include <GeomAPI_AISObject.h>
#include <GeomDataAPI_Point2D.h>
+#include <GeomDataAPI_Point2DArray.h>
#include <GeomAlgoAPI_ShapeTools.h>
#include <list>
std::shared_ptr<GeomAPI_Pnt2d> getCoincidencePoint(const FeaturePtr theStartCoin);
/// Find all Coincident constraints referred to the feature or its attribute
-std::set<FeaturePtr> findCoincidentConstraints(const FeaturePtr& theFeature);
+std::set<FeaturePtr> findCoincidentConstraints(const ObjectPtr& theObject);
/// Finds lines coincident at point
/// \param[in] theStartCoin coincidence feature
std::shared_ptr<GeomAPI_Shape>& theTangentCurve,
std::shared_ptr<GeomAPI_Pnt2d>& thePassingPoint);
-
/// Calculate global coordinates for flyout point of Length constraint
GeomPnt2dPtr flyoutPointCoordinates(const std::shared_ptr<SketchPlugin_Constraint>& theConstraint);
+
+/// Sets attributes of feature presentation
+/// \param[in] thePrs a presentation
+/// \param[in] isAxiliary is axiliary flag
+void customizeFeaturePrs(const AISObjectPtr& thePrs, bool isAxiliary);
+
+void setDimensionColor(const AISObjectPtr& theDimPrs);
+
+/// Replace string in the name of object
+void replaceInName(ObjectPtr theObject, const std::wstring& theSource, const std::wstring& theDest);
+
}; // namespace SketchPlugin_Tools
namespace SketchPlugin_SegmentationTools
/// \param theFeaturesToUpdate a constraint index
void updateFeaturesAfterOperation(const std::set<FeaturePtr>& theFeaturesToUpdate);
+
+ /// Creates a line feature filled by center of base feature and given points
+ /// \param theBaseFeature another arc feature
+ /// \param theFirstAttribute an attribute with coordinates for the start point
+ /// \param theSecondAttribute an attribute with coordinates for the end point
+ FeaturePtr createLineFeature(const FeaturePtr& theBaseFeature,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theFirstPoint,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theSecondPoint);
+
+ /// Creates a circular/elliptic arc feature filled by center
+ /// (or by center and focus for elliptic arc) of base feature and given points
+ /// \param theBaseFeature another circle or ellipse or circular/elliptic arc
+ /// \param theFirstAttribute an attribute with coordinates for the start point
+ /// \param theSecondAttribute an attribute with coordinates for the end point
+ FeaturePtr createArcFeature(
+ const FeaturePtr& theBaseFeature,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theFirstPoint,
+ const std::shared_ptr<GeomAPI_Pnt2d>& theSecondPoint);
+
}; // namespace SketchPlugin_SegmentationTools
#endif // SKETCHPLUGIN_TOOLS_H_
\ No newline at end of file