1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-16 10:08:36 +03:00

0025546: Visualization - remove unused methods and classes from package Aspect

Remove global methods Aspect::ToCString(), Aspect::ValuesOfFOSP(), Aspect::Inverse().
Remove class Aspect_Edge, Aspect_Array1OfEdge and Aspect_EdgeDefinitionError.
Remove enumerations Aspect_TypeOfFont, Aspect_TypeOfText, Aspect_CardinalPoints,
Aspect_TypeOfRenderingMode, Aspect_TypeOfColorSpace, Aspect_FormatOfSheetPaper.

update MFC samples
This commit is contained in:
kgv 2014-12-11 16:29:53 +03:00 committed by bugmaster
parent db005e48df
commit f4fa7f0c16
24 changed files with 3 additions and 686 deletions

View File

@ -7,7 +7,6 @@
#include "GeometryView2D.h" #include "GeometryView2D.h"
#include ".\Resource2d\RectangularGrid.h" #include ".\Resource2d\RectangularGrid.h"
#include ".\Resource2d\CircularGrid.h" #include ".\Resource2d\CircularGrid.h"
#include <Aspect.hxx>
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// CNSGView // CNSGView

View File

@ -28,14 +28,13 @@ ISession_Text::ISession_Text
const Standard_Real anX , // = 0 const Standard_Real anX , // = 0
const Standard_Real anY , // = 0 const Standard_Real anY , // = 0
const Standard_Real aZ , // = 0 const Standard_Real aZ , // = 0
const Aspect_TypeOfText aType, // = SOLID,
const Quantity_PlaneAngle anAngle, // = 0.0 const Quantity_PlaneAngle anAngle, // = 0.0
const Standard_Real aslant, // = 0.0 const Standard_Real aslant, // = 0.0
const Standard_Integer aColorIndex, // = 0 const Standard_Integer aColorIndex, // = 0
const Standard_Integer aFontIndex, // = 1 const Standard_Integer aFontIndex, // = 1
const Quantity_Factor aScale) // = 1 const Quantity_Factor aScale) // = 1
:AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ), :AIS_InteractiveObject(),MyText(aText),MyX(anX),MyY(anY),MyZ(aZ),
MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex), MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0) MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
{ {
@ -44,14 +43,13 @@ ISession_Text::ISession_Text
ISession_Text::ISession_Text ISession_Text::ISession_Text
(const TCollection_AsciiString& aText, (const TCollection_AsciiString& aText,
gp_Pnt& aPoint, gp_Pnt& aPoint,
const Aspect_TypeOfText aType, // = SOLID,
const Quantity_PlaneAngle anAngle, // = 0.0 const Quantity_PlaneAngle anAngle, // = 0.0
const Standard_Real aslant, // = 0.0 const Standard_Real aslant, // = 0.0
const Standard_Integer aColorIndex, // = 0 const Standard_Integer aColorIndex, // = 0
const Standard_Integer aFontIndex, // = 1 const Standard_Integer aFontIndex, // = 1
const Quantity_Factor aScale) // = 1 const Quantity_Factor aScale) // = 1
:AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()), :AIS_InteractiveObject(),MyText(aText),MyX(aPoint.X()),MyY(aPoint.Y()),MyZ(aPoint.Z()),
MyTypeOfText(aType),MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex), MyAngle(anAngle),MySlant(aslant),MyFontIndex(aFontIndex),
MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0) MyColorIndex(aColorIndex),MyScale(aScale),MyWidth(0),MyHeight(0)
{ {

View File

@ -12,7 +12,6 @@
#include <Standard_Macro.hxx> #include <Standard_Macro.hxx>
#include <Standard_DefineHandle.hxx> #include <Standard_DefineHandle.hxx>
#include <TCollection_AsciiString.hxx> #include <TCollection_AsciiString.hxx>
#include <Aspect_TypeOfText.hxx>
#include <Standard_Real.hxx> #include <Standard_Real.hxx>
#include <Standard_Integer.hxx> #include <Standard_Integer.hxx>
#include <Quantity_Factor.hxx> #include <Quantity_Factor.hxx>
@ -37,7 +36,6 @@ public:
const Standard_Real anX = 0 , const Standard_Real anX = 0 ,
const Standard_Real anY = 0 , const Standard_Real anY = 0 ,
const Standard_Real aZ = 0 , const Standard_Real aZ = 0 ,
const Aspect_TypeOfText aType = Aspect_TOT_SOLID,
const Quantity_PlaneAngle anAngle = 0.0 , const Quantity_PlaneAngle anAngle = 0.0 ,
const Standard_Real aSlant = 0.0 , const Standard_Real aSlant = 0.0 ,
const Standard_Integer aColorIndex = 1 , const Standard_Integer aColorIndex = 1 ,
@ -46,7 +44,6 @@ public:
ISession_Text ISession_Text
(const TCollection_AsciiString& aText, (const TCollection_AsciiString& aText,
gp_Pnt& aPoint, gp_Pnt& aPoint,
const Aspect_TypeOfText aType = Aspect_TOT_SOLID,
const Quantity_PlaneAngle anAngle = 0.0 , const Quantity_PlaneAngle anAngle = 0.0 ,
const Standard_Real aSlant = 0.0 , const Standard_Real aSlant = 0.0 ,
const Standard_Integer aColorIndex = 1 , const Standard_Integer aColorIndex = 1 ,
@ -60,8 +57,6 @@ inline TCollection_AsciiString GetText() const;
inline void SetText(const TCollection_AsciiString& atext) ; inline void SetText(const TCollection_AsciiString& atext) ;
inline void GetCoord(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const ; inline void GetCoord(Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const ;
inline void SetCoord(const Standard_Real X, const Standard_Real Y, const Standard_Real Z=0); inline void SetCoord(const Standard_Real X, const Standard_Real Y, const Standard_Real Z=0);
inline Aspect_TypeOfText GetTypeOfText() const;
inline void SetTypeOfText(const Aspect_TypeOfText aNewTypeOfText) ;
inline Standard_Real GetAngle() const; inline Standard_Real GetAngle() const;
inline void SetAngle(const Standard_Real aNewAngle) ; inline void SetAngle(const Standard_Real aNewAngle) ;
inline Standard_Real GetSlant() const; inline Standard_Real GetSlant() const;
@ -93,7 +88,6 @@ TCollection_AsciiString MyText ;
Standard_Real MyX ; Standard_Real MyX ;
Standard_Real MyY ; Standard_Real MyY ;
Standard_Real MyZ ; Standard_Real MyZ ;
Aspect_TypeOfText MyTypeOfText ;
Standard_Real MyAngle ; Standard_Real MyAngle ;
Standard_Real MySlant ; Standard_Real MySlant ;
Standard_Integer MyColorIndex ; Standard_Integer MyColorIndex ;
@ -120,12 +114,6 @@ inline void ISession_Text::GetCoord(Standard_Real& X, Standard_Real& Y, Standard
inline void ISession_Text::SetCoord(const Standard_Real X, const Standard_Real Y, const Standard_Real Z) inline void ISession_Text::SetCoord(const Standard_Real X, const Standard_Real Y, const Standard_Real Z)
{ MyX = X ; MyY = Y ; MyZ = Z ;} { MyX = X ; MyY = Y ; MyZ = Z ;}
inline Aspect_TypeOfText ISession_Text::GetTypeOfText() const
{ return MyTypeOfText; }
inline void ISession_Text::SetTypeOfText(const Aspect_TypeOfText aNewTypeOfText)
{ MyTypeOfText = aNewTypeOfText; }
inline Standard_Real ISession_Text::GetAngle() const inline Standard_Real ISession_Text::GetAngle() const
{ return MyAngle; } { return MyAngle; }

View File

@ -83,7 +83,6 @@
#include <Aspect_TypeOfline.hxx> #include <Aspect_TypeOfline.hxx>
#include <Aspect_WidthOfline.hxx> #include <Aspect_WidthOfline.hxx>
#include <Aspect_Background.hxx> #include <Aspect_Background.hxx>
#include <Aspect_TypeOfText.hxx>
#include <BRepPrimAPI_MakeBox.hxx> #include <BRepPrimAPI_MakeBox.hxx>
#include <BRep_Builder.hxx> #include <BRep_Builder.hxx>

View File

@ -72,7 +72,6 @@ void CViewer2dDoc::OnBUTTONTestText()
Handle (Sample2D_Text) aText = Handle (Sample2D_Text) aText =
new Sample2D_Text(Text, new Sample2D_Text(Text,
gp_Pnt(0.0,15.0*(j-15.0),0.0), // thePosition gp_Pnt(0.0,15.0*(j-15.0),0.0), // thePosition
Aspect_TOT_SOLID, // theType
10.0*M_PI, // theAngle 10.0*M_PI, // theAngle
(Quantity_NameOfColor)(aColor++), // theColor (Quantity_NameOfColor)(aColor++), // theColor
Font_FA_Regular, // theFontAspect Font_FA_Regular, // theFontAspect
@ -91,7 +90,6 @@ void CViewer2dDoc::OnBUTTONTestText()
Handle (Sample2D_Text) aText = Handle (Sample2D_Text) aText =
new Sample2D_Text(Text, new Sample2D_Text(Text,
gp_Pnt(80.,15.0*(j-10.0),0.0), // thePosition gp_Pnt(80.,15.0*(j-10.0),0.0), // thePosition
Aspect_TOT_SOLID, // theType
0.0, // theAngle 0.0, // theAngle
(Quantity_NameOfColor)(aColor++), // theColor (Quantity_NameOfColor)(aColor++), // theColor
Font_FA_BoldItalic, // theFontAspect Font_FA_BoldItalic, // theFontAspect
@ -110,7 +108,6 @@ void CViewer2dDoc::OnBUTTONTestText()
Handle (Sample2D_Text) aText = Handle (Sample2D_Text) aText =
new Sample2D_Text(Text, new Sample2D_Text(Text,
gp_Pnt(140.0,15.0*(j-5.0),0.0), // thePosition gp_Pnt(140.0,15.0*(j-5.0),0.0), // thePosition
Aspect_TOT_SOLID, // theType
0.0, // theAngle 0.0, // theAngle
(Quantity_NameOfColor)(aColor++), // theColor (Quantity_NameOfColor)(aColor++), // theColor
Font_FA_Bold, // theFontAspect Font_FA_Bold, // theFontAspect
@ -127,7 +124,6 @@ for (j=10;j<=15;j++)
Handle (Sample2D_Text) aText = Handle (Sample2D_Text) aText =
new Sample2D_Text(Text, new Sample2D_Text(Text,
gp_Pnt(200.0,15.0*(j-10.0),0.0), // thePosition gp_Pnt(200.0,15.0*(j-10.0),0.0), // thePosition
Aspect_TOT_SOLID, // theType
0.0, // theAngle 0.0, // theAngle
(Quantity_NameOfColor)(aColor++),// theColor (Quantity_NameOfColor)(aColor++),// theColor
Font_FA_Italic, // theFontAspect Font_FA_Italic, // theFontAspect

View File

@ -10,7 +10,6 @@
#include "Viewer3dDoc.h" #include "Viewer3dDoc.h"
#include <V3d_View.hxx> #include <V3d_View.hxx>
#include <Aspect.hxx>
#include <Quantity_NameOfColor.hxx> #include <Quantity_NameOfColor.hxx>
#include "..\res\resource.h" #include "..\res\resource.h"

View File

@ -51,7 +51,6 @@
#include <Aspect_Background.hxx> #include <Aspect_Background.hxx>
#include <Aspect_TypeOfline.hxx> #include <Aspect_TypeOfline.hxx>
#include <Aspect_TypeOfText.hxx>
#include <Aspect_WidthOfline.hxx> #include <Aspect_WidthOfline.hxx>
#include <Aspect_Window.hxx> #include <Aspect_Window.hxx>
#include <Bnd_Box2d.hxx> #include <Bnd_Box2d.hxx>

View File

@ -48,7 +48,6 @@
#include <Aspect_Background.hxx> #include <Aspect_Background.hxx>
#include <Aspect_TypeOfLine.hxx> #include <Aspect_TypeOfLine.hxx>
#include <Aspect_TypeOfText.hxx>
#include <Aspect_WidthOfLine.hxx> #include <Aspect_WidthOfLine.hxx>
#include <Bnd_Box2d.hxx> #include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx> #include <BndLib_Add2dCurve.hxx>

View File

@ -114,7 +114,6 @@
#include <Aspect_Background.hxx> #include <Aspect_Background.hxx>
#include <Aspect_TypeOfline.hxx> #include <Aspect_TypeOfline.hxx>
#include <Aspect_TypeOfText.hxx>
#include <Aspect_WidthOfline.hxx> #include <Aspect_WidthOfline.hxx>
#include <Bnd_Box2d.hxx> #include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx> #include <BndLib_Add2dCurve.hxx>

View File

@ -125,7 +125,6 @@ enum CurrentAction3d {
#include <Aspect_Background.hxx> #include <Aspect_Background.hxx>
#include <Aspect_TypeOfline.hxx> #include <Aspect_TypeOfline.hxx>
#include <Aspect_TypeOfText.hxx>
#include <Aspect_WidthOfline.hxx> #include <Aspect_WidthOfline.hxx>
#include <Bnd_Box2d.hxx> #include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx> #include <BndLib_Add2dCurve.hxx>

View File

@ -5,7 +5,6 @@
#include <OSD_File.hxx> #include <OSD_File.hxx>
#include <Quantity_Length.hxx> #include <Quantity_Length.hxx>
#include <Aspect_CardinalPoints.hxx>
#include <Quantity_Factor.hxx> #include <Quantity_Factor.hxx>
#include <Standard_Boolean.hxx> #include <Standard_Boolean.hxx>
#include <Standard_CString.hxx> #include <Standard_CString.hxx>

View File

@ -7,7 +7,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Text,AIS_InteractiveObject)
Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText, Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText,
const gp_Pnt& thePosition, const gp_Pnt& thePosition,
const Aspect_TypeOfText theType,
const Quantity_PlaneAngle theAngle, const Quantity_PlaneAngle theAngle,
const Quantity_Color theColor, const Quantity_Color theColor,
const Font_FontAspect theFontAspect, const Font_FontAspect theFontAspect,
@ -20,7 +19,6 @@ Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText,
{ {
myText = theText ; myText = theText ;
myPosition = thePosition ; myPosition = thePosition ;
myTypeOfText = theType ;
myAngle = theAngle ; myAngle = theAngle ;
myColor = theColor ; myColor = theColor ;
myFontAspect = theFontAspect; myFontAspect = theFontAspect;

View File

@ -15,7 +15,6 @@ public:
Standard_EXPORT Standard_EXPORT
Sample2D_Text (const TCollection_AsciiString& theText,const gp_Pnt& thePosition, Sample2D_Text (const TCollection_AsciiString& theText,const gp_Pnt& thePosition,
const Aspect_TypeOfText theType = Aspect_TOT_SOLID,
const Quantity_PlaneAngle theAngle = 0.0 , const Quantity_PlaneAngle theAngle = 0.0 ,
const Quantity_Color theColor = Quantity_NOC_YELLOW, const Quantity_Color theColor = Quantity_NOC_YELLOW,
const Font_FontAspect theFontAspect = Font_FA_Regular, const Font_FontAspect theFontAspect = Font_FA_Regular,
@ -29,8 +28,6 @@ inline TCollection_AsciiString GetText() const { return myText ; }
inline void SetText(const TCollection_AsciiString& theText) { myText = theText; } inline void SetText(const TCollection_AsciiString& theText) { myText = theText; }
inline void GetCoord(gp_Pnt& thePosition) const { thePosition=gp_Pnt(myPosition); } inline void GetCoord(gp_Pnt& thePosition) const { thePosition=gp_Pnt(myPosition); }
inline void SetCoord(const gp_Pnt& thePosition) { myPosition = thePosition; } inline void SetCoord(const gp_Pnt& thePosition) { myPosition = thePosition; }
inline Standard_Integer GetTypeOfText() const { return myTypeOfText; }
inline void SetTypeOfText(const Aspect_TypeOfText theTypeOfText) { myTypeOfText = theTypeOfText; }
inline Standard_Real GetAngle() const { return myAngle; } inline Standard_Real GetAngle() const { return myAngle; }
inline void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; } inline void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; }
inline Quantity_Color GetColor() const { return myColor; } inline Quantity_Color GetColor() const { return myColor; }
@ -58,7 +55,6 @@ private:
TCollection_AsciiString myText ; TCollection_AsciiString myText ;
gp_Pnt myPosition ; gp_Pnt myPosition ;
Aspect_TypeOfText myTypeOfText ;
Standard_Real myAngle ; Standard_Real myAngle ;
Quantity_Color myColor ; Quantity_Color myColor ;
Standard_CString myFont ; Standard_CString myFont ;

View File

@ -35,7 +35,6 @@
#include <AIS_TexturedShape.hxx> #include <AIS_TexturedShape.hxx>
#include <Aspect_Grid.hxx> #include <Aspect_Grid.hxx>
#include <Aspect_PolygonOffsetMode.hxx> #include <Aspect_PolygonOffsetMode.hxx>
#include <Aspect_TypeOfText.hxx>
#include <Aspect_DisplayConnection.hxx> #include <Aspect_DisplayConnection.hxx>
#include <Aspect_AspectMarker.hxx> #include <Aspect_AspectMarker.hxx>

View File

@ -19,7 +19,6 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
#include <TColgp_Array1OfDir.hxx> #include <TColgp_Array1OfDir.hxx>
#include <GProp_PGProps.hxx> #include <GProp_PGProps.hxx>
#include <Graphic3d_Array1OfVertex.hxx> #include <Graphic3d_Array1OfVertex.hxx>
#include <Aspect_Array1OfEdge.hxx>
#include <Quantity_Color.hxx> #include <Quantity_Color.hxx>
#include <BRepMesh_IncrementalMesh.hxx> #include <BRepMesh_IncrementalMesh.hxx>
#include <Prs3d.hxx> #include <Prs3d.hxx>

View File

@ -13,32 +13,6 @@
-- Alternatively, this file may be used under the terms of Open CASCADE -- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement. -- commercial license or contractual agreement.
-- Package: Aspect
-- Updated: Vendredi 2 Octobre 1992
-- Mercredi 31 mars 1993
-- Lundi 16 janvier 1995
-- Reason : Traitement des Markers (G400)
-- Purpose: Specifications definitives
-- Modified: 15/01/98 ; FMN : Ajout Hidden Line
-- Modified: 24/08/98 ; CAL : S3892. Ajout grilles 3d.
-- Modified: 16-09-98 by BGN (S3989)
--- Adding TypeOfTriedronEcho, TypeOfTriedronPosition.
-- Modified: 30-11-98 ; FMN : S4069. Textes always visible.
-- Modified: 17-NOV-99 : GG GER61351
-- Add TypeOfFacingModel enum
-- Modified: 20-JAN-00 : GG
-- Add GDM_None in enum GridDrawMode.
-- Modified: 25-JAN-00 : VKH
-- Add class PixMap
-- Modified: 23-FEB-00 : GG
-- Returns format name in ValuesOfFOSP() internal method.
-- Modified: 27-03-02 RIC120302 GG Add imported class
-- Display, Drawable, RenderingContext, GraphicCallbackProc
-- Modified: 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
-- Modified: 21-06-04 STV Added Aspect_ColorScale class
------------------------------------------------------------------------
package Aspect package Aspect
---Version: ---Version:
@ -106,9 +80,6 @@ is
exception BadAccess inherits DomainError; exception BadAccess inherits DomainError;
---Category: Exceptions ---Category: Exceptions
exception EdgeDefinitionError inherits OutOfRange;
---Category: Exceptions
exception IdentDefinitionError inherits OutOfRange; exception IdentDefinitionError inherits OutOfRange;
---Category: Exceptions ---Category: Exceptions
@ -150,9 +121,6 @@ is
class GradientBackground; class GradientBackground;
---Category: Classes ---Category: Classes
class Edge;
---Category: Classes
class GenId; class GenId;
---Category: Classes ---Category: Classes
@ -292,29 +260,6 @@ is
-- WOL_USERDEFINED defined by Users -- WOL_USERDEFINED defined by Users
---Category: Enumerations ---Category: Enumerations
enumeration TypeOfFont is TOF_DEFAULT,
TOF_COURIER,
TOF_HELVETICA,
TOF_TIMES,
TOF_USERDEFINED
end TypeOfFont;
---Purpose: Definition of line types
--
-- TOF_DEFAULT Default system font
-- TOF_COURIER
-- TOF_HELVETICA
-- TOF_USERDEFINED defined by Users
---Category: Enumerations
enumeration TypeOfText is TOT_SOLID,
TOT_OUTLINE
end TypeOfText;
---Purpose: Definition of Text types
--
-- TOF_SOLID Default text
-- TOF_OUTLINE
---Category: Enumerations
enumeration TypeOfStyleText is TOST_NORMAL, enumeration TypeOfStyleText is TOST_NORMAL,
TOST_ANNOTATION TOST_ANNOTATION
end TypeOfStyleText; end TypeOfStyleText;
@ -407,54 +352,6 @@ is
---Purpose: Defines the type of Resize Window method applied ---Purpose: Defines the type of Resize Window method applied
-- by the user. -- by the user.
enumeration CardinalPoints is CP_North,
CP_NorthEast,
CP_East,
CP_SouthEast,
CP_South,
CP_SouthWest,
CP_West,
CP_NorthWest,
CP_Center
end CardinalPoints;
enumeration TypeOfRenderingMode is TORM_IMMEDIAT,
TORM_RETAIN,
TORM_CLEAR_AND_RETAIN
end TypeOfRenderingMode;
---Purpose: Definition of the rendering modes
enumeration TypeOfColorSpace is TOCS_BlackAndWhite,
TOCS_GreyScale,
TOCS_RGB
end TypeOfColorSpace;
---Purpose:
enumeration FormatOfSheetPaper is
FOSP_A0, -- 0.841 x 1.189 (M)
FOSP_A1, -- 0.594 x 0.841 (M)
FOSP_A2, -- 0.420 x 0.594 (M)
FOSP_A3, -- 0.297 x 0.420 (M)
FOSP_A4, -- 0.210 x 0.297 (M)
FOSP_A5, -- 0.1485 x 0.210 (M)
FOSP_K_LONG, -- 1.016 x 3.6322 (M)
FOSP_K_SHORT, -- 1.016 x 1.397 (M)
FOSP_J_LONG, -- 0.8636 x 4.4704 (M)
FOSP_J_SHORT, -- 0.8636 x 1.397 (M)
FOSP_H_LONG, -- 0.7112 x 3.6322 (M)
FOSP_H_SHORT, -- 0.7112 x 1.1176 (M)
FOSP_G_LONG, -- 0.2794 x 2.286 (M)
FOSP_G_SHORT, -- 0.2794 x 0.5715 (M)
FOSP_F, -- 0.7112 x 1.016 (M)
FOSP_E, -- 0.8636 x 1.1176 (M)
FOSP_D, -- 0.5588 x 0.8636 (M)
FOSP_C, -- 0.4318 x 0.5588 (M)
FOSP_B, -- 0.2794 x 0.4318 (M)
FOSP_A, -- 0.2159 x 0.2794 (M)
FOSP_UNKNOWN -- User defined
end FormatOfSheetPaper;
---Purpose:
enumeration TypeOfPrimitive is enumeration TypeOfPrimitive is
TOP_UNKNOWN, TOP_UNKNOWN,
TOP_POLYLINE, TOP_POLYLINE,
@ -629,37 +526,7 @@ is
-- Category: Instantiated classes -- Category: Instantiated classes
--------------------------------- ---------------------------------
class Array1OfEdge instantiates
Array1 from TCollection (Edge from Aspect);
---Category: Instantiated classes
class SequenceOfColor instantiates class SequenceOfColor instantiates
Sequence from TCollection(Color from Quantity); Sequence from TCollection(Color from Quantity);
----------------------------
-- Category: Package methods
----------------------------
ValuesOfFOSP (aFOSP : FormatOfSheetPaper from Aspect;
aWidth, aHeight : out Length from Quantity)
returns CString from Standard;
---Level: Internal
---Purpose: Returns the format size according to the default
-- LENGTH unit of the required format <aFOSP>.
-- Returns more the normalized format name.
---Category: Package methods
ToCString (aString: ExtendedString from TCollection)
returns CString from Standard;
---Level: Internal
---Purpose: Translates an ExtendedString to a CString
-- depending of the local format.
---Category: Package methods
Inverse ( aMat : Array2OfReal from TColStd;
Inv : out Array2OfReal from TColStd )
returns Boolean from Standard;
---Level: Internal
---Purpose: Inverses <aMat> a 4x4 matrix.
end Aspect; end Aspect;

View File

@ -1,288 +0,0 @@
// Created by: CAL
// Copyright (c) 1996-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.
#define XTRACE
#define UNICOD //GG_041196
// Conformite UNICODE
// Modified 22/12/97 : FMN ; Remplacement getenv par OSD_Environment
// 27/12/98 : FMN ; PERF: OPTIMISATION LOADER (LOPTIM)
// JR 02.01.100 : Implicit conversions
//-Design Implementation des methodes de package
#include <Aspect.hxx>
#include <Aspect_Units.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
#ifdef UNICOD
#include <Resource_Unicode.hxx>
#include <stdlib.h>
#endif
#include <TColStd_Array2OfReal.hxx>
#include <OSD_Environment.hxx>
# include <stdio.h>
// Valeurs en cms !
static Quantity_Length Widths[20] = {
84.1, 59.4, 42.0, 29.7, 21.0,
14.85, 101.6, 101.6, 86.36, 86.36,
71.12, 71.12, 27.94, 27.94, 71.12,
86.36, 55.88, 43.18, 27.94, 21.59
};
static Quantity_Length Heights[20] = {
118.9, 84.1, 59.4, 42.0, 29.7,
21.0, 363.22, 139.7, 447.04, 139.7,
363.22, 111.76, 228.6, 57.15, 101.6,
111.76, 86.36, 55.88, 43.18, 27.94
};
static Standard_CString Fnames[] = {
"A0","A1","A2","A3","A4","A5","KL","KS","JL","JS","HL","HS","GL","GS","F","E","D","C","B","A"
};
#define LOPTIM
#ifndef LOPTIM
static TCollection_AsciiString astring;
static TCollection_ExtendedString estring;
#else
static TCollection_AsciiString& _astring() {
static TCollection_AsciiString astring;
return astring;
}
#define astring _astring()
static TCollection_ExtendedString& _estring() {
static TCollection_ExtendedString estring;
return estring;
}
#define estring _estring()
#endif // LOPTIM
// Returns size in meters
Standard_CString Aspect::ValuesOfFOSP (
const Aspect_FormatOfSheetPaper aFOSP,
Quantity_Length& Width,
Quantity_Length& Height) {
Standard_Integer Index = Standard_Integer (aFOSP);
Width = Quantity_Length (Widths[Index]) CENTIMETER;
Height = Quantity_Length (Heights[Index]) CENTIMETER;
return Fnames[Index];
}
//=========================================================================
Standard_CString Aspect::ToCString(const TCollection_ExtendedString &aString) {
Standard_PCharacter pstring;
#ifdef UNICOD
Standard_Integer max_string = 2*aString.Length() + 2;
astring = TCollection_AsciiString(max_string,' ');
pstring = (Standard_PCharacter)astring.ToCString();
estring = aString;
Resource_FormatType aType = Resource_Unicode::GetFormat();
if( (aType == Resource_EUC) || (aType == Resource_SJIS) ) {
Standard_Integer i;
Standard_ExtCharacter c;
for( i=1 ; i<=aString.Length() ; i++ ) {
c = estring.Value(i);
if( (c >= 0) && (c <= Standard_ExtCharacter(0x0020)) ) {
c = Standard_ExtCharacter(0x3000);
estring.SetValue(i,c);
} else if( (c > Standard_ExtCharacter(0x0020)) &&
(c <= Standard_ExtCharacter(0x007F)) ) {
c += Standard_ExtCharacter((unsigned short)0xFEE0);
estring.SetValue(i,c);
}
}
}
// char *jf = getenv("CSF_JIS_Font");
// if (((aType == Resource_EUC) || (aType == Resource_SJIS)) && (jf!=((char *)0))) {
OSD_Environment aVariable("CSF_JIS_Font");
TCollection_AsciiString jf(aVariable.Value());
if (((aType == Resource_EUC) || (aType == Resource_SJIS)) && (jf.Length() != 0)) {
Standard_PCharacter p;
Resource_Unicode::ConvertUnicodeToEUC(estring,
pstring,
max_string);
p=(Standard_PCharacter)pstring;
while ((*p)!='\0') {
*p &= 0x7F ;
p++;
}
}
else if( !Resource_Unicode::ConvertUnicodeToFormat(estring,
pstring,
max_string) )
printf(" Aspect::ToCString.BAD string length %d\n",max_string);
#else
if( aString.IsAscii() ) {
astring = aString; pstring = astring.ToCString();
} else {
pstring = (Standard_CString) aString.ToExtString();
}
#endif
return pstring;
}
Standard_Boolean Aspect::Inverse (const TColStd_Array2OfReal& aMat, TColStd_Array2OfReal& Result) {
Standard_Integer lr, ur, lc, uc;
Standard_Integer i, j, k, l;
Standard_Boolean BResult = Standard_False;
lr = aMat.LowerRow ();
ur = aMat.UpperRow ();
lc = aMat.LowerCol ();
uc = aMat.UpperCol ();
if ( (ur - lr + 1 != 4) || (uc - lc + 1 != 4) ) {
#ifdef TRACE
cout << "Inverse () : aMat not a 4x4 matrix" << endl << flush;
cout << "Inverse returns False => Error\n" << flush;
#endif
return BResult;
}
lr = Result.LowerRow ();
ur = Result.UpperRow ();
lc = Result.LowerCol ();
uc = Result.UpperCol ();
if ( (ur - lr + 1 != 4) || (uc - lc + 1 != 4) ) {
#ifdef TRACE
cout << "Inverse () : Result not a 4x4 matrix" << endl << flush;
cout << "Inverse returns False => Error\n" << flush;
#endif
return BResult;
}
Standard_Integer ip1;
float a [5][9];
float amax, p;
int tperm [5][3];
int perm = 0;
for (i=1; i<=4; i++)
for (j=1; j<=4; j++) {
// a [i][j] = aMat (lr + i - 1, lc + j - 1);
a [i][j] = (float ) aMat (lr + i - 1, lc + j - 1);
if (i == j) Result (lr + i - 1, lc + j - 1) = 1.;
else Result (lr + i - 1, lc + j - 1) = 0.;
}
for (i=1; i<=4; i++)
for (j=5; j<=8; j++)
if (i == j-4) a [i][j] = 1.;
else a [i][j] = 0.;
#ifdef TRACE
cout << "Matrice :\n";
for (i=1; i<=4; i++) {
for (j=1; j<=4; j++)
cout << a [i][j] << " ";
cout << endl;
}
cout << flush;
#endif
for (i=1; i<=4; i++) {
ip1 = i + 1;
if (ip1 <= 4) {
/* Recherche pivot maximal */
l = i;
// amax = fabs (a [i][i]);
amax = (float ) fabs (a [i][i]);
for (k=ip1; k<=4; k++) {
if (amax < fabs (a [k][i])) {
l = k;
// amax = fabs (a [k][i]);
amax = (float ) fabs (a [k][i]);
} /* if (amax < abs (a [k][i])) */
}
/* Permutation eventuelle */
if (l != i) {
#ifdef TRACE
cout << "permutation des lignes "
<< l << " et " << i << "\n" << flush;
#endif
perm ++;
tperm [perm][1] = l;
tperm [perm][2] = i;
for (j=1; j<=4; j++) {
p = a [i][j];
a [i][j] = a [l][j];
a [l][j] = p;
}
} /* if (l != i) */
} /* if (ip1 <= 4) */
p = a [i][i];
if (p == 0.) {
#ifdef TRACE
cout << "p == 0.\n" << flush;
cout << "Inverse returns False => Error\n" << flush;
#endif
return BResult;
}
/* Substitution */
for (j=1; j<=4; j++)
a [i][j] = a [i][j]/p;
for (k=1; k<=4; k++)
if (k != i)
for (j=1; j<=4; j++)
if (j != i) a [k][j] = a [k][j] - a [k][i]*a [i][j];
for (k=1; k<=4; k++)
a [k][i] = - a [k][i]/p;
a [i][i] = - a [i][i];
} /* for (i=1; i<=4; i++) */
/* Remise en ordre */
for (k=perm; k>0; k--) {
#ifdef TRACE
cout << "permutation des colonnes "
<< tperm[k][1] << " et " << tperm[k][2] << "\n" << flush;
#endif
for (i=1; i<=4; i++) {
p = a [i][tperm[k][1]];
a [i][tperm[k][1]] = a [i][tperm[k][2]];
a [i][tperm[k][2]] = p;
}
}
for (i=1; i<=4; i++)
for (j=1; j<=4; j++)
Result (lr + i - 1, lc + j - 1) = a [i][j];
#ifdef TRACE
cout << "Inverse :\n";
for (i=lr; i<=ur; i++) {
for (j=lc; j<=uc; j++)
cout << Result (i, j) << " ";
cout << endl;
}
cout << "Inverse returns True => Ok\n" << flush;
#endif
return Standard_True;
}

View File

@ -1,116 +0,0 @@
-- Created on: 1991-11-04
-- Created by: NW,JPB,CAL
-- Copyright (c) 1991-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.
class Edge from Aspect
---Version:
---Purpose: This class allows the definition of an edge.
---Keywords: Edge, Visible, Invisible, Border, Line, Face
---Warning:
---References:
uses
TypeOfEdge from Aspect
raises
EdgeDefinitionError from Aspect
is
Create
returns Edge from Aspect;
---Level: Public
---Purpose: Creates an edge.
Create ( AIndex1, AIndex2 : Integer from Standard;
AType : TypeOfEdge from Aspect )
returns Edge from Aspect
---Level: Public
---Purpose: Creates an edge from an index of vertices
-- in a table of vertices.
-- <AType> indicates if this edge is seen or not.
-- Warning: Raises EdgeDefinitionError if AIndex1 == AIndex2.
raises EdgeDefinitionError from Aspect;
---------------------------------------------------
-- Category: Methods to modify the class definition
---------------------------------------------------
SetValues ( me : in out;
AIndex1, AIndex2 : Integer from Standard;
AType : TypeOfEdge from Aspect )
---Level: Public
---Purpose: Updates the values of an edge <me>.
-- Warning: Raises EdgeDefinitionError if AIndex1 == AIndex2.
raises EdgeDefinitionError from Aspect;
----------------------------
-- Category: Inquire methods
----------------------------
Values ( me;
AIndex1, AIndex2 : out Integer from Standard;
AType : out TypeOfEdge from Aspect );
---Level: Public
---Purpose: Returns the index of the vertices and the
-- type of edge <me>.
---Category: Inquire methods
FirstIndex ( me )
returns Integer from Standard;
---Level: Public
---Purpose: Returns the index of the begin of the edge <me>.
---Category: Inquire methods
LastIndex ( me )
returns Integer from Standard;
---Level: Public
---Purpose: Returns the index of the end of the edge <me>.
---Category: Inquire methods
Type ( me)
returns TypeOfEdge from Aspect;
---Level: Public
---Purpose: Returns the type of the edge <me>.
---Category: Inquire methods
--
fields
--
-- Class : Aspect_Edge
--
-- Purpose : Declaration of variables specific to edges
--
-- Reminder : An edge is defined by :
-- - two vertices referenced by indices
-- - its visibility
--
-- indices of the vertices
MyBegin : Integer from Standard;
MyEnd : Integer from Standard;
-- the visibility
MyVisibility : TypeOfEdge from Aspect;
end Edge;

View File

@ -1,104 +0,0 @@
// Created by: NW,JPB,CAL
// Copyright (c) 1991-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.
//-Version
//-Design Declaration des variables specifiques aux aretes
//-Warning Une arete est definie par :
// - les 2 sommets references par des indices
// - la visibilite
//-References
//-Language C++ 2.0
//-Declarations
// for the class
#include <Aspect_Edge.ixx>
//-Aliases
//-Global data definitions
// -- les indices des sommets extremite
// MyBegin : Standard_Integer;
// MyEnd : Standard_Integer;
// -- la visibilite
// MyVisibility : TypeOfEdge;
//-Constructors
//-Destructors
//-Methods, in order
Aspect_Edge::Aspect_Edge () {
MyBegin = 0;
MyEnd = 0;
MyVisibility = Aspect_TOE_INVISIBLE;
}
Aspect_Edge::Aspect_Edge (const Standard_Integer AIndex1, const Standard_Integer AIndex2, const Aspect_TypeOfEdge AType) {
if (AIndex1 == AIndex2)
Aspect_EdgeDefinitionError::Raise ("Bad index for the edge");
MyBegin = AIndex1;
MyEnd = AIndex2;
MyVisibility = AType;
}
void Aspect_Edge::SetValues (const Standard_Integer AIndex1, const Standard_Integer AIndex2, const Aspect_TypeOfEdge AType) {
if (AIndex1 == AIndex2)
Aspect_EdgeDefinitionError::Raise ("Bad index for the edge");
MyBegin = AIndex1;
MyEnd = AIndex2;
MyVisibility = AType;
}
void Aspect_Edge::Values (Standard_Integer& AIndex1, Standard_Integer& AIndex2, Aspect_TypeOfEdge& AType) const {
AIndex1 = MyBegin;
AIndex2 = MyEnd;
AType = MyVisibility;
}
Standard_Integer Aspect_Edge::FirstIndex () const {
return (MyBegin);
}
Standard_Integer Aspect_Edge::LastIndex () const {
return (MyEnd);
}
Aspect_TypeOfEdge Aspect_Edge::Type () const {
return (MyVisibility);
}

View File

@ -42,7 +42,6 @@ uses
PixMap from Image, PixMap from Image,
Array1OfEdge from Aspect,
CLayer2d from Aspect, CLayer2d from Aspect,
TypeOfTriedronEcho from Aspect, TypeOfTriedronEcho from Aspect,
TypeOfTriedronPosition from Aspect, TypeOfTriedronPosition from Aspect,

View File

@ -60,9 +60,6 @@ deferred class Group from Graphic3d inherits TShared
PlaneAngle from Quantity, PlaneAngle from Quantity,
Array1OfEdge from Aspect,
Edge from Aspect,
GroupAspect from Graphic3d, GroupAspect from Graphic3d,
AspectLine3d from Graphic3d, AspectLine3d from Graphic3d,
AspectMarker3d from Graphic3d, AspectMarker3d from Graphic3d,

View File

@ -64,7 +64,6 @@ class TColStd_HArray1OfByte;
class Graphic3d_Vector; class Graphic3d_Vector;
class Quantity_Color; class Quantity_Color;
class Graphic3d_Vertex; class Graphic3d_Vertex;
class Aspect_Array1OfEdge;
class TCollection_ExtendedString; class TCollection_ExtendedString;
class Image_PixMap; class Image_PixMap;
class TColStd_HArray1OfReal; class TColStd_HArray1OfReal;

View File

@ -17,8 +17,6 @@
#include <gp_Dir2d.hxx> #include <gp_Dir2d.hxx>
#include <Aspect.hxx>
#include <V3d_RectangularGrid.hxx> #include <V3d_RectangularGrid.hxx>
#include <V3d_CircularGrid.hxx> #include <V3d_CircularGrid.hxx>

View File

@ -59,7 +59,6 @@
#include <Standard_ErrorHandler.hxx> #include <Standard_ErrorHandler.hxx>
#include <Aspect.hxx>
#include <Aspect_IdentDefinitionError.hxx> #include <Aspect_IdentDefinitionError.hxx>
#include <Graphic3d_GraphicDriver.hxx> #include <Graphic3d_GraphicDriver.hxx>