mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0032027: Visualization, Prs3d_Drawer - unable to unset HasOwnFaceBoundaryDraw() property
Added missing Unset methods to Prs3d_Drawer properties.
This commit is contained in:
parent
894133a5ad
commit
d723356fca
@ -1068,25 +1068,25 @@ void Prs3d_Drawer::ClearLocalAttributes()
|
|||||||
myHasOwnFaceBoundaryAspect = Standard_False;
|
myHasOwnFaceBoundaryAspect = Standard_False;
|
||||||
myHasOwnDimensionAspect = Standard_False;
|
myHasOwnDimensionAspect = Standard_False;
|
||||||
|
|
||||||
myHasOwnNbPoints = Standard_False;
|
UnsetOwnDiscretisation();
|
||||||
myHasOwnMaximalParameterValue = Standard_False;
|
UnsetOwnMaximalParameterValue();
|
||||||
myHasOwnTypeOfDeflection = Standard_False;
|
UnsetOwnTypeOfDeflection();
|
||||||
myHasOwnChordialDeviation = Standard_False;
|
UnsetOwnMaximalChordialDeviation();
|
||||||
myHasOwnDeviationCoefficient = Standard_False;
|
SetDeviationCoefficient();
|
||||||
myHasOwnDeviationAngle = Standard_False;
|
SetDeviationAngle();
|
||||||
myHasOwnIsoOnPlane = Standard_False;
|
UnsetOwnIsoOnPlane();
|
||||||
myHasOwnIsoOnTriangulation = Standard_False;
|
UnsetOwnIsoOnTriangulation();
|
||||||
myHasOwnIsAutoTriangulated = Standard_False;
|
UnsetOwnIsAutoTriangulation();
|
||||||
myHasOwnWireDraw = Standard_False;
|
UnsetOwnWireDraw();
|
||||||
myHasOwnLineArrowDraw = Standard_False;
|
UnsetOwnLineArrowDraw();
|
||||||
myHasOwnDrawHiddenLine = Standard_False;
|
UnsetOwnDrawHiddenLine();
|
||||||
myHasOwnFreeBoundaryDraw = Standard_False;
|
UnsetOwnFreeBoundaryDraw();
|
||||||
myHasOwnUnFreeBoundaryDraw = Standard_False;
|
UnsetOwnUnFreeBoundaryDraw();
|
||||||
myHasOwnFaceBoundaryDraw = Standard_False;
|
UnsetOwnFaceBoundaryDraw();
|
||||||
myHasOwnDimLengthModelUnits = Standard_False;
|
UnsetOwnDimLengthModelUnits();
|
||||||
myHasOwnDimLengthDisplayUnits = Standard_False;
|
UnsetOwnDimLengthDisplayUnits();
|
||||||
myHasOwnDimAngleModelUnits = Standard_False;
|
UnsetOwnDimAngleModelUnits();
|
||||||
myHasOwnDimAngleDisplayUnits = Standard_False;
|
UnsetOwnDimAngleDisplayUnits();
|
||||||
|
|
||||||
myVertexDrawMode = Prs3d_VDM_Inherited;
|
myVertexDrawMode = Prs3d_VDM_Inherited;
|
||||||
myTypeOfHLR = Prs3d_TOH_NotSet;
|
myTypeOfHLR = Prs3d_TOH_NotSet;
|
||||||
|
@ -63,7 +63,7 @@ public:
|
|||||||
//! This indicates whether the deflection value is absolute or relative to the size of the object.
|
//! This indicates whether the deflection value is absolute or relative to the size of the object.
|
||||||
Aspect_TypeOfDeflection TypeOfDeflection() const
|
Aspect_TypeOfDeflection TypeOfDeflection() const
|
||||||
{
|
{
|
||||||
return HasOwnTypeOfDeflection() || myLink.IsNull()
|
return myHasOwnTypeOfDeflection || myLink.IsNull()
|
||||||
? myTypeOfDeflection
|
? myTypeOfDeflection
|
||||||
: myLink->TypeOfDeflection();
|
: myLink->TypeOfDeflection();
|
||||||
}
|
}
|
||||||
@ -71,6 +71,13 @@ public:
|
|||||||
//! Returns true if the drawer has a type of deflection setting active.
|
//! Returns true if the drawer has a type of deflection setting active.
|
||||||
Standard_Boolean HasOwnTypeOfDeflection() const { return myHasOwnTypeOfDeflection; }
|
Standard_Boolean HasOwnTypeOfDeflection() const { return myHasOwnTypeOfDeflection; }
|
||||||
|
|
||||||
|
//! Resets HasOwnTypeOfDeflection() flag, e.g. undoes SetTypeOfDeflection().
|
||||||
|
void UnsetOwnTypeOfDeflection()
|
||||||
|
{
|
||||||
|
myHasOwnTypeOfDeflection = false;
|
||||||
|
myTypeOfDeflection = Aspect_TOD_RELATIVE;
|
||||||
|
}
|
||||||
|
|
||||||
//! Defines the maximal chordial deviation when drawing any curve.
|
//! Defines the maximal chordial deviation when drawing any curve.
|
||||||
//! Even if the type of deviation is set to TOD_Relative, this value is used by:
|
//! Even if the type of deviation is set to TOD_Relative, this value is used by:
|
||||||
//! Prs3d_DeflectionCurve
|
//! Prs3d_DeflectionCurve
|
||||||
@ -82,7 +89,7 @@ public:
|
|||||||
//! Drawings of curves or patches are made with respect to an absolute maximal chordal deviation.
|
//! Drawings of curves or patches are made with respect to an absolute maximal chordal deviation.
|
||||||
Standard_Real MaximalChordialDeviation() const
|
Standard_Real MaximalChordialDeviation() const
|
||||||
{
|
{
|
||||||
return HasOwnMaximalChordialDeviation() || myLink.IsNull()
|
return myHasOwnChordialDeviation || myLink.IsNull()
|
||||||
? myChordialDeviation
|
? myChordialDeviation
|
||||||
: myLink->MaximalChordialDeviation();
|
: myLink->MaximalChordialDeviation();
|
||||||
}
|
}
|
||||||
@ -90,6 +97,13 @@ public:
|
|||||||
//! Returns true if the drawer has a maximal chordial deviation setting active.
|
//! Returns true if the drawer has a maximal chordial deviation setting active.
|
||||||
Standard_Boolean HasOwnMaximalChordialDeviation() const { return myHasOwnChordialDeviation; }
|
Standard_Boolean HasOwnMaximalChordialDeviation() const { return myHasOwnChordialDeviation; }
|
||||||
|
|
||||||
|
//! Resets HasOwnMaximalChordialDeviation() flag, e.g. undoes SetMaximalChordialDeviation().
|
||||||
|
void UnsetOwnMaximalChordialDeviation()
|
||||||
|
{
|
||||||
|
myHasOwnChordialDeviation = false;
|
||||||
|
myChordialDeviation = 0.0001;
|
||||||
|
}
|
||||||
|
|
||||||
//! Sets the type of HLR algorithm used by drawer's interactive objects
|
//! Sets the type of HLR algorithm used by drawer's interactive objects
|
||||||
Standard_EXPORT void SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR);
|
Standard_EXPORT void SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR);
|
||||||
|
|
||||||
@ -107,7 +121,7 @@ public:
|
|||||||
//! parameters of an infinite curve. By default, this value is 500000.
|
//! parameters of an infinite curve. By default, this value is 500000.
|
||||||
Standard_Real MaximalParameterValue() const
|
Standard_Real MaximalParameterValue() const
|
||||||
{
|
{
|
||||||
return HasOwnMaximalParameterValue() || myLink.IsNull()
|
return myHasOwnMaximalParameterValue || myLink.IsNull()
|
||||||
? myMaximalParameterValue
|
? myMaximalParameterValue
|
||||||
: myLink->MaximalParameterValue();
|
: myLink->MaximalParameterValue();
|
||||||
}
|
}
|
||||||
@ -116,13 +130,20 @@ public:
|
|||||||
//! parameters of an infinite curve setting active.
|
//! parameters of an infinite curve setting active.
|
||||||
Standard_Boolean HasOwnMaximalParameterValue() const { return myHasOwnMaximalParameterValue; }
|
Standard_Boolean HasOwnMaximalParameterValue() const { return myHasOwnMaximalParameterValue; }
|
||||||
|
|
||||||
|
//! Resets HasOwnMaximalParameterValue() flag, e.g. undoes SetMaximalParameterValue().
|
||||||
|
void UnsetOwnMaximalParameterValue()
|
||||||
|
{
|
||||||
|
myHasOwnMaximalParameterValue = false;
|
||||||
|
myMaximalParameterValue = 500000.0;
|
||||||
|
}
|
||||||
|
|
||||||
//! Sets IsoOnPlane on or off by setting the parameter theIsEnabled to true or false.
|
//! Sets IsoOnPlane on or off by setting the parameter theIsEnabled to true or false.
|
||||||
Standard_EXPORT void SetIsoOnPlane (const Standard_Boolean theIsEnabled);
|
Standard_EXPORT void SetIsoOnPlane (const Standard_Boolean theIsEnabled);
|
||||||
|
|
||||||
//! Returns True if the drawing of isos on planes is enabled.
|
//! Returns True if the drawing of isos on planes is enabled.
|
||||||
Standard_Boolean IsoOnPlane() const
|
Standard_Boolean IsoOnPlane() const
|
||||||
{
|
{
|
||||||
return HasOwnIsoOnPlane() || myLink.IsNull()
|
return myHasOwnIsoOnPlane || myLink.IsNull()
|
||||||
? myIsoOnPlane
|
? myIsoOnPlane
|
||||||
: myLink->IsoOnPlane();
|
: myLink->IsoOnPlane();
|
||||||
}
|
}
|
||||||
@ -130,10 +151,17 @@ public:
|
|||||||
//! Returns true if the drawer has IsoOnPlane setting active.
|
//! Returns true if the drawer has IsoOnPlane setting active.
|
||||||
Standard_Boolean HasOwnIsoOnPlane() const { return myHasOwnIsoOnPlane; }
|
Standard_Boolean HasOwnIsoOnPlane() const { return myHasOwnIsoOnPlane; }
|
||||||
|
|
||||||
|
//! Resets HasOwnIsoOnPlane() flag, e.g. undoes SetIsoOnPlane().
|
||||||
|
void UnsetOwnIsoOnPlane()
|
||||||
|
{
|
||||||
|
myHasOwnIsoOnPlane = false;
|
||||||
|
myIsoOnPlane = false;
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns True if the drawing of isos on triangulation is enabled.
|
//! Returns True if the drawing of isos on triangulation is enabled.
|
||||||
Standard_Boolean IsoOnTriangulation() const
|
Standard_Boolean IsoOnTriangulation() const
|
||||||
{
|
{
|
||||||
return HasOwnIsoOnTriangulation() || myLink.IsNull()
|
return myHasOwnIsoOnTriangulation || myLink.IsNull()
|
||||||
? myIsoOnTriangulation
|
? myIsoOnTriangulation
|
||||||
: myLink->IsoOnTriangulation();
|
: myLink->IsoOnTriangulation();
|
||||||
}
|
}
|
||||||
@ -141,6 +169,13 @@ public:
|
|||||||
//! Returns true if the drawer has IsoOnTriangulation setting active.
|
//! Returns true if the drawer has IsoOnTriangulation setting active.
|
||||||
Standard_Boolean HasOwnIsoOnTriangulation() const { return myHasOwnIsoOnTriangulation; }
|
Standard_Boolean HasOwnIsoOnTriangulation() const { return myHasOwnIsoOnTriangulation; }
|
||||||
|
|
||||||
|
//! Resets HasOwnIsoOnTriangulation() flag, e.g. undoes SetIsoOnTriangulation().
|
||||||
|
void UnsetOwnIsoOnTriangulation()
|
||||||
|
{
|
||||||
|
myHasOwnIsoOnTriangulation = false;
|
||||||
|
myIsoOnTriangulation = false;
|
||||||
|
}
|
||||||
|
|
||||||
//! Enables or disables isolines on triangulation by setting the parameter theIsEnabled to true or false.
|
//! Enables or disables isolines on triangulation by setting the parameter theIsEnabled to true or false.
|
||||||
Standard_EXPORT void SetIsoOnTriangulation (const Standard_Boolean theToEnable);
|
Standard_EXPORT void SetIsoOnTriangulation (const Standard_Boolean theToEnable);
|
||||||
|
|
||||||
@ -150,7 +185,7 @@ public:
|
|||||||
//! Returns the discretisation setting.
|
//! Returns the discretisation setting.
|
||||||
Standard_Integer Discretisation() const
|
Standard_Integer Discretisation() const
|
||||||
{
|
{
|
||||||
return HasOwnDiscretisation() || myLink.IsNull()
|
return myHasOwnNbPoints || myLink.IsNull()
|
||||||
? myNbPoints
|
? myNbPoints
|
||||||
: myLink->Discretisation();
|
: myLink->Discretisation();
|
||||||
}
|
}
|
||||||
@ -158,6 +193,13 @@ public:
|
|||||||
//! Returns true if the drawer has discretisation setting active.
|
//! Returns true if the drawer has discretisation setting active.
|
||||||
Standard_Boolean HasOwnDiscretisation() const { return myHasOwnNbPoints; }
|
Standard_Boolean HasOwnDiscretisation() const { return myHasOwnNbPoints; }
|
||||||
|
|
||||||
|
//! Resets HasOwnDiscretisation() flag, e.g. undoes SetDiscretisation().
|
||||||
|
void UnsetOwnDiscretisation()
|
||||||
|
{
|
||||||
|
myHasOwnNbPoints = false;
|
||||||
|
myNbPoints = 30;
|
||||||
|
}
|
||||||
|
|
||||||
//! Sets the deviation coefficient theCoefficient.
|
//! Sets the deviation coefficient theCoefficient.
|
||||||
//! Also sets the hasOwnDeviationCoefficient flag to Standard_True and myPreviousDeviationCoefficient
|
//! Also sets the hasOwnDeviationCoefficient flag to Standard_True and myPreviousDeviationCoefficient
|
||||||
Standard_EXPORT void SetDeviationCoefficient (const Standard_Real theCoefficient);
|
Standard_EXPORT void SetDeviationCoefficient (const Standard_Real theCoefficient);
|
||||||
@ -185,10 +227,11 @@ public:
|
|||||||
: myLink->DeviationCoefficient();
|
: myLink->DeviationCoefficient();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Sets the hasOwnDeviationCoefficient flag to Standard_False
|
//! Resets HasOwnDeviationCoefficient() flag, e.g. undoes previous SetDeviationCoefficient().
|
||||||
void SetDeviationCoefficient()
|
void SetDeviationCoefficient()
|
||||||
{
|
{
|
||||||
myHasOwnDeviationCoefficient = Standard_False;
|
myHasOwnDeviationCoefficient = Standard_False;
|
||||||
|
myDeviationCoefficient = 0.001;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Returns true if there is a local setting for deviation
|
//! Returns true if there is a local setting for deviation
|
||||||
@ -225,10 +268,11 @@ public:
|
|||||||
: myLink->DeviationAngle();
|
: myLink->DeviationAngle();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Sets the hasOwnDeviationAngle flag to Standard_False
|
//! Resets HasOwnDeviationAngle() flag, e.g. undoes previous SetDeviationAngle().
|
||||||
void SetDeviationAngle()
|
void SetDeviationAngle()
|
||||||
{
|
{
|
||||||
myHasOwnDeviationAngle = Standard_False;
|
myHasOwnDeviationAngle = Standard_False;
|
||||||
|
myDeviationAngle = 20.0 * M_PI / 180.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Returns true if the there is a local setting for deviation
|
//! Returns true if the there is a local setting for deviation
|
||||||
@ -261,7 +305,7 @@ public:
|
|||||||
//! Returns True if automatic triangulation is enabled.
|
//! Returns True if automatic triangulation is enabled.
|
||||||
Standard_Boolean IsAutoTriangulation() const
|
Standard_Boolean IsAutoTriangulation() const
|
||||||
{
|
{
|
||||||
return HasOwnIsAutoTriangulation() || myLink.IsNull()
|
return myHasOwnIsAutoTriangulated || myLink.IsNull()
|
||||||
? myIsAutoTriangulated
|
? myIsAutoTriangulated
|
||||||
: myLink->IsAutoTriangulation();
|
: myLink->IsAutoTriangulation();
|
||||||
}
|
}
|
||||||
@ -269,6 +313,13 @@ public:
|
|||||||
//! Returns true if the drawer has IsoOnPlane setting active.
|
//! Returns true if the drawer has IsoOnPlane setting active.
|
||||||
Standard_Boolean HasOwnIsAutoTriangulation() const { return myHasOwnIsAutoTriangulated; }
|
Standard_Boolean HasOwnIsAutoTriangulation() const { return myHasOwnIsAutoTriangulated; }
|
||||||
|
|
||||||
|
//! Resets HasOwnIsAutoTriangulation() flag, e.g. undoes SetAutoTriangulation().
|
||||||
|
void UnsetOwnIsAutoTriangulation()
|
||||||
|
{
|
||||||
|
myHasOwnIsAutoTriangulated = false;
|
||||||
|
myIsAutoTriangulated = true;
|
||||||
|
}
|
||||||
|
|
||||||
//! Defines the attributes which are used when drawing an
|
//! Defines the attributes which are used when drawing an
|
||||||
//! U isoparametric curve of a face. Defines the number
|
//! U isoparametric curve of a face. Defines the number
|
||||||
//! of U isoparametric curves to be drawn for a single face.
|
//! of U isoparametric curves to be drawn for a single face.
|
||||||
@ -334,7 +385,7 @@ public:
|
|||||||
//! Returns True if the drawing of the wire is enabled.
|
//! Returns True if the drawing of the wire is enabled.
|
||||||
Standard_Boolean WireDraw() const
|
Standard_Boolean WireDraw() const
|
||||||
{
|
{
|
||||||
return HasOwnWireDraw() || myLink.IsNull()
|
return myHasOwnWireDraw || myLink.IsNull()
|
||||||
? myWireDraw
|
? myWireDraw
|
||||||
: myLink->WireDraw();
|
: myLink->WireDraw();
|
||||||
}
|
}
|
||||||
@ -343,6 +394,13 @@ public:
|
|||||||
//! "draw wires" flag that overrides the one in the link.
|
//! "draw wires" flag that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnWireDraw() const { return myHasOwnWireDraw; }
|
Standard_Boolean HasOwnWireDraw() const { return myHasOwnWireDraw; }
|
||||||
|
|
||||||
|
//! Resets HasOwnWireDraw() flag, e.g. undoes SetWireDraw().
|
||||||
|
void UnsetOwnWireDraw()
|
||||||
|
{
|
||||||
|
myHasOwnWireDraw = false;
|
||||||
|
myWireDraw = true;
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns the point aspect setting. The default values are
|
//! Returns the point aspect setting. The default values are
|
||||||
//! Color: Quantity_NOC_YELLOW
|
//! Color: Quantity_NOC_YELLOW
|
||||||
//! Type of marker: Aspect_TOM_PLUS
|
//! Type of marker: Aspect_TOM_PLUS
|
||||||
@ -463,16 +521,20 @@ public:
|
|||||||
//! and False otherwise (the default).
|
//! and False otherwise (the default).
|
||||||
Standard_Boolean LineArrowDraw() const
|
Standard_Boolean LineArrowDraw() const
|
||||||
{
|
{
|
||||||
return HasOwnLineArrowDraw() || myLink.IsNull()
|
return myHasOwnLineArrowDraw || myLink.IsNull()
|
||||||
? myLineArrowDraw
|
? myLineArrowDraw
|
||||||
: myLink->LineArrowDraw();
|
: myLink->LineArrowDraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Returns true if the drawer has its own attribute for
|
//! Returns true if the drawer has its own attribute for
|
||||||
//! "draw arrow" flag that overrides the one in the link.
|
//! "draw arrow" flag that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnLineArrowDraw() const
|
Standard_Boolean HasOwnLineArrowDraw() const { return myHasOwnLineArrowDraw; }
|
||||||
|
|
||||||
|
//! Reset HasOwnLineArrowDraw() flag, e.g. undoes SetLineArrowDraw().
|
||||||
|
void UnsetOwnLineArrowDraw()
|
||||||
{
|
{
|
||||||
return myHasOwnLineArrowDraw;
|
myHasOwnLineArrowDraw = false;
|
||||||
|
myLineArrowDraw = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Returns settings for hidden line aspects.
|
//! Returns settings for hidden line aspects.
|
||||||
@ -493,7 +555,7 @@ public:
|
|||||||
//! By default the hidden lines are not drawn.
|
//! By default the hidden lines are not drawn.
|
||||||
Standard_Boolean DrawHiddenLine() const
|
Standard_Boolean DrawHiddenLine() const
|
||||||
{
|
{
|
||||||
return HasOwnDrawHiddenLine() || myLink.IsNull()
|
return myHasOwnDrawHiddenLine || myLink.IsNull()
|
||||||
? myDrawHiddenLine
|
? myDrawHiddenLine
|
||||||
: myLink->DrawHiddenLine();
|
: myLink->DrawHiddenLine();
|
||||||
}
|
}
|
||||||
@ -508,6 +570,13 @@ public:
|
|||||||
//! "draw hidden lines" flag that overrides the one in the link.
|
//! "draw hidden lines" flag that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnDrawHiddenLine() const { return myHasOwnDrawHiddenLine; }
|
Standard_Boolean HasOwnDrawHiddenLine() const { return myHasOwnDrawHiddenLine; }
|
||||||
|
|
||||||
|
//! Resets HasOwnDrawHiddenLine() flag, e.g. unsets EnableDrawHiddenLine()/DisableDrawHiddenLine().
|
||||||
|
void UnsetOwnDrawHiddenLine()
|
||||||
|
{
|
||||||
|
myHasOwnDrawHiddenLine = false;
|
||||||
|
myDrawHiddenLine = false;
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns settings for the appearance of vectors.
|
//! Returns settings for the appearance of vectors.
|
||||||
//! These settings can be edited. The default values are:
|
//! These settings can be edited. The default values are:
|
||||||
//! Color: Quantity_NOC_SKYBLUE
|
//! Color: Quantity_NOC_SKYBLUE
|
||||||
@ -597,7 +666,7 @@ public:
|
|||||||
//! True is the default setting.
|
//! True is the default setting.
|
||||||
Standard_Boolean FreeBoundaryDraw() const
|
Standard_Boolean FreeBoundaryDraw() const
|
||||||
{
|
{
|
||||||
return HasOwnFreeBoundaryDraw() || myLink.IsNull()
|
return myHasOwnFreeBoundaryDraw || myLink.IsNull()
|
||||||
? myFreeBoundaryDraw
|
? myFreeBoundaryDraw
|
||||||
: myLink->FreeBoundaryDraw();
|
: myLink->FreeBoundaryDraw();
|
||||||
}
|
}
|
||||||
@ -606,6 +675,13 @@ public:
|
|||||||
//! "draw free boundaries" flag that overrides the one in the link.
|
//! "draw free boundaries" flag that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnFreeBoundaryDraw() const { return myHasOwnFreeBoundaryDraw; }
|
Standard_Boolean HasOwnFreeBoundaryDraw() const { return myHasOwnFreeBoundaryDraw; }
|
||||||
|
|
||||||
|
//! Resets HasOwnFreeBoundaryDraw() flag, e.g. undoes SetFreeBoundaryDraw().
|
||||||
|
void UnsetOwnFreeBoundaryDraw()
|
||||||
|
{
|
||||||
|
myHasOwnFreeBoundaryDraw = false;
|
||||||
|
myFreeBoundaryDraw = true;
|
||||||
|
}
|
||||||
|
|
||||||
//! Sets the parameter theAspect for the display of shared boundaries.
|
//! Sets the parameter theAspect for the display of shared boundaries.
|
||||||
//! The method sets aspect owned by the drawer that will be used during
|
//! The method sets aspect owned by the drawer that will be used during
|
||||||
//! visualization instead of the one set in link.
|
//! visualization instead of the one set in link.
|
||||||
@ -634,7 +710,7 @@ public:
|
|||||||
//! True is the default setting.
|
//! True is the default setting.
|
||||||
Standard_Boolean UnFreeBoundaryDraw() const
|
Standard_Boolean UnFreeBoundaryDraw() const
|
||||||
{
|
{
|
||||||
return HasOwnUnFreeBoundaryDraw() || myLink.IsNull()
|
return myHasOwnUnFreeBoundaryDraw || myLink.IsNull()
|
||||||
? myUnFreeBoundaryDraw
|
? myUnFreeBoundaryDraw
|
||||||
: myLink->UnFreeBoundaryDraw();
|
: myLink->UnFreeBoundaryDraw();
|
||||||
}
|
}
|
||||||
@ -643,6 +719,13 @@ public:
|
|||||||
//! "draw shared boundaries" flag that overrides the one in the link.
|
//! "draw shared boundaries" flag that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnUnFreeBoundaryDraw() const { return myHasOwnUnFreeBoundaryDraw; }
|
Standard_Boolean HasOwnUnFreeBoundaryDraw() const { return myHasOwnUnFreeBoundaryDraw; }
|
||||||
|
|
||||||
|
//! Resets HasOwnUnFreeBoundaryDraw() flag, e.g. undoes SetUnFreeBoundaryDraw().
|
||||||
|
void UnsetOwnUnFreeBoundaryDraw()
|
||||||
|
{
|
||||||
|
myHasOwnUnFreeBoundaryDraw = false;
|
||||||
|
myUnFreeBoundaryDraw = true;
|
||||||
|
}
|
||||||
|
|
||||||
//! Sets line aspect for face boundaries.
|
//! Sets line aspect for face boundaries.
|
||||||
//! The method sets line aspect owned by the drawer that will be used during
|
//! The method sets line aspect owned by the drawer that will be used during
|
||||||
//! visualization instead of the one set in link.
|
//! visualization instead of the one set in link.
|
||||||
@ -669,7 +752,7 @@ public:
|
|||||||
//! Checks whether the face boundary drawing is enabled or not.
|
//! Checks whether the face boundary drawing is enabled or not.
|
||||||
Standard_Boolean FaceBoundaryDraw() const
|
Standard_Boolean FaceBoundaryDraw() const
|
||||||
{
|
{
|
||||||
return HasOwnFaceBoundaryDraw() || myLink.IsNull()
|
return myHasOwnFaceBoundaryDraw || myLink.IsNull()
|
||||||
? myFaceBoundaryDraw
|
? myFaceBoundaryDraw
|
||||||
: myLink->FaceBoundaryDraw();
|
: myLink->FaceBoundaryDraw();
|
||||||
}
|
}
|
||||||
@ -678,6 +761,13 @@ public:
|
|||||||
//! "draw face boundaries" flag that overrides the one in the link.
|
//! "draw face boundaries" flag that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnFaceBoundaryDraw() const { return myHasOwnFaceBoundaryDraw; }
|
Standard_Boolean HasOwnFaceBoundaryDraw() const { return myHasOwnFaceBoundaryDraw; }
|
||||||
|
|
||||||
|
//! Resets HasOwnFaceBoundaryDraw() flag, e.g. undoes SetFaceBoundaryDraw().
|
||||||
|
void UnsetOwnFaceBoundaryDraw()
|
||||||
|
{
|
||||||
|
myHasOwnFaceBoundaryDraw = false;
|
||||||
|
myFaceBoundaryDraw = false;
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns true if the drawer has its own attribute for face boundaries upper edge continuity class that overrides the one in the link.
|
//! Returns true if the drawer has its own attribute for face boundaries upper edge continuity class that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnFaceBoundaryUpperContinuity() const { return myFaceBoundaryUpperContinuity != -1; }
|
Standard_Boolean HasOwnFaceBoundaryUpperContinuity() const { return myFaceBoundaryUpperContinuity != -1; }
|
||||||
|
|
||||||
@ -722,7 +812,7 @@ public:
|
|||||||
//! Returns length model units for the dimension presentation.
|
//! Returns length model units for the dimension presentation.
|
||||||
const TCollection_AsciiString& DimLengthModelUnits() const
|
const TCollection_AsciiString& DimLengthModelUnits() const
|
||||||
{
|
{
|
||||||
return HasOwnDimLengthModelUnits() || myLink.IsNull()
|
return myHasOwnDimLengthModelUnits || myLink.IsNull()
|
||||||
? myDimensionModelUnits.GetLengthUnits()
|
? myDimensionModelUnits.GetLengthUnits()
|
||||||
: myLink->DimLengthModelUnits();
|
: myLink->DimLengthModelUnits();
|
||||||
}
|
}
|
||||||
@ -730,7 +820,7 @@ public:
|
|||||||
//! Returns angle model units for the dimension presentation.
|
//! Returns angle model units for the dimension presentation.
|
||||||
const TCollection_AsciiString& DimAngleModelUnits() const
|
const TCollection_AsciiString& DimAngleModelUnits() const
|
||||||
{
|
{
|
||||||
return HasOwnDimAngleModelUnits() || myLink.IsNull()
|
return myHasOwnDimAngleModelUnits || myLink.IsNull()
|
||||||
? myDimensionModelUnits.GetAngleUnits()
|
? myDimensionModelUnits.GetAngleUnits()
|
||||||
: myLink->DimAngleModelUnits();
|
: myLink->DimAngleModelUnits();
|
||||||
}
|
}
|
||||||
@ -739,10 +829,24 @@ public:
|
|||||||
//! dimension length model units that overrides the one in the link.
|
//! dimension length model units that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnDimLengthModelUnits() const { return myHasOwnDimLengthModelUnits; }
|
Standard_Boolean HasOwnDimLengthModelUnits() const { return myHasOwnDimLengthModelUnits; }
|
||||||
|
|
||||||
|
//! Resets HasOwnDimLengthModelUnits() flag, e.g. undoes SetDimLengthModelUnits().
|
||||||
|
void UnsetOwnDimLengthModelUnits()
|
||||||
|
{
|
||||||
|
myHasOwnDimLengthModelUnits = false;
|
||||||
|
myDimensionModelUnits.SetLengthUnits ("m");
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns true if the drawer has its own attribute for
|
//! Returns true if the drawer has its own attribute for
|
||||||
//! dimension angle model units that overrides the one in the link.
|
//! dimension angle model units that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnDimAngleModelUnits() const { return myHasOwnDimAngleModelUnits; }
|
Standard_Boolean HasOwnDimAngleModelUnits() const { return myHasOwnDimAngleModelUnits; }
|
||||||
|
|
||||||
|
//! Resets HasOwnDimAngleModelUnits() flag, e.g. undoes SetDimAngleModelUnits().
|
||||||
|
void UnsetOwnDimAngleModelUnits()
|
||||||
|
{
|
||||||
|
myHasOwnDimAngleModelUnits = false;
|
||||||
|
myDimensionModelUnits.SetAngleUnits ("rad");
|
||||||
|
}
|
||||||
|
|
||||||
//! Sets length units in which value for dimension presentation is displayed.
|
//! Sets length units in which value for dimension presentation is displayed.
|
||||||
//! The method sets value owned by the drawer that will be used during
|
//! The method sets value owned by the drawer that will be used during
|
||||||
//! visualization instead of the one set in link.
|
//! visualization instead of the one set in link.
|
||||||
@ -756,7 +860,7 @@ public:
|
|||||||
//! Returns length units in which dimension presentation is displayed.
|
//! Returns length units in which dimension presentation is displayed.
|
||||||
const TCollection_AsciiString& DimLengthDisplayUnits() const
|
const TCollection_AsciiString& DimLengthDisplayUnits() const
|
||||||
{
|
{
|
||||||
return HasOwnDimLengthDisplayUnits() || myLink.IsNull()
|
return myHasOwnDimLengthDisplayUnits || myLink.IsNull()
|
||||||
? myDimensionDisplayUnits.GetLengthUnits()
|
? myDimensionDisplayUnits.GetLengthUnits()
|
||||||
: myLink->DimLengthDisplayUnits();
|
: myLink->DimLengthDisplayUnits();
|
||||||
}
|
}
|
||||||
@ -764,7 +868,7 @@ public:
|
|||||||
//! Returns angle units in which dimension presentation is displayed.
|
//! Returns angle units in which dimension presentation is displayed.
|
||||||
const TCollection_AsciiString& DimAngleDisplayUnits() const
|
const TCollection_AsciiString& DimAngleDisplayUnits() const
|
||||||
{
|
{
|
||||||
return HasOwnDimAngleDisplayUnits() || myLink.IsNull()
|
return myHasOwnDimAngleDisplayUnits || myLink.IsNull()
|
||||||
? myDimensionDisplayUnits.GetAngleUnits()
|
? myDimensionDisplayUnits.GetAngleUnits()
|
||||||
: myLink->DimAngleDisplayUnits();
|
: myLink->DimAngleDisplayUnits();
|
||||||
}
|
}
|
||||||
@ -774,11 +878,27 @@ public:
|
|||||||
//! that overrides the one in the link.
|
//! that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnDimLengthDisplayUnits() const { return myHasOwnDimLengthDisplayUnits; }
|
Standard_Boolean HasOwnDimLengthDisplayUnits() const { return myHasOwnDimLengthDisplayUnits; }
|
||||||
|
|
||||||
|
//! Resets HasOwnDimLengthModelUnits() flag, e.g. undoes SetDimLengthDisplayUnits().
|
||||||
|
void UnsetOwnDimLengthDisplayUnits()
|
||||||
|
{
|
||||||
|
myHasOwnDimLengthDisplayUnits = false;
|
||||||
|
myDimensionDisplayUnits.SetLengthUnits ("m");
|
||||||
|
}
|
||||||
|
|
||||||
//! Returns true if the drawer has its own attribute for
|
//! Returns true if the drawer has its own attribute for
|
||||||
//! angle units in which dimension presentation is displayed
|
//! angle units in which dimension presentation is displayed
|
||||||
//! that overrides the one in the link.
|
//! that overrides the one in the link.
|
||||||
Standard_Boolean HasOwnDimAngleDisplayUnits() const { return myHasOwnDimAngleDisplayUnits; }
|
Standard_Boolean HasOwnDimAngleDisplayUnits() const { return myHasOwnDimAngleDisplayUnits; }
|
||||||
|
|
||||||
|
//! Resets HasOwnDimAngleDisplayUnits() flag, e.g. undoes SetDimLengthDisplayUnits().
|
||||||
|
void UnsetOwnDimAngleDisplayUnits()
|
||||||
|
{
|
||||||
|
myHasOwnDimAngleDisplayUnits = false;
|
||||||
|
myDimensionDisplayUnits.SetAngleUnits ("deg");
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
//! Returns the drawer to which the current object references.
|
//! Returns the drawer to which the current object references.
|
||||||
const Handle(Prs3d_Drawer)& Link() { return myLink; }
|
const Handle(Prs3d_Drawer)& Link() { return myLink; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user