[Sketcher] Use modernized geometry type checks

This commit is contained in:
Ajinkya Dahale
2024-08-20 22:54:48 +05:30
parent 6a1afdc4e2
commit e2664f397d
5 changed files with 19 additions and 27 deletions

View File

@@ -564,8 +564,7 @@ Restart:
Base::Vector3d midpos1, dir1, norm1;
Base::Vector3d midpos2, dir2, norm2;
if (geo1->getTypeId() != Part::GeomLineSegment::getClassTypeId()
|| geo2->getTypeId() != Part::GeomLineSegment::getClassTypeId()) {
if (!geo1->is<Part::GeomLineSegment>() || !geo2->is<Part::GeomLineSegment>()) {
if (Constr->Type == Equal) {
double r1a = 0, r1b = 0, r2a = 0, r2b = 0;
double angle1,
@@ -731,8 +730,7 @@ Restart:
if (geo2->is<Part::GeomEllipse>() || geo2->is<Part::GeomArcOfEllipse>()
|| geo2->getTypeId()
== Part::GeomArcOfHyperbola::getClassTypeId()) {
|| geo2->is<Part::GeomArcOfHyperbola>()) {
Base::Vector3d majDir, minDir, rvec;
majDir = Base::Vector3d(cos(angle2),