diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 4415f2379..0aa497180 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -212,7 +212,7 @@ int Sketch::addGeometry(const Part::Geometry *geo, bool fixed) // create the definition struct for that geom return addArcOfEllipse(*aoe, fixed); } else if (geo->getTypeId() == GeomArcOfHyperbola::getClassTypeId()) { // add an arc of hyperbola - const GeomArcOfHyperbola *aoh = dynamic_cast(geo); + const GeomArcOfHyperbola *aoh = static_cast(geo); // create the definition struct for that geom return addArcOfHyperbola(*aoh, fixed); } else { diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index e2b1af885..dd9e48aa4 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -497,7 +497,7 @@ Base::Vector3d SketchObject::getPoint(int GeoId, PointPos PosId) const else if (PosId == mid) return aoc->getCenter(); } else if (geo->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId()) { - const Part::GeomArcOfHyperbola *aoh = dynamic_cast(geo); + const Part::GeomArcOfHyperbola *aoh = static_cast(geo); if (PosId == start) return aoh->getStartPoint(); else if (PosId == end) @@ -1729,7 +1729,7 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) } } else if (geo->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId()) { - const Part::GeomArcOfHyperbola *aoh = dynamic_cast(geo); + const Part::GeomArcOfHyperbola *aoh = static_cast(geo); Base::Vector3d center = aoh->getCenter(); double startAngle, endAngle; aoh->getRange(startAngle, endAngle, /*emulateCCW=*/true); @@ -1761,8 +1761,8 @@ int SketchObject::trim(int GeoId, const Base::Vector3d& point) // go through all constraints and replace the point (GeoId,end) with (newGeoId,end) transferConstraints(GeoId, end, newGeoId, end); - Part::GeomArcOfHyperbola *aoh1 = dynamic_cast(geomlist[GeoId]); - Part::GeomArcOfHyperbola *aoh2 = dynamic_cast(geomlist[newGeoId]); + Part::GeomArcOfHyperbola *aoh1 = static_cast(geomlist[GeoId]); + Part::GeomArcOfHyperbola *aoh2 = static_cast(geomlist[newGeoId]); aoh1->setRange(startAngle, startAngle + theta1, /*emulateCCW=*/true); aoh2->setRange(startAngle + theta2, endAngle, /*emulateCCW=*/true); diff --git a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp index d6f9ea646..2d4c8f2ac 100644 --- a/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp +++ b/src/Mod/Sketcher/Gui/ViewProviderSketch.cpp @@ -2178,7 +2178,7 @@ void ViewProviderSketch::doBoxSelection(const SbVec2s &startPos, const SbVec2s & } else if ((*it)->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId()) { // Check if arc lies inside box selection - const Part::GeomArcOfHyperbola *aoh = dynamic_cast(*it); + const Part::GeomArcOfHyperbola *aoh = static_cast(*it); pnt0 = aoh->getStartPoint(); pnt1 = aoh->getEndPoint(); @@ -3548,7 +3548,7 @@ Restart: angle2plus = (startangle + endangle)/2; midpos2 = aoe->getCenter(); } else if (geo2->getTypeId() == Part::GeomArcOfHyperbola::getClassTypeId()) { - const Part::GeomArcOfHyperbola *aoh = dynamic_cast(geo2); + const Part::GeomArcOfHyperbola *aoh = static_cast(geo2); r2a = aoh->getMajorRadius(); r2b = aoh->getMinorRadius(); double startangle, endangle;