mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0023407: Draw face outlines for XDE objects
FaceOutline aspect and flag added to AIS_Drawer, Prs3d_Drawer.cdl FaceOutlines computed by StdPrs_ShadedShape and build upon the edge triangulation. "vshowoutlines" draw command for testing outlines on AIS_Shapes, "XShowOutlines" draw command for testing outlines on XCAF objects. remarks corrected: - FaceOutline renamed to FaceBoundary - Graphic3d_ArrayOfSegments with edges used instead of Graphic3d_ArrayOfPolylines with bounds. draw boundaries in separate Graphic3d_Group. Adding test cases bugs/vis/CR23407_1 CR23407_2
This commit is contained in:
@@ -502,6 +502,27 @@ is
|
||||
is virtual;
|
||||
---Purpose: Sets the parameter anAspect for display attributes of sections.
|
||||
|
||||
SetFaceBoundaryDraw (me : mutable;
|
||||
theIsEnabled : Boolean from Standard)
|
||||
is virtual;
|
||||
---Purpose: Enables or disables face boundary drawing for shading presentations.
|
||||
-- theIsEnabled is a boolean flag indicating whether the face boundaries should be
|
||||
-- drawn or not.
|
||||
|
||||
IsFaceBoundaryDraw (me) returns Boolean from Standard
|
||||
is virtual;
|
||||
---Purpose: Checks whether the face boundary drawing is enabled or not.
|
||||
|
||||
SetFaceBoundaryAspect (me : mutable;
|
||||
theAspect : LineAspect from Prs3d)
|
||||
is virtual;
|
||||
---Purpose: Sets line aspect for face boundaries.
|
||||
-- theAspect is the line aspect that determines the look of the face boundaries.
|
||||
|
||||
FaceBoundaryAspect (me : mutable) returns mutable LineAspect from Prs3d
|
||||
is virtual;
|
||||
---Purpose: Returns line aspect of face boundaries.
|
||||
|
||||
fields
|
||||
myUIsoAspect: IsoAspect from Prs3d is protected;
|
||||
myVIsoAspect: IsoAspect from Prs3d is protected;
|
||||
@@ -541,4 +562,6 @@ fields
|
||||
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;
|
||||
end Drawer;
|
||||
|
@@ -36,7 +36,8 @@ Prs3d_Drawer::Prs3d_Drawer(): myNbPoints(30),myIsoOnPlane(Standard_False),
|
||||
myDeviationAngle(12*M_PI/180),
|
||||
myHLRAngle(20*M_PI/180),
|
||||
myLineDrawArrow(Standard_False),
|
||||
myDrawHiddenLine(Standard_False)
|
||||
myDrawHiddenLine(Standard_False),
|
||||
myFaceBoundaryDraw(Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -438,3 +439,45 @@ Handle (Prs3d_LineAspect) Prs3d_Drawer::SectionAspect () {
|
||||
void Prs3d_Drawer::SetSectionAspect ( const Handle(Prs3d_LineAspect)& anAspect) {
|
||||
mySectionAspect = anAspect;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : SetFaceBoundaryDraw
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void Prs3d_Drawer::SetFaceBoundaryDraw (const Standard_Boolean theIsEnabled)
|
||||
{
|
||||
myFaceBoundaryDraw = theIsEnabled;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : IsFaceBoundaryDraw
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Boolean Prs3d_Drawer::IsFaceBoundaryDraw () const
|
||||
{
|
||||
return myFaceBoundaryDraw;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : SetFaceBoundaryAspect
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void Prs3d_Drawer::SetFaceBoundaryAspect (const Handle(Prs3d_LineAspect)& theAspect)
|
||||
{
|
||||
myFaceBoundaryAspect = theAspect;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : FaceBoundaryAspect
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Handle_Prs3d_LineAspect Prs3d_Drawer::FaceBoundaryAspect ()
|
||||
{
|
||||
if (myFaceBoundaryAspect.IsNull ())
|
||||
{
|
||||
myFaceBoundaryAspect =
|
||||
new Prs3d_LineAspect (Quantity_NOC_BLACK, Aspect_TOL_SOLID, 1.0);
|
||||
}
|
||||
|
||||
return myFaceBoundaryAspect;
|
||||
}
|
||||
|
Reference in New Issue
Block a user