}
}
-// returns the center of the edge: circular or elliptical
+// returns the center of the edge: circular or elliptic
GeomShapePtr centerByEdge(GeomShapePtr theEdge, ModelAPI_AttributeSelection::CenterType theType)
{
if (theType != ModelAPI_AttributeSelection::NOT_CENTER && theEdge.get() != NULL) {
const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
const bool theTemporarily = false);
- /// Same as SetValue, but it takes an edge (on circular or elliptical curve)
+ /// Same as SetValue, but it takes an edge (on circular or elliptic curve)
/// and stores the vertex of the central point (for ellipse the first or the second focus point)
MODEL_EXPORT virtual void setValueCenter(
const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Edge>& theEdge,
class ModelAPI_AttributeSelection : public ModelAPI_Attribute
{
public:
- /// Type of the center of the circular of elliptical edge
+ /// Type of the center of the circular of elliptic edge
enum CenterType {
NOT_CENTER, ///< this is not a center
CIRCLE_CENTER, ///< center of the circle
const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
const bool theTemporarily = false) = 0;
- /// Same as SetValue, but it takes an edge (on circular or elliptical curve)
+ /// Same as SetValue, but it takes an edge (on circular or elliptic curve)
/// and stores the vertex of the central point (for ellipse the first or the second focus point)
virtual void setValueCenter(
const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Edge>& theEdge,
return aFoundSubs;
}
- // Find circular/elliptical edge, which center/focus coincide with the given point
+ // Find circular/elliptic edge, which center/focus coincide with the given point
static GeomShapePtr findEdgeByCenter(const GeomShapePtr& theBaseShape,
const GeomPointPtr& theCenter,
const double theTolerance,
/**\class SketchPlugin_EllipticArc
* \ingroup Plugins
- * \brief Feature for creation of the new elliptical arc in Sketch.
+ * \brief Feature for creation of the new elliptic arc in Sketch.
*/
class SketchPlugin_EllipticArc: public SketchPlugin_SketchEntity
{
/**\class SketchPlugin_MacroEllipticArc
* \ingroup Plugins
- * \brief Feature for creation of the new elliptical arc in Sketch.
+ * \brief Feature for creation of the new elliptic arc in Sketch.
*/
class SketchPlugin_MacroEllipticArc: public SketchPlugin_SketchEntity,
public GeomAPI_IPresentable,
public ModelAPI_IReentrant
{
public:
- /// Elliptical arc feature kind
+ /// Elliptic arc feature kind
inline static const std::string& ID()
{
static const std::string ID("SketchMacroEllipticArc");
</message>
</context>
+ <context>
+ <name>SketchMacroEllipticArc:Model_FeatureValidator</name>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Select a point.</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:center</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>Select a point.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Select a center point.</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:end_point</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>Select an end point.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Select an end point.</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:major_axis_point</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>Select a major axis point.</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>Select a major axis point.</translation>
+ </message>
+ </context>
+
<context>
<name>SketchSplit:Model_FeatureValidator</name>
<message>
</message>
</context>
+ <context>
+ <name>SketchEllipticArc:Auxiliary</name>
+ <message>
+ <source>Auxiliary</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Construction element</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_center</name>
+ <message>
+ <source>Center</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_first_focus</name>
+ <message>
+ <source>First focus</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_major_axis_end_point</name>
+ <message>
+ <source>Major axis end</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_major_axis_start_point</name>
+ <message>
+ <source>Major axis start</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_major_radius</name>
+ <message>
+ <source>Major radius</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Set major radius</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_minor_axis_end_point</name>
+ <message>
+ <source>Minor axis end</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_minor_axis_start_point</name>
+ <message>
+ <source>Minor axis start</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_minor_radius</name>
+ <message>
+ <source>Minor radius</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Set minor radius</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:ellipse_second_focus</name>
+ <message>
+ <source>Second focus</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:end_point</name>
+ <message>
+ <source>End point</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchEllipticArc:start_point</name>
+ <message>
+ <source>Start point</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc</name>
+ <message>
+ <source>Create elliptic arc</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Elliptic arc</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:Auxiliary</name>
+ <message>
+ <source>Auxiliary</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Construction element</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:Model_FeatureValidator</name>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:center</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Center point</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:end_point</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>End point</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:major_axis_point</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Major axis point</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:major_radius</name>
+ <message>
+ <source>Major radius</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Set major radius</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:major_radius:GeomValidators_Positive</name>
+ <message>
+ <source>Double is not initialized.</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:minor_radius</name>
+ <message>
+ <source>Minor radius</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Set minor radius</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:minor_radius:GeomValidators_Positive</name>
+ <message>
+ <source>Double is not initialized.</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>SketchMacroEllipticArc:start_point</name>
+ <message>
+ <source>Attribute "%1" is locked by modification value in the viewer.</source>
+ <translation>AA</translation>
+ </message>
+ <message>
+ <source>Start point</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+ <context>
+ <name>workshop</name>
+ <message>
+ <source>Elliptic arc</source>
+ <translation>AA</translation>
+ </message>
+ </context>
+
<context>
<name>SketchMultiRotation</name>
<message>
<!-- SketchEllipticArc is a hidden feature. It is created inside SketchMacroEllipse. -->
<feature id="SketchEllipticArc"
- title="Elliptic Arc"
+ title="Elliptic arc"
tooltip="Create elliptic arc"
icon="icons/Sketch/elliptic_arc.png"
internal="1">
<!-- SketchMacroEllipticArc -->
<feature id="SketchMacroEllipticArc"
icon="icons/Sketch/elliptic_arc.png"
- title="Elliptical arc"
- tooltip="Create elliptical arc"
+ title="Elliptic arc"
+ tooltip="Create elliptic arc"
helpfile="ellipseFeature.html">
<sketch-2dpoint_selector id="center"
reference_attribute="center_ref"
ENTITY_CIRCLE,
ENTITY_ARC,
ENTITY_ELLIPSE,
- ENTITY_ELLIPTICAL_ARC
+ ENTITY_ELLIPTIC_ARC
};
/// Types of constraints
else if (isCircle(myEntity))
myType = ENTITY_CIRCLE;
else if (isEllipticArc(myEntity))
- myType = ENTITY_ELLIPTICAL_ARC;
+ myType = ENTITY_ELLIPTIC_ARC;
else if (isEllipse(myEntity))
myType = ENTITY_ELLIPSE;
}
std::shared_ptr<GCS::Ellipse> anEllipse = std::dynamic_pointer_cast<GCS::Ellipse>(myEntity);
return *anEllipse->radmin < tolerance || anEllipse->getRadMaj() > THE_MAX_RADIUS;
}
- else if (myType == ENTITY_ELLIPTICAL_ARC) {
+ else if (myType == ENTITY_ELLIPTIC_ARC) {
std::shared_ptr<GCS::ArcOfEllipse> anArc =
std::dynamic_pointer_cast<GCS::ArcOfEllipse>(myEntity);
double anAngleDiff = fabs(*anArc->startAngle - *anArc->endAngle);
createArcConstraints(theEntity, mySketchSolver, ++myConstraintLastID, myAuxConstraintMap);
else if (theEntity->type() == ENTITY_ELLIPSE)
createEllipseConstraints(theEntity, mySketchSolver, ++myConstraintLastID, myAuxConstraintMap);
- else if (theEntity->type() == ENTITY_ELLIPTICAL_ARC) {
+ else if (theEntity->type() == ENTITY_ELLIPTIC_ARC) {
createEllipticArcConstraints(theEntity, mySketchSolver,
++myConstraintLastID, myAuxConstraintMap);
}
private:
ConstraintID myConstraintLastID; ///< identifier of last added constraint
- /// additional constraints for correct processing of the arcs, ellipses, elliptical arcs
+ /// additional constraints for correct processing of the arcs, ellipses, elliptic arcs
std::map<EntityWrapperPtr, ConstraintWrapperPtr> myAuxConstraintMap;
/// list of removed constraints to notify solver
std::shared_ptr<GeomAPI_Ellipse2d> PlaneGCSSolver_Tools::ellipse(EntityWrapperPtr theEntity)
{
- if (theEntity->type() != ENTITY_ELLIPSE && theEntity->type() != ENTITY_ELLIPTICAL_ARC)
+ if (theEntity->type() != ENTITY_ELLIPSE && theEntity->type() != ENTITY_ELLIPTIC_ARC)
return std::shared_ptr<GeomAPI_Ellipse2d>();
std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
OX.reset(new GeomAPI_Dir2d(1.0, 0.0));
}
- else if (anEdge->type() == ENTITY_ELLIPTICAL_ARC) {
+ else if (anEdge->type() == ENTITY_ELLIPTIC_ARC) {
std::shared_ptr<GCS::ArcOfEllipse> aEllArc =
std::dynamic_pointer_cast<GCS::ArcOfEllipse>(anEdge->entity());
return arcParameters(GCS_EDGE_WRAPPER(theEntity));
case ENTITY_ELLIPSE:
return ellipseParameters(GCS_EDGE_WRAPPER(theEntity));
- case ENTITY_ELLIPTICAL_ARC:
+ case ENTITY_ELLIPTIC_ARC:
return ellipticArcParameters(GCS_EDGE_WRAPPER(theEntity));
default: break;
}
break;
}
case ENTITY_ELLIPSE:
- case ENTITY_ELLIPTICAL_ARC: {
+ case ENTITY_ELLIPTIC_ARC: {
std::shared_ptr<GCS::Ellipse> anEllipse =
std::dynamic_pointer_cast<GCS::Ellipse>(theEntity->entity());
aNewConstr = GCSConstraintPtr(
++aNbArcs;
isArcFirst = (aNbLines == 0);
}
- else if (aType == ENTITY_ELLIPSE || aType == ENTITY_ELLIPTICAL_ARC)
+ else if (aType == ENTITY_ELLIPSE || aType == ENTITY_ELLIPTIC_ARC)
++aNbEllipses;
}
aParameters.push_back(anEllipse->radmin);
break;
}
- case ENTITY_ELLIPTICAL_ARC: {
+ case ENTITY_ELLIPTIC_ARC: {
std::shared_ptr<GCS::ArcOfEllipse> anEllArc =
std::dynamic_pointer_cast<GCS::ArcOfEllipse>(anEntity->entity());
aParameters.push_back(anEllArc->center.x);
// arc or circle has been moved
aConstraint = fixPointOnCircle(anEntity);
}
- else if (anEntity->type() == ENTITY_ELLIPSE || anEntity->type() == ENTITY_ELLIPTICAL_ARC) {
- // ellipse or elliptical arc has been moved
+ else if (anEntity->type() == ENTITY_ELLIPSE || anEntity->type() == ENTITY_ELLIPTIC_ARC) {
+ // ellipse or elliptic arc has been moved
aConstraint = fixPointOnEllipse(anEntity);
}
}
/// \brief Create constraint to fix moved point on circle/arc
ConstraintWrapperPtr fixPointOnCircle(const EntityWrapperPtr& theCircular);
- /// \brief Create constraint to fix moved point on ellipse/elliptical arc
+ /// \brief Create constraint to fix moved point on ellipse/elliptic arc
ConstraintWrapperPtr fixPointOnEllipse(const EntityWrapperPtr& theConic);
private:
++aNbLines;
else if ((*anEntIt)->type() == ENTITY_ARC || (*anEntIt)->type() == ENTITY_CIRCLE)
++aNbCircles;
- else if ((*anEntIt)->type() == ENTITY_ELLIPSE || (*anEntIt)->type() == ENTITY_ELLIPTICAL_ARC)
+ else if ((*anEntIt)->type() == ENTITY_ELLIPSE || (*anEntIt)->type() == ENTITY_ELLIPTIC_ARC)
++aNbEllipses;
}
std::shared_ptr<GeomAPI_Circ2d> aCircle = PlaneGCSSolver_Tools::circle(aCurve2);
anEllipse->distance(aCircle, aP1, aP2);
}
- else if (aCurve2->type() == ENTITY_ELLIPSE || aCurve2->type() == ENTITY_ELLIPTICAL_ARC) {
+ else if (aCurve2->type() == ENTITY_ELLIPSE || aCurve2->type() == ENTITY_ELLIPTIC_ARC) {
std::shared_ptr<GeomAPI_Ellipse2d> anEl2 = PlaneGCSSolver_Tools::ellipse(aCurve2);
anEllipse->distance(anEl2, aP1, aP2);
}