-// 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
}
SketchAPI_EllipticArc::SketchAPI_EllipticArc(const std::shared_ptr<ModelAPI_Feature>& theFeature,
- const std::string& theExternalName)
+ const std::wstring& theExternalName)
: SketchAPI_SketchEntity(theFeature)
{
if (initialize()) {
double theEndX, double theEndY,
bool theInversed)
{
- fillAttribute(center(), theCenterX, theCenterY);
- fillAttribute(firstFocus(), theFocusX, theFocusY);
- fillAttribute(startPoint(), theStartX, theStartY);
- fillAttribute(endPoint(), theEndX, theEndY);
+ // the order of attribute initialization is reversed to avoid odd recalculation of an elliptic arc
fillAttribute(theInversed, reversed());
+ fillAttribute(endPoint(), theEndX, theEndY);
+ fillAttribute(startPoint(), theStartX, theStartY);
+ fillAttribute(firstFocus(), theFocusX, theFocusY);
+ fillAttribute(center(), theCenterX, theCenterY);
execute();
}
const std::shared_ptr<GeomAPI_Pnt2d>& theEnd,
bool theInversed)
{
- fillAttribute(theCenter, center());
- fillAttribute(theFocus, firstFocus());
- fillAttribute(theStart, startPoint());
- fillAttribute(theEnd, endPoint());
+ // the order of attribute initialization is reversed to avoid odd recalculation of an elliptic arc
fillAttribute(theInversed, reversed());
+ fillAttribute(theEnd, endPoint());
+ fillAttribute(theStart, startPoint());
+ fillAttribute(theFocus, firstFocus());
+ fillAttribute(theCenter, center());
execute();
}
execute();
}
-void SketchAPI_EllipticArc::setByExternalName(const std::string & theExternalName)
+void SketchAPI_EllipticArc::setByExternalName(const std::wstring & theExternalName)
{
fillAttribute(ModelHighAPI_Selection("EDGE", theExternalName), external());
execute();
}
std::list<std::shared_ptr<SketchAPI_SketchEntity> > SketchAPI_EllipticArc::construction(
- const std::string& center,
- const std::string& firstFocus,
- const std::string& secondFocus,
- const std::string& majorAxisStart,
- const std::string& majorAxisEnd,
- const std::string& minorAxisStart,
- const std::string& minorAxisEnd,
- const std::string& majorAxis,
- const std::string& minorAxis) const
+ const std::wstring& center,
+ const std::wstring& firstFocus,
+ const std::wstring& secondFocus,
+ const std::wstring& majorAxisStart,
+ const std::wstring& majorAxisEnd,
+ const std::wstring& minorAxisStart,
+ const std::wstring& minorAxisEnd,
+ const std::wstring& majorAxis,
+ const std::wstring& minorAxis) const
{
FeaturePtr anEllipse = feature();