1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0031424: Visualization - stop using Prs3d_Drawer::HLRAngle() parameter

Prs3d_Drawer, AIS_Shape, AIS_InteractiveContext - removed properties HLRDeviationCoefficient() and HLRAngle().
Prs3d_Drawer::HLRAngle() is kept as alias to Prs3d_Drawer::DeviationAngle() with deprecated flag.
Prs3d_Drawer::DeviationAngle() default value is changed from 12 to 20 degrees
to match Prs3d_Drawer::HLRAngle() which has been previously used in majority of cases.
Removed unused property HLRBRep_PolyAlgo::Angle().
This commit is contained in:
kgv
2020-03-13 00:35:06 +03:00
parent b5163d2f8d
commit 67441d0ca3
21 changed files with 90 additions and 767 deletions

View File

@@ -74,7 +74,6 @@ HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter.hxx
HLRBRep_PCLocFOfTheLocateExtPCOfTheProjPCurOfCInter_0.cxx
HLRBRep_PolyAlgo.cxx
HLRBRep_PolyAlgo.hxx
HLRBRep_PolyAlgo.lxx
HLRBRep_PolyHLRToShape.cxx
HLRBRep_PolyHLRToShape.hxx
HLRBRep_PolyHLRToShape.lxx

View File

@@ -78,7 +78,6 @@ static Standard_Integer DoError = Standard_False;
HLRBRep_PolyAlgo::HLRBRep_PolyAlgo () :
myDebug (Standard_False),
myAngle (5 * M_PI / 180.),
myTolSta (0.1),
myTolEnd (0.9),
myTolAngular(0.001)
@@ -94,7 +93,6 @@ myTolAngular(0.001)
HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const Handle(HLRBRep_PolyAlgo)& A)
{
myDebug = A->Debug();
myAngle = A->Angle();
myTolAngular = A->TolAngular();
myTolSta = A->TolCoef();
myTolEnd = 1 - myTolSta;
@@ -114,7 +112,6 @@ HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const Handle(HLRBRep_PolyAlgo)& A)
HLRBRep_PolyAlgo::HLRBRep_PolyAlgo (const TopoDS_Shape& S) :
myDebug (Standard_False),
myAngle (5 * M_PI / 180.),
myTolSta (0.1),
myTolEnd (0.9),
myTolAngular(0.001)

View File

@@ -17,42 +17,31 @@
#ifndef _HLRBRep_PolyAlgo_HeaderFile
#define _HLRBRep_PolyAlgo_HeaderFile
#include <HLRAlgo_PolyInternalNode.hxx>
#include <HLRAlgo_Array1OfTData.hxx>
#include <HLRAlgo_Array1OfPISeg.hxx>
#include <HLRAlgo_Array1OfPINod.hxx>
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <HLRAlgo_Projector.hxx>
#include <Standard_Real.hxx>
#include <TopTools_SequenceOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <Standard_Transient.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TopTools_MapOfShape.hxx>
#include <HLRAlgo_ListOfBPoint.hxx>
#include <TopTools_ListOfShape.hxx>
#include <GeomAbs_Shape.hxx>
#include <HLRAlgo_Array1OfTData.hxx>
#include <HLRAlgo_Array1OfPISeg.hxx>
#include <HLRAlgo_Array1OfPINod.hxx>
#include <HLRAlgo_ListOfBPoint.hxx>
#include <HLRAlgo_PolyAlgo.hxx>
#include <HLRAlgo_PolyInternalNode.hxx>
#include <HLRAlgo_Projector.hxx>
#include <TColStd_Array1OfInteger.hxx>
#include <TColStd_Array1OfTransient.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopTools_SequenceOfShape.hxx>
class HLRAlgo_PolyAlgo;
class Geom_Surface;
class Standard_OutOfRange;
class TopoDS_Shape;
class HLRAlgo_Projector;
class TopoDS_Edge;
class HLRAlgo_PolyInternalData;
class HLRAlgo_EdgeStatus;
struct HLRAlgo_TriangleData;
class HLRBRep_PolyAlgo;
DEFINE_STANDARD_HANDLE(HLRBRep_PolyAlgo, Standard_Transient)
@@ -122,8 +111,8 @@ public:
Standard_EXPORT HLRBRep_PolyAlgo(const TopoDS_Shape& S);
Standard_Integer NbShapes() const;
Standard_Integer NbShapes() const { return myShapes.Length(); }
Standard_EXPORT TopoDS_Shape& Shape (const Standard_Integer I);
//! remove the Shape of Index <I>.
@@ -135,40 +124,40 @@ public:
//! Loads the shape S into this framework.
//! Warning S must have already been triangulated.
void Load (const TopoDS_Shape& S);
void Load (const TopoDS_Shape& theShape) { myShapes.Append (theShape); }
Standard_EXPORT Handle(HLRAlgo_PolyAlgo) Algo() const;
//! Sets the parameters of the view for this framework.
//! These parameters are defined by an HLRAlgo_Projector object,
//! which is returned by the Projector function on a Prs3d_Projector object.
const HLRAlgo_Projector& Projector() const;
const HLRAlgo_Projector& Projector() const { return myProj; }
void Projector (const HLRAlgo_Projector& theProj) { myProj = theProj; }
void Projector (const HLRAlgo_Projector& P);
Standard_Real Angle() const;
void Angle (const Standard_Real Ang);
Standard_Real TolAngular() const;
void TolAngular (const Standard_Real Tol);
Standard_Real TolCoef() const;
void TolCoef (const Standard_Real Tol);
Standard_Real TolAngular() const { return myTolAngular; }
void TolAngular (const Standard_Real theTol) { myTolAngular = theTol; }
Standard_Real TolCoef() const { return myTolSta; }
void TolCoef (const Standard_Real theTol)
{
myTolSta = theTol;
myTolEnd = 1.0 - theTol;
}
//! Launches calculation of outlines of the shape
//! visualized by this framework. Used after setting the point of view and
//! defining the shape or shapes to be visualized.
Standard_EXPORT void Update();
void InitHide();
Standard_Boolean MoreHide() const;
void NextHide();
void InitHide() { myAlgo->InitHide(); }
Standard_Boolean MoreHide() const { return myAlgo->MoreHide(); }
void NextHide() { myAlgo->NextHide(); }
Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide (
HLRAlgo_EdgeStatus& status,
TopoDS_Shape& S,
@@ -176,35 +165,26 @@ public:
Standard_Boolean& regn,
Standard_Boolean& outl,
Standard_Boolean& intl);
void InitShow();
Standard_Boolean MoreShow() const;
void NextShow();
void InitShow() { myAlgo->InitShow(); }
Standard_Boolean MoreShow() const { return myAlgo->MoreShow(); }
void NextShow() { myAlgo->NextShow(); }
Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show (TopoDS_Shape& S, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl);
//! Make a shape with the internal outlines in each
//! face.
Standard_EXPORT TopoDS_Shape OutLinedShape (const TopoDS_Shape& S) const;
Standard_Boolean Debug() const;
void Debug (const Standard_Boolean B);
Standard_Boolean Debug() const { return myDebug; }
void Debug (const Standard_Boolean theDebug) { myDebug = theDebug; }
DEFINE_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,Standard_Transient)
protected:
private:
Standard_EXPORT TopoDS_Shape MakeShape() const;
@@ -284,6 +264,8 @@ private:
TIMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly);
}
private:
HLRAlgo_Projector myProj;
Standard_Real TMat[3][3];
Standard_Real TLoc[3];
@@ -296,7 +278,6 @@ private:
TopTools_IndexedMapOfShape myFMap;
Handle(HLRAlgo_PolyAlgo) myAlgo;
Standard_Boolean myDebug;
Standard_Real myAngle;
Standard_Real myTolSta;
Standard_Real myTolEnd;
Standard_Real myTolAngular;
@@ -305,14 +286,6 @@ private:
BRepAdaptor_Curve myBCurv;
BRepAdaptor_Curve2d myPC;
};
#include <HLRBRep_PolyAlgo.lxx>
#endif // _HLRBRep_PolyAlgo_HeaderFile

View File

@@ -1,163 +0,0 @@
// Created on: 1995-06-15
// Created by: Christophe MARION
// Copyright (c) 1995-1999 Matra Datavision
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <HLRAlgo_PolyAlgo.hxx>
//=======================================================================
//function : NbShapes
//purpose :
//=======================================================================
inline Standard_Integer HLRBRep_PolyAlgo::NbShapes () const
{ return myShapes.Length(); }
//=======================================================================
//function : Load
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::Load (const TopoDS_Shape& S)
{ myShapes.Append(S); }
//=======================================================================
//function : Projector
//purpose :
//=======================================================================
inline const HLRAlgo_Projector & HLRBRep_PolyAlgo::Projector () const
{ return myProj; }
//=======================================================================
//function : Projector
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::Projector (const HLRAlgo_Projector& P)
{ myProj = P; }
//=======================================================================
//function : Angle
//purpose :
//=======================================================================
inline Standard_Real HLRBRep_PolyAlgo::Angle () const
{ return myAngle; }
//=======================================================================
//function : Angle
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::Angle (const Standard_Real Ang)
{ myAngle = Ang; }
//=======================================================================
//function : TolAngular
//purpose :
//=======================================================================
inline Standard_Real HLRBRep_PolyAlgo::TolAngular () const
{ return myTolAngular; }
//=======================================================================
//function : TolAngular
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::TolAngular (const Standard_Real Tol)
{ myTolAngular = Tol; }
//=======================================================================
//function : TolCoef
//purpose :
//=======================================================================
inline Standard_Real HLRBRep_PolyAlgo::TolCoef () const
{ return myTolSta; }
//=======================================================================
//function : TolCoef
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::TolCoef (const Standard_Real Tol)
{ myTolSta = Tol; myTolEnd = 1 - Tol;}
//=======================================================================
//function : InitHide
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::InitHide ()
{
myAlgo->InitHide();
}
//=======================================================================
//function : MoreHide
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_PolyAlgo::MoreHide () const
{ return myAlgo->MoreHide(); }
//=======================================================================
//function : NextHide
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::NextHide ()
{ myAlgo->NextHide(); }
//=======================================================================
//function : InitShow
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::InitShow ()
{ myAlgo->InitShow(); }
//=======================================================================
//function : MoreShow
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_PolyAlgo::MoreShow () const
{ return myAlgo->MoreShow(); }
//=======================================================================
//function : NextShow
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::NextShow ()
{ myAlgo->NextShow(); }
//=======================================================================
//function : Debug
//purpose :
//=======================================================================
inline Standard_Boolean HLRBRep_PolyAlgo::Debug () const
{ return myDebug; }
//=======================================================================
//function : Debug
//purpose :
//=======================================================================
inline void HLRBRep_PolyAlgo::Debug (const Standard_Boolean B)
{ myDebug = B; }