fix CIDs 154877, 154878, 154879, 154880, 154881, 154882, 154885
This commit is contained in:
parent
2d68ca2f6e
commit
bd71e62df6
|
@ -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<const GeomArcOfHyperbola*>(geo);
|
||||
const GeomArcOfHyperbola *aoh = static_cast<const GeomArcOfHyperbola*>(geo);
|
||||
// create the definition struct for that geom
|
||||
return addArcOfHyperbola(*aoh, fixed);
|
||||
} else {
|
||||
|
|
|
@ -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<const Part::GeomArcOfHyperbola*>(geo);
|
||||
const Part::GeomArcOfHyperbola *aoh = static_cast<const Part::GeomArcOfHyperbola*>(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<const Part::GeomArcOfHyperbola*>(geo);
|
||||
const Part::GeomArcOfHyperbola *aoh = static_cast<const Part::GeomArcOfHyperbola*>(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<Part::GeomArcOfHyperbola*>(geomlist[GeoId]);
|
||||
Part::GeomArcOfHyperbola *aoh2 = dynamic_cast<Part::GeomArcOfHyperbola*>(geomlist[newGeoId]);
|
||||
Part::GeomArcOfHyperbola *aoh1 = static_cast<Part::GeomArcOfHyperbola*>(geomlist[GeoId]);
|
||||
Part::GeomArcOfHyperbola *aoh2 = static_cast<Part::GeomArcOfHyperbola*>(geomlist[newGeoId]);
|
||||
aoh1->setRange(startAngle, startAngle + theta1, /*emulateCCW=*/true);
|
||||
aoh2->setRange(startAngle + theta2, endAngle, /*emulateCCW=*/true);
|
||||
|
||||
|
|
|
@ -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<const Part::GeomArcOfHyperbola *>(*it);
|
||||
const Part::GeomArcOfHyperbola *aoh = static_cast<const Part::GeomArcOfHyperbola *>(*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<const Part::GeomArcOfHyperbola *>(geo2);
|
||||
const Part::GeomArcOfHyperbola *aoh = static_cast<const Part::GeomArcOfHyperbola *>(geo2);
|
||||
r2a = aoh->getMajorRadius();
|
||||
r2b = aoh->getMinorRadius();
|
||||
double startangle, endangle;
|
||||
|
|
Loading…
Reference in New Issue
Block a user