From: mpv Date: Tue, 24 Sep 2019 13:58:32 +0000 (+0300) Subject: Improve translation for Elliptic Arcs X-Git-Tag: V9_4_0a2~4^2~66 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f1d9eaf541b43d0569e6fa00edb1ab2ee74aca0d;p=modules%2Fshaper.git Improve translation for Elliptic Arcs --- diff --git a/src/Model/Model_AttributeSelection.cpp b/src/Model/Model_AttributeSelection.cpp index 50f548009..41df2868a 100644 --- a/src/Model/Model_AttributeSelection.cpp +++ b/src/Model/Model_AttributeSelection.cpp @@ -260,7 +260,7 @@ void Model_AttributeSelection::removeTemporaryValues() } } -// 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) { diff --git a/src/Model/Model_AttributeSelection.h b/src/Model/Model_AttributeSelection.h index 0e4c0f202..b7d81ff74 100644 --- a/src/Model/Model_AttributeSelection.h +++ b/src/Model/Model_AttributeSelection.h @@ -63,7 +63,7 @@ public: const ObjectPtr& theContext, const std::shared_ptr& 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& theEdge, diff --git a/src/ModelAPI/ModelAPI_AttributeSelection.h b/src/ModelAPI/ModelAPI_AttributeSelection.h index 0f44acb01..119485dc4 100644 --- a/src/ModelAPI/ModelAPI_AttributeSelection.h +++ b/src/ModelAPI/ModelAPI_AttributeSelection.h @@ -34,7 +34,7 @@ class GeomAPI_Pnt; 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 @@ -52,7 +52,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute const ObjectPtr& theContext, const std::shared_ptr& 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& theEdge, diff --git a/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp b/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp index 207e4f3aa..2f81c1f38 100644 --- a/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp +++ b/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp @@ -84,7 +84,7 @@ namespace ModelGeomAlgo_Shape 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, diff --git a/src/SketchPlugin/SketchPlugin_EllipticArc.h b/src/SketchPlugin/SketchPlugin_EllipticArc.h index 4b84d3bcf..b6c6e1c71 100644 --- a/src/SketchPlugin/SketchPlugin_EllipticArc.h +++ b/src/SketchPlugin/SketchPlugin_EllipticArc.h @@ -25,7 +25,7 @@ /**\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 { diff --git a/src/SketchPlugin/SketchPlugin_MacroEllipticArc.h b/src/SketchPlugin/SketchPlugin_MacroEllipticArc.h index 1d6db5ffc..d0c8982c4 100644 --- a/src/SketchPlugin/SketchPlugin_MacroEllipticArc.h +++ b/src/SketchPlugin/SketchPlugin_MacroEllipticArc.h @@ -30,14 +30,14 @@ class GeomAPI_Shape; /**\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"); diff --git a/src/SketchPlugin/SketchPlugin_msg_en.ts b/src/SketchPlugin/SketchPlugin_msg_en.ts index 3872b987e..da40a9716 100644 --- a/src/SketchPlugin/SketchPlugin_msg_en.ts +++ b/src/SketchPlugin/SketchPlugin_msg_en.ts @@ -272,6 +272,47 @@ + + SketchMacroEllipticArc:Model_FeatureValidator + + Attribute "%1" is not initialized. + Select a point. + + + + SketchMacroEllipticArc:center + + Attribute "%1" is locked by modification value in the viewer. + Select a point. + + + Attribute "%1" is not initialized. + Select a center point. + + + + SketchMacroEllipticArc:end_point + + Attribute "%1" is locked by modification value in the viewer. + Select an end point. + + + Attribute "%1" is not initialized. + Select an end point. + + + + SketchMacroEllipticArc:major_axis_point + + Attribute "%1" is locked by modification value in the viewer. + Select a major axis point. + + + Attribute "%1" is not initialized. + Select a major axis point. + + + SketchSplit:Model_FeatureValidator diff --git a/src/SketchPlugin/SketchPlugin_msg_fr.ts b/src/SketchPlugin/SketchPlugin_msg_fr.ts index f1cff73a3..90e0fbc5a 100644 --- a/src/SketchPlugin/SketchPlugin_msg_fr.ts +++ b/src/SketchPlugin/SketchPlugin_msg_fr.ts @@ -3829,6 +3829,231 @@ + + SketchEllipticArc:Auxiliary + + Auxiliary + AA + + + Construction element + AA + + + + SketchEllipticArc:ellipse_center + + Center + AA + + + + SketchEllipticArc:ellipse_first_focus + + First focus + AA + + + + SketchEllipticArc:ellipse_major_axis_end_point + + Major axis end + AA + + + + SketchEllipticArc:ellipse_major_axis_start_point + + Major axis start + AA + + + + SketchEllipticArc:ellipse_major_radius + + Major radius + AA + + + Set major radius + AA + + + + SketchEllipticArc:ellipse_minor_axis_end_point + + Minor axis end + AA + + + + SketchEllipticArc:ellipse_minor_axis_start_point + + Minor axis start + AA + + + + SketchEllipticArc:ellipse_minor_radius + + Minor radius + AA + + + Set minor radius + AA + + + + SketchEllipticArc:ellipse_second_focus + + Second focus + AA + + + + SketchEllipticArc:end_point + + End point + AA + + + + SketchEllipticArc:start_point + + Start point + AA + + + + SketchMacroEllipticArc + + Create elliptic arc + AA + + + Elliptic arc + AA + + + + SketchMacroEllipticArc:Auxiliary + + Auxiliary + AA + + + Construction element + AA + + + + SketchMacroEllipticArc:Model_FeatureValidator + + Attribute "%1" is not initialized. + AA + + + + SketchMacroEllipticArc:center + + Attribute "%1" is locked by modification value in the viewer. + AA + + + Attribute "%1" is not initialized. + AA + + + Center point + AA + + + + SketchMacroEllipticArc:end_point + + Attribute "%1" is locked by modification value in the viewer. + AA + + + Attribute "%1" is not initialized. + AA + + + End point + AA + + + + SketchMacroEllipticArc:major_axis_point + + Attribute "%1" is locked by modification value in the viewer. + AA + + + Attribute "%1" is not initialized. + AA + + + Major axis point + AA + + + + SketchMacroEllipticArc:major_radius + + Major radius + AA + + + Set major radius + AA + + + + SketchMacroEllipticArc:major_radius:GeomValidators_Positive + + Double is not initialized. + AA + + + + SketchMacroEllipticArc:minor_radius + + Minor radius + AA + + + Set minor radius + AA + + + + SketchMacroEllipticArc:minor_radius:GeomValidators_Positive + + Double is not initialized. + AA + + + + SketchMacroEllipticArc:start_point + + Attribute "%1" is locked by modification value in the viewer. + AA + + + Start point + AA + + + + workshop + + Elliptic arc + AA + + + SketchMultiRotation diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index fe1f4e2a1..f877ecd87 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -472,7 +472,7 @@ @@ -542,8 +542,8 @@ anEllipse = std::dynamic_pointer_cast(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 anArc = std::dynamic_pointer_cast(myEntity); double anAngleDiff = fabs(*anArc->startAngle - *anArc->endAngle); diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp index 2aff74fb4..4a9ae8a5a 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp @@ -422,7 +422,7 @@ void PlaneGCSSolver_Storage::createAuxiliaryConstraints(const EntityWrapperPtr& 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); } diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h index cfa195c5c..eafa686c4 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h @@ -113,7 +113,7 @@ private: 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 myAuxConstraintMap; /// list of removed constraints to notify solver diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Tools.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Tools.cpp index 461ae6885..39b78af57 100644 --- a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Tools.cpp +++ b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Tools.cpp @@ -306,7 +306,7 @@ std::shared_ptr PlaneGCSSolver_Tools::circle(EntityWrapperPtr th std::shared_ptr 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(); std::shared_ptr anEntity = @@ -349,7 +349,7 @@ void PlaneGCSSolver_Tools::recalculateArcParameters(EntityWrapperPtr theArc) 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 aEllArc = std::dynamic_pointer_cast(anEdge->entity()); @@ -390,7 +390,7 @@ GCS::SET_pD PlaneGCSSolver_Tools::parameters(const EntityWrapperPtr& theEntity) 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; } @@ -443,7 +443,7 @@ ConstraintWrapperPtr createConstraintPointOnEntity( break; } case ENTITY_ELLIPSE: - case ENTITY_ELLIPTICAL_ARC: { + case ENTITY_ELLIPTIC_ARC: { std::shared_ptr anEllipse = std::dynamic_pointer_cast(theEntity->entity()); aNewConstr = GCSConstraintPtr( diff --git a/src/SketchSolver/SketchSolver_ConstraintEqual.cpp b/src/SketchSolver/SketchSolver_ConstraintEqual.cpp index 31fcca4a3..8d3bab21b 100644 --- a/src/SketchSolver/SketchSolver_ConstraintEqual.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintEqual.cpp @@ -51,7 +51,7 @@ void SketchSolver_ConstraintEqual::getAttributes( ++aNbArcs; isArcFirst = (aNbLines == 0); } - else if (aType == ENTITY_ELLIPSE || aType == ENTITY_ELLIPTICAL_ARC) + else if (aType == ENTITY_ELLIPSE || aType == ENTITY_ELLIPTIC_ARC) ++aNbEllipses; } diff --git a/src/SketchSolver/SketchSolver_ConstraintFixed.cpp b/src/SketchSolver/SketchSolver_ConstraintFixed.cpp index 7e7c6aab1..a32e1966f 100644 --- a/src/SketchSolver/SketchSolver_ConstraintFixed.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintFixed.cpp @@ -151,7 +151,7 @@ GCS::VEC_pD toParameters(const EntityWrapperPtr& theEntity) aParameters.push_back(anEllipse->radmin); break; } - case ENTITY_ELLIPTICAL_ARC: { + case ENTITY_ELLIPTIC_ARC: { std::shared_ptr anEllArc = std::dynamic_pointer_cast(anEntity->entity()); aParameters.push_back(anEllArc->center.x); diff --git a/src/SketchSolver/SketchSolver_ConstraintMovement.cpp b/src/SketchSolver/SketchSolver_ConstraintMovement.cpp index e4a59127b..8e38fa6b8 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMovement.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintMovement.cpp @@ -136,8 +136,8 @@ ConstraintWrapperPtr SketchSolver_ConstraintMovement::initMovement() // 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); } } diff --git a/src/SketchSolver/SketchSolver_ConstraintMovement.h b/src/SketchSolver/SketchSolver_ConstraintMovement.h index 4d14eb42d..bfbe1f1ed 100644 --- a/src/SketchSolver/SketchSolver_ConstraintMovement.h +++ b/src/SketchSolver/SketchSolver_ConstraintMovement.h @@ -69,7 +69,7 @@ protected: /// \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: diff --git a/src/SketchSolver/SketchSolver_ConstraintTangent.cpp b/src/SketchSolver/SketchSolver_ConstraintTangent.cpp index 16e6d11da..c54b01e91 100644 --- a/src/SketchSolver/SketchSolver_ConstraintTangent.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintTangent.cpp @@ -127,7 +127,7 @@ void SketchSolver_ConstraintTangent::rebuild() ++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; } @@ -521,7 +521,7 @@ void calculateTangencyPoint(EntityWrapperPtr theCurve1, EntityWrapperPtr theCurv std::shared_ptr 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 anEl2 = PlaneGCSSolver_Tools::ellipse(aCurve2); anEllipse->distance(anEl2, aP1, aP2); }