}
if (aShape) {
- double aTolerance = 0.0001;
double aLength;
double aSurfArea;
double aVolume;
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Shape.hxx>
-#include <AIS_Dimension.hxx>
-#include <AIS_LengthDimension.hxx>
-#include <AIS_RadiusDimension.hxx>
-#include <AIS_AngleDimension.hxx>
+#include <PrsDim_Dimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
+#include <PrsDim_RadiusDimension.hxx>
+#include <PrsDim_AngleDimension.hxx>
#include <BRepExtrema_DistShapeShape.hxx>
#include <iomanip>
aPlane = gp_Pln(aPnt1, aPlane.XAxis().Direction());
}
- Handle(AIS_LengthDimension) aDim;
+ Handle(PrsDim_LengthDimension) aDim;
if (thePrevious.get()) {
aAISObj = thePrevious;
Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
- aDim = Handle(AIS_LengthDimension)::DownCast(aAIS);
+ aDim = Handle(PrsDim_LengthDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
- aDim = new AIS_LengthDimension(aTEdge, aPlane);
+ aDim = new PrsDim_LengthDimension(aTEdge, aPlane);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
}
}
else {
- aDim = new AIS_LengthDimension(aTEdge, aPlane);
+ aDim = new PrsDim_LengthDimension(aTEdge, aPlane);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
aPlane = gp_Pln(aPnt1, aPlane.XAxis().Direction());
}
- Handle(AIS_LengthDimension) aDim;
+ Handle(PrsDim_LengthDimension) aDim;
if (thePrevious.get()) {
aAISObj = thePrevious;
Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
- aDim = Handle(AIS_LengthDimension)::DownCast(aAIS);
+ aDim = Handle(PrsDim_LengthDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
- aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane);
+ aDim = new PrsDim_LengthDimension(aPnt1, aPnt2, aPlane);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
}
else {
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
- aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane);
+ aDim = new PrsDim_LengthDimension(aPnt1, aPnt2, aPlane);
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
aDim->SetFlyout(aDistance / 3.);
if (thePrevious.get()) {
aAISObj = thePrevious;
Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
- Handle(AIS_RadiusDimension) aDim = Handle(AIS_RadiusDimension)::DownCast(aAIS);
+ Handle(PrsDim_RadiusDimension) aDim = Handle(PrsDim_RadiusDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
- aDim = new AIS_RadiusDimension(aShp);
+ aDim = new PrsDim_RadiusDimension(aShp);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
} else
aDim->SetMeasuredGeometry(aShp);
} else {
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
- Handle(AIS_RadiusDimension) aDim = new AIS_RadiusDimension(aShp);
+ Handle(PrsDim_RadiusDimension) aDim = new PrsDim_RadiusDimension(aShp);
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
}
TopoDS_Edge aTEdge1 = TopoDS::Edge(anEdge1->impl<TopoDS_Shape>());
TopoDS_Edge aTEdge2 = TopoDS::Edge(anEdge2->impl<TopoDS_Shape>());
- Handle(AIS_AngleDimension) aDim;
+ Handle(PrsDim_AngleDimension) aDim;
if (thePrevious.get()) {
aAISObj = thePrevious;
Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
- aDim = Handle(AIS_AngleDimension)::DownCast(aAIS);
+ aDim = Handle(PrsDim_AngleDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
- aDim = new AIS_AngleDimension(aTEdge1, aTEdge2);
+ aDim = new PrsDim_AngleDimension(aTEdge1, aTEdge2);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
} else
aDim->SetMeasuredGeometry(aTEdge1, aTEdge2);
} else {
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
- aDim = new AIS_AngleDimension(aTEdge1, aTEdge2);
+ aDim = new PrsDim_AngleDimension(aTEdge1, aTEdge2);
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
}
if (thePrevious.get()) {
aAISObj = thePrevious;
Handle(AIS_InteractiveObject) aAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
- Handle(AIS_AngleDimension) aDim = Handle(AIS_AngleDimension)::DownCast(aAIS);
+ Handle(PrsDim_AngleDimension) aDim = Handle(PrsDim_AngleDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
- aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3);
+ aDim = new PrsDim_AngleDimension(aPnt1, aPnt2, aPnt3);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
} else
aDim->SetMeasuredGeometry(aPnt1, aPnt2, aPnt3);
} else {
- Handle(AIS_AngleDimension) aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3);
+ Handle(PrsDim_AngleDimension) aDim = new PrsDim_AngleDimension(aPnt1, aPnt2, aPnt3);
aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
{
if (theDim.get()) {
Handle(AIS_InteractiveObject) aAIS = theDim->impl<Handle(AIS_InteractiveObject)>();
- Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAIS);
+ Handle(PrsDim_Dimension) aDim = Handle(PrsDim_Dimension)::DownCast(aAIS);
int aSize = Config_PropManager::integer("Visualization", "dimension_arrow_size");
int aTextSize = Config_PropManager::integer("Visualization", "dimension_value_size");
std::string aFont = Config_PropManager::string("Visualization", "dimension_font");
SetOfShapes& theFaces)
{
bool aNewCache = false;
- if (theFaces.size() != theList->size()) {
+ if ((int)theFaces.size() != theList->size()) {
aNewCache = true;
} else {
for (int i = 0; i < theList->size(); i++) {
}
if (myCachedShapes.empty()) {
- for (size_t i = 0; i < aList->size(); i++)
+ for (int i = 0; i < aList->size(); i++)
{
ResultBodyPtr aBaseResult = ModelAPI_Tools::bodyOwner(aList->value(i)->context(), true);
if (!aBaseResult.get()) {
#include <Quantity_NameOfColor.hxx>
#include <BRepBndLib.hxx>
-#include <AIS_Dimension.hxx>
#include <AIS_InteractiveObject.hxx>
#include <AIS_InteractiveContext.hxx>
-#include <AIS_LengthDimension.hxx>
-#include <AIS_ParallelRelation.hxx>
-#include <AIS_PerpendicularRelation.hxx>
-#include <AIS_RadiusDimension.hxx>
#include <AIS_Shape.hxx>
-#include <AIS_FixRelation.hxx>
#include <Prs3d_PointAspect.hxx>
+#include <PrsDim_Dimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
+#include <PrsDim_ParallelRelation.hxx>
+#include <PrsDim_PerpendicularRelation.hxx>
+#include <PrsDim_RadiusDimension.hxx>
+#include <PrsDim_FixRelation.hxx>
#include <Graphic3d_AspectLine3d.hxx>
Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
if (anAIS.IsNull()) {
- Handle(AIS_LengthDimension) aDimAIS = new AIS_LengthDimension(theStartPoint->impl<gp_Pnt>(),
- theEndPoint->impl<gp_Pnt>(),
- thePlane->impl<gp_Pln>());
+ Handle(PrsDim_LengthDimension) aDimAIS =
+ new PrsDim_LengthDimension(theStartPoint->impl<gp_Pnt>(),
+ theEndPoint->impl<gp_Pnt>(),
+ thePlane->impl<gp_Pln>());
aDimAIS->SetCustomValue(theDistance);
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
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<gp_Pnt>(), theEndPoint->impl<gp_Pnt>(),
thePlane->impl<gp_Pln>());
Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
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();
}
Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
if (anAIS.IsNull()) {
- Handle(AIS_RadiusDimension) aDimAIS = new AIS_RadiusDimension(theCircle->impl<gp_Circ>(),
- anAnchor->impl<gp_Pnt>());
+ Handle(PrsDim_RadiusDimension) aDimAIS = new PrsDim_RadiusDimension(theCircle->impl<gp_Circ>(),
+ anAnchor->impl<gp_Pnt>());
aDimAIS->SetCustomValue(theRadius);
Handle(Prs3d_DimensionAspect) anAspect = new Prs3d_DimensionAspect();
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<gp_Circ>(), anAnchor->impl<gp_Pnt>());
aDimAIS->SetCustomValue(theRadius);
Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
if (anAIS.IsNull()) {
- Handle(AIS_ParallelRelation) aParallel = new AIS_ParallelRelation(
+ Handle(PrsDim_ParallelRelation) aParallel = new PrsDim_ParallelRelation(
theLine1->impl<TopoDS_Shape>(), theLine2->impl<TopoDS_Shape>(), aPlane);
if (theFlyoutPoint)
aParallel->SetPosition(theFlyoutPoint->impl<gp_Pnt>());
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<TopoDS_Shape>());
aParallel->SetSecondShape(theLine2->impl<TopoDS_Shape>());
Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
if (anAIS.IsNull()) {
- Handle(AIS_PerpendicularRelation) aPerpendicular = new AIS_PerpendicularRelation(
+ Handle(PrsDim_PerpendicularRelation) aPerpendicular = new PrsDim_PerpendicularRelation(
theLine1->impl<TopoDS_Shape>(), theLine2->impl<TopoDS_Shape>(), aPlane);
setImpl(new Handle(AIS_InteractiveObject)(aPerpendicular));
} else {
- Handle(AIS_PerpendicularRelation) aPerpendicular = Handle(AIS_PerpendicularRelation)::DownCast(
+ Handle(PrsDim_PerpendicularRelation) aPerpendicular = Handle(PrsDim_PerpendicularRelation)::DownCast(
anAIS);
if (!aPerpendicular.IsNull()) {
aPerpendicular->SetFirstShape(theLine1->impl<TopoDS_Shape>());
Handle(Geom_Plane) aPlane = new Geom_Plane(thePlane->impl<gp_Pln>());
Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
TopoDS_Shape aShape = theShape->impl<TopoDS_Shape>();
- 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);
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);
}
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())
/// Returns shape used for the presentation creation (can be NULL)
GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> getShape() const;
- /** \brief Creates AIS_LengthDimension object
+ /** \brief Creates PrsDim_LengthDimension object
* \param[in] theStartPoint first point for dimension
* \param[in] theEndPoint second point for dimension
* \param[in] theFlyoutPoint the flyout of dimension relative to the measured line
GEOMAPI_EXPORT
bool isEmptyDistanceGeometry();
- /** \brief Creates AIS_RadiusDimension object
+ /** \brief Creates PrsDim_RadiusDimension object
* \param[in] theCircle the radius is created for this circle
* \param[in] theFlyoutPoint the flyout of dimension
* \param[in] theRadius value of the radius to be shown
void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
- /** \brief Creates AIS_ParallelRelation object for two lines
+ /** \brief Creates PrsDim_ParallelRelation object for two lines
* \param[in] theLine1 first parallel line
* \param[in] theLine2 second parallel line
* \param[in] theFlyoutPoint the flyout point for relation
std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
std::shared_ptr<GeomAPI_Pln> thePlane);
- /** \brief Creates AIS_PerpendicularRelation object for two lines
+ /** \brief Creates PrsDim_PerpendicularRelation object for two lines
* \param[in] theLine1 first parallel line
* \param[in] theLine2 second parallel line
* \param[in] thePlane the plane which contains the lines
std::shared_ptr<GeomAPI_Shape> theLine2,
std::shared_ptr<GeomAPI_Pln> thePlane);
- /** \brief Creates AIS_FixedRelation object for an object
+ /** \brief Creates PrsDim_FixedRelation object for an object
* \param[in] theShape the object
* \param[in] thePlane the plane which contains the lines
*/
#include <map>
#include <set>
#ifdef WIN32
- #include<array>
-#endif WIN32
+#include<array>
+#endif
class GeomAPI_Ax1;
class GeomAPI_Edge;
void findRandomColor(std::vector<int>& theValues, bool theReset)
{
- static int i = 0;
+ static size_t i = 0;
static std::vector<std::vector<int>> usedGeneratedColor;
// True when disabling auto-color
#include <Config_PropManager.h>
#include <Config_Keywords.h>
-#include <AIS_Dimension.hxx>
#include <AIS_InteractiveObject.hxx>
+#include <PrsDim_Dimension.hxx>
#include <StdSelect_TypeOfFace.hxx>
#include <TopoDS_Vertex.hxx>
#include <TopoDS.hxx>
foreach(AISObjectPtr aAIS, aPrsList) {
Handle(AIS_InteractiveObject) aAisObj = aAIS->impl<Handle(AIS_InteractiveObject)>();
#endif
- Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(aAisObj);
+ Handle(PrsDim_Dimension) aDim = Handle(PrsDim_Dimension)::DownCast(aAisObj);
if (!aDim.IsNull()) {
aDim->DimensionAspect()->ArrowAspect()->SetLength(aLen);
aContext->Redisplay(aDim, false);
#include <SelectMgr_IndexedMapOfOwner.hxx>
#include <StdSelect_BRepOwner.hxx>
-//#include <AIS_DimensionSelectionMode.hxx>
#include <AIS_Shape.hxx>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
#include <ModelAPI_Events.h>
#include <ModelAPI_Session.h>
anAISIO = anAIS->impl<Handle(AIS_InteractiveObject)>();
if (!anAISIO.IsNull()) {
- Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast(anAISIO);
+ Handle(PrsDim_Dimension) aDim = Handle(PrsDim_Dimension)::DownCast(anAISIO);
if (!aDim.IsNull()) {
gp_Pnt aPosition = aDim->GetTextPosition();
// #define COMPILATION_CORRECTION
//#endif
-IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension);
+IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Angle, PrsDim_AngleDimension);
SketcherPrs_Angle::SketcherPrs_Angle(ModelAPI_Feature* theConstraint,
SketchPlugin_Sketch* theSketcher)
-: AIS_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)),
+: PrsDim_AngleDimension(gp_Pnt(0,0,0), gp_Pnt(1,0,0), gp_Pnt(0,1,0)),
myConstraint(theConstraint),
mySketcher(theSketcher),
myFirstPoint(gp_Pnt(0,0,0)),
updateArrows(myAspect, anAngleCircleLength, aTextSize, aLocationType);
- AIS_AngleDimension::Compute(thePresentationManager, thePresentation, theMode);
+ PrsDim_AngleDimension::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay)
SketcherPrs_Tools::sendEmptyPresentationError(myConstraint,
}
}
SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
- AIS_AngleDimension::ComputeSelection(aSelection, aMode);
+ PrsDim_AngleDimension::ComputeSelection(aSelection, aMode);
}
bool SketcherPrs_Angle::isAnglePlaneReversedToSketchPlane()
#include <ModelAPI_Feature.h>
#include <SketchPlugin_Sketch.h>
-#include <AIS_AngleDimension.hxx>
+#include <PrsDim_AngleDimension.hxx>
#include <Standard_DefineHandle.hxx>
#include <SketcherPrs_DimensionStyle.h>
-DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, AIS_AngleDimension)
+DEFINE_STANDARD_HANDLE(SketcherPrs_Angle, PrsDim_AngleDimension)
/**
* \ingroup GUI
* A class for representation of angle constraint
*/
-class SketcherPrs_Angle : public AIS_AngleDimension
+class SketcherPrs_Angle : public PrsDim_AngleDimension
{
public:
/// Constructor
/// Destructor
Standard_EXPORT ~SketcherPrs_Angle();
- DEFINE_STANDARD_RTTIEXT(SketcherPrs_Angle, AIS_AngleDimension)
+ DEFINE_STANDARD_RTTIEXT(SketcherPrs_Angle, PrsDim_AngleDimension)
/// Returns true if the constraint feature arguments are correcly filled
/// to build AIS presentation
#include <Locale_Convert.h>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
#include <TCollection_ExtendedString.hxx>
#include <Standard_Version.hxx>
{
}
-void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension,
+void SketcherPrs_DimensionStyle::updateDimensions(PrsDim_Dimension* theDimension,
const SketcherPrs_DimensionStyle::DimensionValue& theDimensionValue)
{
if (!theDimension)
theDimensionValue.myTextValue, theDimensionValue.myDoubleValue);
}
-void SketcherPrs_DimensionStyle::updateDimensions(AIS_Dimension* theDimension,
- const bool theHasParameters,
- const std::string& theTextValue,
- const double theDoubleValue)
+void SketcherPrs_DimensionStyle::updateDimensions(PrsDim_Dimension* theDimension,
+ const bool theHasParameters,
+ const std::string& theTextValue,
+ const double theDoubleValue)
{
if (!theDimension)
return;
//#include <Events_Listener.h>
#include <ModelAPI_AttributeDouble.h>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
#include "SketcherPrs_Tools.h"
/// Visualizes the dimension text or dimension value depending on the has parameters state
/// \param theDimension a modified dimension
/// \param theDimensionValue container filled by the model double attribute
- Standard_EXPORT void updateDimensions(AIS_Dimension* theDimension,
+ Standard_EXPORT void updateDimensions(PrsDim_Dimension* theDimension,
const DimensionValue& theDimensionValue);
private:
/// \param theHasParameters if true, the text is shown, else digit
/// \param theTextValue a dimension text value
/// \param theDoubleValue a dimension digit value
- void updateDimensions(AIS_Dimension* theDimension,
+ void updateDimensions(PrsDim_Dimension* theDimension,
const bool theHasParameters,
const std::string& theTextValue,
const double theDoubleValue);
static const gp_Pnt MyDefEnd(1,0,0);
static const gp_Pln MyDefPln(gp_Pnt(0,0,0), gp_Dir(0,0,1));
-IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension);
+IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, PrsDim_LengthDimension);
SketcherPrs_LengthDimension::SketcherPrs_LengthDimension(ModelAPI_Feature* theConstraint,
SketchPlugin_Sketch* theSketcher)
-: AIS_LengthDimension(MyDefStart, MyDefEnd, MyDefPln),
+: PrsDim_LengthDimension(MyDefStart, MyDefEnd, MyDefPln),
myConstraint(theConstraint),
mySketcher(theSketcher),
myFirstPoint(MyDefStart),
// Update text visualization: parameter value or parameter text
myStyleListener->updateDimensions(this, myValue);
- AIS_LengthDimension::Compute(thePresentationManager, thePresentation, theMode);
+ PrsDim_LengthDimension::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay)
SketcherPrs_Tools::sendEmptyPresentationError(myConstraint,
}
}
SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
- AIS_LengthDimension::ComputeSelection(aSelection, aMode);
+ PrsDim_LengthDimension::ComputeSelection(aSelection, aMode);
}
void SketcherPrs_LengthDimension::setDirection(ModelAPI_Feature* theConstraint,
#include <GeomAPI_Ax3.h>
#include <ModelAPI_Feature.h>
-#include <AIS_LengthDimension.hxx>
+#include <PrsDim_LengthDimension.hxx>
#include <Standard_DefineHandle.hxx>
#include <SketchPlugin_Sketch.h>
#include <SketcherPrs_DimensionStyle.h>
-DEFINE_STANDARD_HANDLE(SketcherPrs_LengthDimension, AIS_LengthDimension)
+DEFINE_STANDARD_HANDLE(SketcherPrs_LengthDimension, PrsDim_LengthDimension)
/**
* \ingroup GUI
* A class for representation of linear dimension constraint.
* It supports SketchPlugin_ConstraintLength and SketchPlugin_ConstraintDistance features.
*/
-class SketcherPrs_LengthDimension : public AIS_LengthDimension
+class SketcherPrs_LengthDimension : public PrsDim_LengthDimension
{
public:
/// Constructor
/// Destructor
Standard_EXPORT ~SketcherPrs_LengthDimension();
- DEFINE_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, AIS_LengthDimension)
+ DEFINE_STANDARD_RTTIEXT(SketcherPrs_LengthDimension, PrsDim_LengthDimension)
/// Returns true if the constraint feature arguments are correcly filled
/// to build AIS presentation
static const gp_Circ MyDefCirc(gp_Ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1)), 1);
-IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension);
+IMPLEMENT_STANDARD_RTTIEXT(SketcherPrs_Radius, PrsDim_RadiusDimension);
SketcherPrs_Radius::SketcherPrs_Radius(ModelAPI_Feature* theConstraint,
SketchPlugin_Sketch* theSketcher)
-: AIS_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcher(theSketcher),
+: PrsDim_RadiusDimension(MyDefCirc), myConstraint(theConstraint), mySketcher(theSketcher),
myCircle(MyDefCirc),
myAnchorPoint(gp_Pnt(0, 0, 2)),
myValue(1, false, "")
(SketcherPrs_Tools::LocationType)(aLocAttr->value()) : SketcherPrs_Tools::LOCATION_AUTOMATIC;
updateArrows(DimensionAspect(), GetValue(), aTextSize, aLocationType);
- AIS_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
+ PrsDim_RadiusDimension::Compute(thePresentationManager, thePresentation, theMode);
if (!aReadyToDisplay)
SketcherPrs_Tools::sendEmptyPresentationError(myConstraint,
}
}
SetSelToleranceForText2d(SketcherPrs_Tools::getArrowSize()/5.);
- AIS_RadiusDimension::ComputeSelection(aSelection, aMode);
+ PrsDim_RadiusDimension::ComputeSelection(aSelection, aMode);
}
#include <ModelAPI_Feature.h>
#include <SketchPlugin_Sketch.h>
-#include <AIS_RadiusDimension.hxx>
+#include <PrsDim_RadiusDimension.hxx>
#include <Standard_DefineHandle.hxx>
#include <SketcherPrs_DimensionStyle.h>
-DEFINE_STANDARD_HANDLE(SketcherPrs_Radius, AIS_RadiusDimension)
+DEFINE_STANDARD_HANDLE(SketcherPrs_Radius, PrsDim_RadiusDimension)
/**
* \ingroup GUI
* A class for representation of radius constraint
*/
-class SketcherPrs_Radius : public AIS_RadiusDimension
+class SketcherPrs_Radius : public PrsDim_RadiusDimension
{
public:
/// Constructor
/// Destructor
Standard_EXPORT ~SketcherPrs_Radius();
- DEFINE_STANDARD_RTTIEXT(SketcherPrs_Radius, AIS_RadiusDimension)
+ DEFINE_STANDARD_RTTIEXT(SketcherPrs_Radius, PrsDim_RadiusDimension)
/// Returns true if the constraint feature arguments are correcly filled
/// to build AIS presentation
#include <BRep_Tool.hxx>
#include <Precision.hxx>
-#include <AIS_Dimension.hxx>
+#include <PrsDim_Dimension.hxx>
namespace SketcherPrs_Tools {
#include <AIS_ListOfInteractive.hxx>
#include <AIS_ListIteratorOfListOfInteractive.hxx>
#include <AIS_Shape.hxx>
-#include <AIS_Dimension.hxx>
#include <AIS_Trihedron.hxx>
#ifdef BEFORE_TRIHEDRON_PATCH
#include <AIS_Axis.hxx>
#include <AIS_Selection.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx>
+#include <PrsDim_Dimension.hxx>
#include <SelectMgr_ListOfFilter.hxx>
#include <SelectMgr_ListIteratorOfListOfFilter.hxx>
#include <SelectMgr_SelectionManager.hxx>