mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
Automatic restore of IMPLEMENT_STANDARD_RTTIEXT macro (upgrade -rtti)
This commit is contained in:
@@ -86,7 +86,7 @@ void Convert_Presentation::DoSample()
|
||||
// Function : Convert_Presentation::drawSurfaceAndItsBSpline
|
||||
// Purpose :
|
||||
//================================================================
|
||||
void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle_Geom_Surface & theSurface,
|
||||
void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle(Geom_Surface) & theSurface,
|
||||
const Standard_CString theName,
|
||||
TCollection_AsciiString& theText)
|
||||
{
|
||||
@@ -95,7 +95,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle_Geom_Surface &
|
||||
aTitle += " to BSpline surface";
|
||||
|
||||
theText += EOL
|
||||
" Handle_Geom_BSplineSurface aBSplineSurface = " EOL
|
||||
" Handle(Geom_BSplineSurface) aBSplineSurface = " EOL
|
||||
" GeomConvert::SurfaceToBSplineSurface(aSurface);" EOL;
|
||||
|
||||
setResultTitle (aTitle.ToCString());
|
||||
@@ -105,7 +105,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle_Geom_Surface &
|
||||
|
||||
if (WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_BSplineSurface aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);
|
||||
Handle(Geom_BSplineSurface) aBSplineSurface = GeomConvert::SurfaceToBSplineSurface(theSurface);
|
||||
|
||||
_ASSERTE(!aBSplineSurface.IsNull());
|
||||
|
||||
@@ -116,7 +116,7 @@ void Convert_Presentation::drawSurfaceAndItsBSpline(const Handle_Geom_Surface &
|
||||
// Function : Convert_Presentation::drawCurveAndItsBSpline
|
||||
// Purpose :
|
||||
//================================================================
|
||||
void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
|
||||
void Convert_Presentation::drawCurveAndItsBSpline(Handle(Geom_Curve) theCurve,
|
||||
const Standard_CString theName,
|
||||
TCollection_AsciiString& theText)
|
||||
{
|
||||
@@ -125,7 +125,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
|
||||
aTitle += " to BSpline curve";
|
||||
|
||||
theText += EOL
|
||||
" Handle_Geom_BSplineCurve aBSpline = " EOL
|
||||
" Handle(Geom_BSplineCurve) aBSpline = " EOL
|
||||
" GeomConvert::CurveToBSplineCurve(aCurve);" EOL;
|
||||
|
||||
setResultTitle (aTitle.ToCString());
|
||||
@@ -135,7 +135,7 @@ void Convert_Presentation::drawCurveAndItsBSpline(Handle_Geom_Curve theCurve,
|
||||
|
||||
if (WAIT_A_LITTLE) return;
|
||||
|
||||
Handle_Geom_BSplineCurve aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
|
||||
Handle(Geom_BSplineCurve) aBSpline = GeomConvert::CurveToBSplineCurve(theCurve);
|
||||
|
||||
drawCurve (Handle(Geom_Curve)::DownCast(aBSpline), BSplineColor);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ void Convert_Presentation::sampleCircle()
|
||||
gp_Dir aDir (1,0,0);
|
||||
gp_Ax2 aAxis (aOrigin, aDir);
|
||||
Standard_Real aRadius = 300;
|
||||
Handle_Geom_Circle aCurve = new Geom_Circle (aAxis, aRadius);
|
||||
Handle(Geom_Circle) aCurve = new Geom_Circle (aAxis, aRadius);
|
||||
|
||||
TCollection_AsciiString aText (
|
||||
" gp_Pnt aOrigin (0,0,0);" EOL
|
||||
|
@@ -38,10 +38,10 @@ private:
|
||||
void sampleConicalSurface();
|
||||
void sampleSphericalSurface();
|
||||
|
||||
void drawCurveAndItsBSpline (Handle_Geom_Curve theCurve,
|
||||
void drawCurveAndItsBSpline (Handle(Geom_Curve) theCurve,
|
||||
const Standard_CString theName, TCollection_AsciiString& theText);
|
||||
|
||||
void drawSurfaceAndItsBSpline (const Handle_Geom_Surface & theSurface,
|
||||
void drawSurfaceAndItsBSpline (const Handle(Geom_Surface) & theSurface,
|
||||
const Standard_CString theName, TCollection_AsciiString& theText);
|
||||
|
||||
private:
|
||||
|
@@ -10,7 +10,6 @@
|
||||
#include <Prs3d_Drawer.hxx>
|
||||
#include <Prs3d_ArrowAspect.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_HANDLE(ISession_Curve,AIS_InteractiveObject)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
@@ -20,7 +20,7 @@ class ISession_Curve : public AIS_InteractiveObject
|
||||
public:
|
||||
ISession_Curve(const Handle(Geom_Curve)& aCurve);
|
||||
virtual ~ISession_Curve();
|
||||
DEFINE_STANDARD_RTTI(ISession_Curve,AIS_InteractiveObject)
|
||||
DEFINE_STANDARD_RTTIEXT(ISession_Curve,AIS_InteractiveObject)
|
||||
private:
|
||||
|
||||
Standard_EXPORT virtual void Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
|
||||
|
@@ -77,8 +77,8 @@ static Standard_Boolean fixParam(Standard_Real& theParam)
|
||||
// Purpose : displays a given geometric surface in 3d viewer
|
||||
// (creates a finite face and displays it)
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
(const Handle_Geom_Surface& theSurface,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
|
||||
(const Handle(Geom_Surface)& theSurface,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
@@ -89,7 +89,7 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
fixParam(v1);
|
||||
fixParam(v2);
|
||||
|
||||
Handle_AIS_Shape aGraphicSurface =
|
||||
Handle(AIS_Shape) aGraphicSurface =
|
||||
new AIS_Shape(BRepBuilderAPI_MakeFace (theSurface, u1, u2, v1, v2, Precision::Confusion()));
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicSurface, Graphic3d_NOM_PLASTIC, toDisplay);
|
||||
@@ -110,8 +110,8 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawSurface
|
||||
// Function : DrawCurve
|
||||
// Purpose : displays a given curve 3d
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
(const Handle_Geom_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
(const Handle(Geom_Curve)& theCurve,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
@@ -135,8 +135,8 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
// Function : DrawCurve
|
||||
// Purpose : displays a given curve 2d
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
(const Handle_Geom2d_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
(const Handle(Geom2d_Curve)& theCurve,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay,
|
||||
const gp_Ax2& aPosition)
|
||||
@@ -163,7 +163,7 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawCurve
|
||||
// Function : drawPoint
|
||||
// Purpose : displays a given point
|
||||
//================================================================
|
||||
Handle_AIS_Point OCCDemo_Presentation::drawPoint
|
||||
Handle(AIS_Point) OCCDemo_Presentation::drawPoint
|
||||
(const gp_Pnt& aPnt,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
@@ -185,7 +185,7 @@ Handle_AIS_Point OCCDemo_Presentation::drawPoint
|
||||
// (segment of line starting at thePnt with the arrow at the end,
|
||||
// the length of segment is the length of the vector)
|
||||
//================================================================
|
||||
Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
|
||||
Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
|
||||
(const gp_Pnt& thePnt,
|
||||
const gp_Vec& theVec,
|
||||
const Quantity_Color& theColor,
|
||||
@@ -217,11 +217,11 @@ Handle_AIS_InteractiveObject OCCDemo_Presentation::drawVector
|
||||
}
|
||||
|
||||
|
||||
Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
(const TopoDS_Shape& theShape,const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
|
||||
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicShape, Graphic3d_NOM_PLASTIC, toDisplay);
|
||||
getAISContext()->SetColor (aGraphicShape, theColor, toDisplay);
|
||||
@@ -237,12 +237,12 @@ Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
return aGraphicShape;
|
||||
}
|
||||
|
||||
Handle_AIS_Shape OCCDemo_Presentation::drawShape
|
||||
Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
(const TopoDS_Shape& theShape,
|
||||
const Graphic3d_NameOfMaterial theMaterial,
|
||||
const Standard_Boolean toDisplay)
|
||||
{
|
||||
Handle_AIS_Shape aGraphicShape = new AIS_Shape(theShape);
|
||||
Handle(AIS_Shape) aGraphicShape = new AIS_Shape(theShape);
|
||||
|
||||
getAISContext()->SetMaterial(aGraphicShape, theMaterial, toDisplay);
|
||||
if (toDisplay) {
|
||||
|
@@ -65,8 +65,8 @@ public:
|
||||
protected:
|
||||
// Methods to call from a derivable class
|
||||
void setName (const char* theName) {myName = CString(theName);}
|
||||
Handle_AIS_InteractiveContext getAISContext() const {return myDoc->GetAISContext();}
|
||||
Handle_V3d_Viewer getViewer() const {return myDoc->GetViewer();}
|
||||
Handle(AIS_InteractiveContext) getAISContext() const {return myDoc->GetAISContext();}
|
||||
Handle(V3d_Viewer) getViewer() const {return myDoc->GetViewer();}
|
||||
void setResultTitle (const char* theTitle) {myDoc->GetResultDialog()->SetTitle(theTitle);}
|
||||
void setResultText (const char* theText) {myDoc->GetResultDialog()->SetText(theText);}
|
||||
Standard_CString GetDataDir() {return myDoc->GetDataDir();}
|
||||
@@ -74,45 +74,45 @@ protected:
|
||||
Standard_Boolean WaitForInput (unsigned long aMilliSeconds);
|
||||
// Waits for a user input or a period of time has been elapsed
|
||||
|
||||
Handle_AIS_InteractiveObject drawSurface (const Handle_Geom_Surface& theSurface,
|
||||
Handle(AIS_InteractiveObject) drawSurface (const Handle(Geom_Surface)& theSurface,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_LEMONCHIFFON3),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a finite face based on the given geometric surface
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom_Curve)& theCurve,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates an ISession_Curve based on the given geometric curve
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawCurve (const Handle_Geom2d_Curve& theCurve,
|
||||
Handle(AIS_InteractiveObject) drawCurve (const Handle(Geom2d_Curve)& theCurve,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_RED),
|
||||
const Standard_Boolean toDisplay = Standard_True,
|
||||
const gp_Ax2& aPosition = gp::XOY());
|
||||
// converts a given curve to 3d using aPosition and calls the previous method
|
||||
|
||||
Handle_AIS_Point drawPoint (const gp_Pnt& thePnt,
|
||||
Handle(AIS_Point) drawPoint (const gp_Pnt& thePnt,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_GREEN),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given point
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_InteractiveObject drawVector (const gp_Pnt& thePnt,
|
||||
Handle(AIS_InteractiveObject) drawVector (const gp_Pnt& thePnt,
|
||||
const gp_Vec& theVec,
|
||||
const Quantity_Color& theColor = Quantity_Color(Quantity_NOC_YELLOW),
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given vector
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
|
||||
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
|
||||
const Quantity_Color& theColor,
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given shape
|
||||
// with material PLASTIC and a given color
|
||||
// and displays it in the viewer if toDisplay = Standard_True
|
||||
|
||||
Handle_AIS_Shape drawShape (const TopoDS_Shape& theShape,
|
||||
Handle(AIS_Shape) drawShape (const TopoDS_Shape& theShape,
|
||||
const Graphic3d_NameOfMaterial theMaterial = Graphic3d_NOM_BRASS,
|
||||
const Standard_Boolean toDisplay = Standard_True);
|
||||
// creates a presentation of the given shape with the given material
|
||||
|
@@ -108,8 +108,8 @@ private:
|
||||
|
||||
private:
|
||||
enum VisMode { VIS_WIREFRAME, VIS_SHADE, VIS_HLR };
|
||||
Handle_V3d_View myView;
|
||||
Handle_Graphic3d_GraphicDriver myGraphicDriver;
|
||||
Handle(V3d_View) myView;
|
||||
Handle(Graphic3d_GraphicDriver) myGraphicDriver;
|
||||
View3D_CurrentAction myCurrentMode;
|
||||
VisMode myVisMode;
|
||||
Standard_Integer myXmin;
|
||||
|
Reference in New Issue
Block a user