return aFeature;
}
+std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setFillet(
+ const std::list<ModelHighAPI_RefAttr> & thePoints,
+ const ModelHighAPI_Double & theRadius)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ compositeFeature()->addFeature(SketchPlugin_ConstraintFillet::ID());
+ fillAttribute(thePoints, aFeature->data()->refattrlist(SketchPlugin_Constraint::ENTITY_A()));
+ fillAttribute(theRadius, aFeature->real(SketchPlugin_Constraint::VALUE()));
+ aFeature->execute();
+ return aFeature;
+}
+
+std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setHorizontal(
+ const ModelHighAPI_RefAttr & theLine)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ compositeFeature()->addFeature(SketchPlugin_ConstraintHorizontal::ID());
+ fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
+ aFeature->execute();
+ return aFeature;
+}
+
std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setLength(
const ModelHighAPI_RefAttr & theLine,
const ModelHighAPI_Double & theValue)
aFeature->execute();
return aFeature;
}
+
+std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setRigid(
+ const ModelHighAPI_RefAttr & theObject)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ compositeFeature()->addFeature(SketchPlugin_ConstraintRigid::ID());
+ fillAttribute(theObject, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
+ aFeature->execute();
+ return aFeature;
+}
+
+std::shared_ptr<ModelAPI_Feature> SketchAPI_Sketch::setVertical(
+ const ModelHighAPI_RefAttr & theLine)
+{
+ std::shared_ptr<ModelAPI_Feature> aFeature =
+ compositeFeature()->addFeature(SketchPlugin_ConstraintVertical::ID());
+ fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
+ aFeature->execute();
+ return aFeature;
+}
+
//--------------------------------------------------------------------------------------
const ModelHighAPI_RefAttr & theLine,
const ModelHighAPI_Double & theValue);
+ /// Set fillet
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelAPI_Feature> setFillet(
+ const std::list<ModelHighAPI_RefAttr> & thePoints,
+ const ModelHighAPI_Double & theRadius);
+
+ /// Set horizontal
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelAPI_Feature> setHorizontal(
+ const ModelHighAPI_RefAttr & theLine);
+
/// Set length
SKETCHAPI_EXPORT
std::shared_ptr<ModelAPI_Feature> setLength(
const ModelHighAPI_RefAttr & theLine1,
const ModelHighAPI_RefAttr & theLine2);
+ /// Set rigid
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelAPI_Feature> setRigid(
+ const ModelHighAPI_RefAttr & theObject);
+
+ /// Set vertical
+ SKETCHAPI_EXPORT
+ std::shared_ptr<ModelAPI_Feature> setVertical(
+ const ModelHighAPI_RefAttr & theLine);
+
// TODO(spo): set* (constraints)
// TODO(spo): addMirror