mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023709: Redesign of hlrtest command: vhlr and vhlrtype commands were added; hlr type changing was added to AIS_Shape, AIS_Drawer and Prs3d_Drawer
QuickHLR and ExactHLR items removed from AIS_DisplayMode enumeration as unused. Minor coding style and CDL documentation corrections applied. Compiler error in AIS_Shape::SetTypeOfHLR() corrected Corrections in HLR algorithm. Compiler error in AIS_Shape::TypeOfHLR() corrected Added test cases bugs vis bug23709_1/bug23709_2/bug23709_3/bug23709_4
This commit is contained in:
@@ -157,7 +157,7 @@ uses
|
||||
is
|
||||
|
||||
|
||||
enumeration DisplayMode is WireFrame, Shaded, QuickHLR, ExactHLR;
|
||||
enumeration DisplayMode is WireFrame, Shaded;
|
||||
---Purpose:
|
||||
-- Sets display modes other than neutral point ones,
|
||||
-- for interactive objects. The possibilities include:
|
||||
|
@@ -65,7 +65,8 @@ uses
|
||||
TypeOfDeflection from Aspect,
|
||||
NameOfColor from Quantity,
|
||||
PlaneAngle from Quantity,
|
||||
Length from Quantity
|
||||
Length from Quantity,
|
||||
TypeOfHLR from Prs3d
|
||||
|
||||
is
|
||||
Create returns mutable Drawer from AIS;
|
||||
@@ -124,8 +125,17 @@ is
|
||||
-- sets myOwnHLRDeviationAngle and myPreviousHLRDeviationAngle
|
||||
is redefined static;
|
||||
|
||||
SetTypeOfHLR(me: mutable; theTypeOfHLR: TypeOfHLR from Prs3d)
|
||||
is redefined;
|
||||
---Purpose: Sets the type of HLR algorithm
|
||||
-- used by drawer's interactive objects
|
||||
---C++: inline
|
||||
|
||||
|
||||
TypeOfHLR(me) returns TypeOfHLR from Prs3d
|
||||
is redefined;
|
||||
---Purpose: Returns the type of HLR algorithm currently in use.
|
||||
---C++: inline
|
||||
|
||||
DeviationCoefficient(me) returns Real from Standard
|
||||
---Purpose: Drawings of curves or patches are made with respect
|
||||
-- to a maximal chordal deviation. A Deviation coefficient
|
||||
@@ -626,9 +636,8 @@ fields
|
||||
|
||||
myhasOwnHLRDeviationAngle : Boolean from Standard;
|
||||
myOwnHLRDeviationAngle : Real from Standard;
|
||||
myPreviousHLRDeviationAngle : Real from Standard;
|
||||
|
||||
myHasOwnFaceBoundaryDraw : Boolean from Standard;
|
||||
myPreviousHLRDeviationAngle : Real from Standard;
|
||||
myHasOwnFaceBoundaryDraw : Boolean from Standard;
|
||||
end Drawer;
|
||||
|
||||
|
||||
|
@@ -31,6 +31,7 @@ myHasOwnFaceBoundaryDraw (Standard_False)
|
||||
{
|
||||
SetMaximalParameterValue(500000.);
|
||||
myLink->SetMaximalParameterValue(500000.);
|
||||
SetTypeOfHLR (Prs3d_TOH_NotSet);
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +105,6 @@ void AIS_Drawer::SetHLRAngle ( const Standard_Real anAngle )
|
||||
myhasOwnHLRDeviationAngle = Standard_True;
|
||||
}
|
||||
|
||||
|
||||
/////// Get
|
||||
//=======================================================================
|
||||
//function : DeviationCoefficient
|
||||
|
@@ -99,3 +99,13 @@ inline Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryDraw () const
|
||||
|
||||
inline Standard_Boolean AIS_Drawer::IsOwnFaceBoundaryAspect () const
|
||||
{ return !myFaceBoundaryAspect.IsNull (); }
|
||||
|
||||
inline void AIS_Drawer::SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)
|
||||
{
|
||||
myTypeOfHLR = theTypeOfHLR;
|
||||
}
|
||||
|
||||
inline Prs3d_TypeOfHLR AIS_Drawer::TypeOfHLR ( ) const
|
||||
{
|
||||
return (myTypeOfHLR == Prs3d_TOH_NotSet) ? myLink->TypeOfHLR() : myTypeOfHLR;
|
||||
}
|
||||
|
@@ -300,8 +300,6 @@ is
|
||||
-- The range of possibilities currently proposed is the following:
|
||||
-- - AIS_WireFrame
|
||||
-- - AIS_Shaded
|
||||
-- - AIS_QuickHLR
|
||||
-- - AIS_ExactHLR
|
||||
-- This range can, however, be extended through the creation of new display modes.
|
||||
|
||||
UnsetDisplayMode(me : mutable);
|
||||
@@ -315,8 +313,6 @@ is
|
||||
-- The range of possibilities is the following:
|
||||
-- - AIS_WireFrame
|
||||
-- - AIS_Shaded
|
||||
-- - AIS_QuickHLR
|
||||
-- - AIS_ExactHLR
|
||||
-- This range can, however, be extended through the
|
||||
-- creation of new display modes.
|
||||
|
||||
|
@@ -67,7 +67,8 @@ uses
|
||||
Selection from SelectMgr,
|
||||
KindOfInteractive from AIS,
|
||||
Transformation from Geom,
|
||||
Drawer from Prs3d
|
||||
Drawer from Prs3d,
|
||||
TypeOfHLR from Prs3d
|
||||
is
|
||||
|
||||
Create(shap: Shape from TopoDS)
|
||||
@@ -161,7 +162,13 @@ uses
|
||||
-- already set, false is returned.
|
||||
|
||||
|
||||
|
||||
SetTypeOfHLR(me: mutable; theTypeOfHLR: TypeOfHLR from Prs3d);
|
||||
---Purpose: Sets the type of HLR algorithm used by the shape
|
||||
---C++: inline
|
||||
|
||||
TypeOfHLR(me) returns TypeOfHLR from Prs3d;
|
||||
---Purpose: Gets the type of HLR algorithm
|
||||
---C++: inline
|
||||
|
||||
|
||||
---Category: Redefine Compute Methods...
|
||||
|
@@ -340,7 +340,15 @@ void AIS_Shape::Compute(const Handle(Prs3d_Projector)& aProjector,
|
||||
{
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
StdPrs_HLRPolyShape::Add(aPresentation,SH,myDrawer,aProjector);
|
||||
switch (TypeOfHLR()) {
|
||||
case Prs3d_TOH_Algo:
|
||||
StdPrs_HLRShape::Add (aPresentation, SH, myDrawer, aProjector);
|
||||
break;
|
||||
case Prs3d_TOH_PolyAlgo:
|
||||
default:
|
||||
StdPrs_HLRPolyShape::Add (aPresentation, SH, myDrawer, aProjector);
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
#ifdef DEB
|
||||
|
@@ -18,7 +18,7 @@
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
#include <AIS_Drawer.hxx>
|
||||
|
||||
inline void AIS_Shape::Set(const TopoDS_Shape& ashap)
|
||||
{
|
||||
@@ -32,3 +32,12 @@ AIS_Shape::Shape() const
|
||||
return myshape;
|
||||
}
|
||||
|
||||
inline void AIS_Shape::SetTypeOfHLR (const Prs3d_TypeOfHLR theTypeOfHLR)
|
||||
{
|
||||
myDrawer->SetTypeOfHLR (theTypeOfHLR);
|
||||
}
|
||||
|
||||
inline Prs3d_TypeOfHLR AIS_Shape::TypeOfHLR ( ) const
|
||||
{
|
||||
return myDrawer->TypeOfHLR();
|
||||
}
|
||||
|
Reference in New Issue
Block a user