//--------------------------------------------------------------------------------------
std::shared_ptr<SketchAPI_IntersectionPoint> SketchAPI_Sketch::addIntersectionPoint(
- const ModelHighAPI_Selection & theExternal)
+ const ModelHighAPI_Selection & theExternal,
+ bool theKeepResult)
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
- return IntersectionPointPtr(new SketchAPI_IntersectionPoint(aFeature, theExternal));
+ IntersectionPointPtr anIntersection(new SketchAPI_IntersectionPoint(aFeature, theExternal));
+ anIntersection->setIncludeToResult(theKeepResult);
+ return anIntersection;
}
std::shared_ptr<SketchAPI_IntersectionPoint> SketchAPI_Sketch::addIntersectionPoint(
- const std::string & theExternalName)
+ const std::string & theExternalName,
+ bool theKeepResult)
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_IntersectionPoint::ID());
- return IntersectionPointPtr(new SketchAPI_IntersectionPoint(aFeature, theExternalName));
+ IntersectionPointPtr anIntersection(new SketchAPI_IntersectionPoint(aFeature, theExternalName));
+ anIntersection->setIncludeToResult(theKeepResult);
+ return anIntersection;
}
//--------------------------------------------------------------------------------------
const ModelHighAPI_RefAttr & theCenter,
const ModelHighAPI_Double & theAngle,
const ModelHighAPI_Integer & theNumberOfObjects,
- bool theFullValue)
+ bool theFullValue,
+ bool theReversed)
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_MultiRotation::ID());
return RotationPtr(
new SketchAPI_Rotation(aFeature, theObjects, theCenter,
- theAngle, theNumberOfObjects, theFullValue));
+ theAngle, theNumberOfObjects, theFullValue, theReversed));
}
//--------------------------------------------------------------------------------------
compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID());
fillAttribute(SketcherPrs_Tools::ANGLE_DIRECT,
aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID()));
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID()));
// fill the value before llines to avoid calculation of angle value by the Angle feature
fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID());
fillAttribute(SketcherPrs_Tools::ANGLE_COMPLEMENTARY,
aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID()));
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID()));
fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
compositeFeature()->addFeature(SketchPlugin_ConstraintAngle::ID());
fillAttribute(SketcherPrs_Tools::ANGLE_BACKWARD,
aFeature->integer(SketchPlugin_ConstraintAngle::TYPE_ID()));
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID()));
fillAttribute(theValue, aFeature->real(SketchPlugin_ConstraintAngle::ANGLE_VALUE_ID()));
fillAttribute(theLine1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(theLine2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_ConstraintDistance::ID());
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintDistance::LOCATION_TYPE_ID()));
fillAttribute(thePoint, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(thePointOrLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_ConstraintDistanceHorizontal::ID());
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintDistanceHorizontal::LOCATION_TYPE_ID()));
fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(thePoint2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
- fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
+ fillAttribute(theValue,
+ aFeature->real(SketchPlugin_ConstraintDistanceAlongDir::DISTANCE_VALUE_ID()));
aFeature->execute();
return InterfacePtr(new ModelHighAPI_Interface(aFeature));
}
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_ConstraintDistanceVertical::ID());
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintDistanceVertical::LOCATION_TYPE_ID()));
fillAttribute(thePoint1, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(thePoint2, aFeature->refattr(SketchPlugin_Constraint::ENTITY_B()));
- fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
+ fillAttribute(theValue,
+ aFeature->real(SketchPlugin_ConstraintDistanceAlongDir::DISTANCE_VALUE_ID()));
aFeature->execute();
return InterfacePtr(new ModelHighAPI_Interface(aFeature));
}
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_ConstraintLength::ID());
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintLength::LOCATION_TYPE_ID()));
fillAttribute(theLine, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
aFeature->execute();
{
std::shared_ptr<ModelAPI_Feature> aFeature =
compositeFeature()->addFeature(SketchPlugin_ConstraintRadius::ID());
- fillAttribute(SketcherPrs_Tools::LOCATION_AUTOMATIC,
- aFeature->integer(SketchPlugin_ConstraintRadius::LOCATION_TYPE_ID()));
fillAttribute(theCircleOrArc, aFeature->refattr(SketchPlugin_Constraint::ENTITY_A()));
fillAttribute(theValue, aFeature->real(SketchPlugin_Constraint::VALUE()));
aFeature->execute();