1
0
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:
aba
2013-04-15 18:06:26 +04:00
parent d9e8bb0884
commit 0a768f5684
23 changed files with 554 additions and 215 deletions

View File

@@ -64,6 +64,16 @@ is
enumeration TypeOfLinePicking is TOLP_Point,
TOLP_Segment
end TypeOfLinePicking;
enumeration TypeOfHLR is TOH_NotSet,
TOH_PolyAlgo,
TOH_Algo;
---Purpose: Declares types of hidden line removal algorithm.
--TOH_Algo enables using of exact HLR algorithm.
--TOH_PolyAlgo enables using of polygonal HLR algorithm.
--TOH_NotSet is used by AIS_Drawer class, it means that the drawer should return the global value.
--For more details see AIS_Drawer class, AIS_Shape::Compute() method and
--HLRAlgo package from TKHLR toolkit.
class Presentation;
---Purpose: defines the presentation object. This object can be

View File

@@ -47,7 +47,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 Prs3d;
@@ -160,6 +161,15 @@ is
IsoOnPlane(me) returns Boolean from Standard
---Purpose: Returns True if the drawing of isos on planes is enabled.
is virtual;
SetTypeOfHLR(me: mutable; theTypeOfHLR: TypeOfHLR from Prs3d)
is virtual;
---Purpose: Sets the type of HLR algorithm
-- used by drawer's interactive objects
TypeOfHLR(me) returns TypeOfHLR from Prs3d
is virtual;
---Purpose: Gets the myTypeOfHLR value
--
@@ -561,7 +571,8 @@ fields
myLengthAspect: LengthAspect from Prs3d is protected;
myAngleAspect: AngleAspect from Prs3d is protected;
myRadiusAspect: RadiusAspect from Prs3d is protected;
mySectionAspect: LineAspect from Prs3d is protected;
myFaceBoundaryDraw : Boolean from Standard is protected;
myFaceBoundaryAspect : LineAspect from Prs3d is protected;
mySectionAspect: LineAspect from Prs3d is protected;
myFaceBoundaryDraw : Boolean from Standard is protected;
myFaceBoundaryAspect : LineAspect from Prs3d is protected;
myTypeOfHLR : TypeOfHLR from Prs3d is protected;
end Drawer;

View File

@@ -37,7 +37,8 @@ Prs3d_Drawer::Prs3d_Drawer(): myNbPoints(30),myIsoOnPlane(Standard_False),
myHLRAngle(20*M_PI/180),
myLineDrawArrow(Standard_False),
myDrawHiddenLine(Standard_False),
myFaceBoundaryDraw(Standard_False)
myFaceBoundaryDraw(Standard_False),
myTypeOfHLR(Prs3d_TOH_PolyAlgo)
{
}
@@ -481,3 +482,23 @@ Handle_Prs3d_LineAspect Prs3d_Drawer::FaceBoundaryAspect ()
return myFaceBoundaryAspect;
}
// =======================================================================
// function : SetTypeOfHLR
// purpose : set type of HLR algorithm
// =======================================================================
void Prs3d_Drawer::SetTypeOfHLR ( const Prs3d_TypeOfHLR theTypeOfHLR)
{
myTypeOfHLR = theTypeOfHLR;
}
// =======================================================================
// function : TypeOfHLR
// purpose : gets type of HLR algorithm
// =======================================================================
Prs3d_TypeOfHLR Prs3d_Drawer::TypeOfHLR ( ) const
{
return myTypeOfHLR;
}