X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_AISObject.cpp;h=fba0ed2ff85ca17e1c3844a3e949605b9cd8956a;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=8ce35f03909e861714125ea008b062f76321ab35;hpb=745c72679f6346375d5e886b25cc3865f3c4daae;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index 8ce35f039..fba0ed2ff 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2021 CEA/DEN, EDF R&D +// Copyright (C) 2014-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -32,16 +32,16 @@ #include #include -#include #include #include -#include -#include -#include -#include #include -#include #include +#include +#include +#include +#include +#include +#include #include @@ -140,9 +140,10 @@ void GeomAPI_AISObject::createDistance(std::shared_ptr theStartPoin Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_LengthDimension) aDimAIS = new AIS_LengthDimension(theStartPoint->impl(), - theEndPoint->impl(), - thePlane->impl()); + Handle(PrsDim_LengthDimension) aDimAIS = + new PrsDim_LengthDimension(theStartPoint->impl(), + theEndPoint->impl(), + thePlane->impl()); aDimAIS->SetCustomValue(theDistance); Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect(); @@ -159,7 +160,7 @@ void GeomAPI_AISObject::createDistance(std::shared_ptr theStartPoin setImpl(new Handle(AIS_InteractiveObject)(aDimAIS)); } else { // update presentation - Handle(AIS_LengthDimension) aDimAIS = Handle(AIS_LengthDimension)::DownCast(anAIS); + Handle(PrsDim_LengthDimension) aDimAIS = Handle(PrsDim_LengthDimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->SetMeasuredGeometry(theStartPoint->impl(), theEndPoint->impl(), thePlane->impl()); @@ -177,7 +178,7 @@ bool GeomAPI_AISObject::isEmptyDistanceGeometry() Handle(AIS_InteractiveObject) anAIS = impl(); if (!anAIS.IsNull()) { - Handle(AIS_LengthDimension) aDimAIS = Handle(AIS_LengthDimension)::DownCast(anAIS); + Handle(PrsDim_LengthDimension) aDimAIS = Handle(PrsDim_LengthDimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { anEmpty = !aDimAIS->IsValid(); } @@ -209,8 +210,8 @@ void GeomAPI_AISObject::createRadius(std::shared_ptr theCircle, Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_RadiusDimension) aDimAIS = new AIS_RadiusDimension(theCircle->impl(), - anAnchor->impl()); + Handle(PrsDim_RadiusDimension) aDimAIS = new PrsDim_RadiusDimension(theCircle->impl(), + anAnchor->impl()); aDimAIS->SetCustomValue(theRadius); Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect(); @@ -226,7 +227,7 @@ void GeomAPI_AISObject::createRadius(std::shared_ptr theCircle, setImpl(new Handle(AIS_InteractiveObject)(aDimAIS)); } else { // update presentation - Handle(AIS_RadiusDimension) aDimAIS = Handle(AIS_RadiusDimension)::DownCast(anAIS); + Handle(PrsDim_RadiusDimension) aDimAIS = Handle(PrsDim_RadiusDimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->SetMeasuredGeometry(theCircle->impl(), anAnchor->impl()); aDimAIS->SetCustomValue(theRadius); @@ -243,14 +244,14 @@ void GeomAPI_AISObject::createParallel(std::shared_ptr theLine1, Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl()); Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_ParallelRelation) aParallel = new AIS_ParallelRelation( + Handle(PrsDim_ParallelRelation) aParallel = new PrsDim_ParallelRelation( theLine1->impl(), theLine2->impl(), aPlane); if (theFlyoutPoint) aParallel->SetPosition(theFlyoutPoint->impl()); setImpl(new Handle(AIS_InteractiveObject)(aParallel)); } else { - Handle(AIS_ParallelRelation) aParallel = Handle(AIS_ParallelRelation)::DownCast(anAIS); + Handle(PrsDim_ParallelRelation) aParallel = Handle(PrsDim_ParallelRelation)::DownCast(anAIS); if (!aParallel.IsNull()) { aParallel->SetFirstShape(theLine1->impl()); aParallel->SetSecondShape(theLine2->impl()); @@ -269,13 +270,13 @@ void GeomAPI_AISObject::createPerpendicular(std::shared_ptr theLi Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl()); Handle(AIS_InteractiveObject) anAIS = impl(); if (anAIS.IsNull()) { - Handle(AIS_PerpendicularRelation) aPerpendicular = new AIS_PerpendicularRelation( + Handle(PrsDim_PerpendicularRelation) aPerpendicular = new PrsDim_PerpendicularRelation( theLine1->impl(), theLine2->impl(), aPlane); setImpl(new Handle(AIS_InteractiveObject)(aPerpendicular)); } else { - Handle(AIS_PerpendicularRelation) aPerpendicular = Handle(AIS_PerpendicularRelation)::DownCast( - anAIS); + Handle(PrsDim_PerpendicularRelation) aPerpendicular = + Handle(PrsDim_PerpendicularRelation)::DownCast(anAIS); if (!aPerpendicular.IsNull()) { aPerpendicular->SetFirstShape(theLine1->impl()); aPerpendicular->SetSecondShape(theLine2->impl()); @@ -292,13 +293,13 @@ void GeomAPI_AISObject::createFixed(std::shared_ptr theShape, Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl()); Handle(AIS_InteractiveObject) anAIS = impl(); TopoDS_Shape aShape = theShape->impl(); - Handle(AIS_FixRelation) aFixPrs; + Handle(PrsDim_FixRelation) aFixPrs; if (anAIS.IsNull()) { - aFixPrs = new AIS_FixRelation(aShape, aPlane); + aFixPrs = new PrsDim_FixRelation(aShape, aPlane); setImpl(new Handle(AIS_InteractiveObject)(aFixPrs)); } else { - aFixPrs = Handle(AIS_FixRelation)::DownCast(anAIS); + aFixPrs = Handle(PrsDim_FixRelation)::DownCast(anAIS); if (!aFixPrs.IsNull()) { aFixPrs->SetFirstShape(aShape); aFixPrs->SetPlane(aPlane); @@ -325,7 +326,7 @@ void GeomAPI_AISObject::setColor(const int& theColor) if (anAIS.IsNull()) return; Quantity_Color aColor((Quantity_NameOfColor) theColor); - Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS); + Handle(PrsDim_Dimension) aDimAIS = Handle(PrsDim_Dimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->DimensionAspect()->SetCommonColor(aColor); } @@ -371,7 +372,7 @@ bool GeomAPI_AISObject::setColor(int theR, int theG, int theB) return false; Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); - Handle(AIS_Dimension) aDimAIS = Handle(AIS_Dimension)::DownCast(anAIS); + Handle(PrsDim_Dimension) aDimAIS = Handle(PrsDim_Dimension)::DownCast(anAIS); if (!aDimAIS.IsNull()) { aDimAIS->DimensionAspect()->SetCommonColor(aColor); if (!aContext.IsNull())