diff --git a/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp b/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp index c4d0b5065a..a717f34196 100755 --- a/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp +++ b/samples/mfc/standard/01_Geometry/src/GeometryView2D.cpp @@ -7,7 +7,6 @@ #include "GeometryView2D.h" #include ".\Resource2d\RectangularGrid.h" #include ".\Resource2d\CircularGrid.h" -#include ///////////////////////////////////////////////////////////////////////////// // CNSGView diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp index b754248153..80cfbfc527 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.cpp @@ -28,14 +28,13 @@ ISession_Text::ISession_Text const Standard_Real anX , // = 0 const Standard_Real anY , // = 0 const Standard_Real aZ , // = 0 - const Aspect_TypeOfText aType, // = SOLID, const Quantity_PlaneAngle anAngle, // = 0.0 const Standard_Real aslant, // = 0.0 const Standard_Integer aColorIndex, // = 0 const Standard_Integer aFontIndex, // = 1 const Quantity_Factor aScale) // = 1 :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) { @@ -44,14 +43,13 @@ ISession_Text::ISession_Text ISession_Text::ISession_Text (const TCollection_AsciiString& aText, gp_Pnt& aPoint, - const Aspect_TypeOfText aType, // = SOLID, const Quantity_PlaneAngle anAngle, // = 0.0 const Standard_Real aslant, // = 0.0 const Standard_Integer aColorIndex, // = 0 const Standard_Integer aFontIndex, // = 1 const Quantity_Factor aScale) // = 1 :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) { diff --git a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h index b7e6ccbd43..6ad46da0e4 100755 --- a/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h +++ b/samples/mfc/standard/01_Geometry/src/ISession2D/ISession_Text.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include @@ -37,7 +36,6 @@ public: const Standard_Real anX = 0 , const Standard_Real anY = 0 , const Standard_Real aZ = 0 , - const Aspect_TypeOfText aType = Aspect_TOT_SOLID, const Quantity_PlaneAngle anAngle = 0.0 , const Standard_Real aSlant = 0.0 , const Standard_Integer aColorIndex = 1 , @@ -46,7 +44,6 @@ public: ISession_Text (const TCollection_AsciiString& aText, gp_Pnt& aPoint, - const Aspect_TypeOfText aType = Aspect_TOT_SOLID, const Quantity_PlaneAngle anAngle = 0.0 , const Standard_Real aSlant = 0.0 , const Standard_Integer aColorIndex = 1 , @@ -60,8 +57,6 @@ inline TCollection_AsciiString GetText() const; inline void SetText(const TCollection_AsciiString& atext) ; 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 Aspect_TypeOfText GetTypeOfText() const; -inline void SetTypeOfText(const Aspect_TypeOfText aNewTypeOfText) ; inline Standard_Real GetAngle() const; inline void SetAngle(const Standard_Real aNewAngle) ; inline Standard_Real GetSlant() const; @@ -93,7 +88,6 @@ TCollection_AsciiString MyText ; Standard_Real MyX ; Standard_Real MyY ; Standard_Real MyZ ; -Aspect_TypeOfText MyTypeOfText ; Standard_Real MyAngle ; Standard_Real MySlant ; 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) { 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 { return MyAngle; } diff --git a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h b/samples/mfc/standard/03_Viewer2d/src/StdAfx.h index 41ca686937..25988578f8 100755 --- a/samples/mfc/standard/03_Viewer2d/src/StdAfx.h +++ b/samples/mfc/standard/03_Viewer2d/src/StdAfx.h @@ -83,7 +83,6 @@ #include #include #include -#include #include #include diff --git a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp index 769d7c7685..6e7881ec17 100755 --- a/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp +++ b/samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp @@ -72,7 +72,6 @@ void CViewer2dDoc::OnBUTTONTestText() Handle (Sample2D_Text) aText = new Sample2D_Text(Text, gp_Pnt(0.0,15.0*(j-15.0),0.0), // thePosition - Aspect_TOT_SOLID, // theType 10.0*M_PI, // theAngle (Quantity_NameOfColor)(aColor++), // theColor Font_FA_Regular, // theFontAspect @@ -91,7 +90,6 @@ void CViewer2dDoc::OnBUTTONTestText() Handle (Sample2D_Text) aText = new Sample2D_Text(Text, gp_Pnt(80.,15.0*(j-10.0),0.0), // thePosition - Aspect_TOT_SOLID, // theType 0.0, // theAngle (Quantity_NameOfColor)(aColor++), // theColor Font_FA_BoldItalic, // theFontAspect @@ -110,7 +108,6 @@ void CViewer2dDoc::OnBUTTONTestText() Handle (Sample2D_Text) aText = new Sample2D_Text(Text, gp_Pnt(140.0,15.0*(j-5.0),0.0), // thePosition - Aspect_TOT_SOLID, // theType 0.0, // theAngle (Quantity_NameOfColor)(aColor++), // theColor Font_FA_Bold, // theFontAspect @@ -127,7 +124,6 @@ for (j=10;j<=15;j++) Handle (Sample2D_Text) aText = new Sample2D_Text(Text, gp_Pnt(200.0,15.0*(j-10.0),0.0), // thePosition - Aspect_TOT_SOLID, // theType 0.0, // theAngle (Quantity_NameOfColor)(aColor++),// theColor Font_FA_Italic, // theFontAspect diff --git a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h b/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h index 6f76a04eec..56dbfb25bf 100755 --- a/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h +++ b/samples/mfc/standard/04_Viewer3d/src/TrihedronDlg.h @@ -10,7 +10,6 @@ #include "Viewer3dDoc.h" #include -#include #include #include "..\res\resource.h" diff --git a/samples/mfc/standard/05_ImportExport/src/StdAfx.h b/samples/mfc/standard/05_ImportExport/src/StdAfx.h index bea49f251d..96e806eb54 100755 --- a/samples/mfc/standard/05_ImportExport/src/StdAfx.h +++ b/samples/mfc/standard/05_ImportExport/src/StdAfx.h @@ -51,7 +51,6 @@ #include #include -#include #include #include #include diff --git a/samples/mfc/standard/06_Ocaf/src/StdAfx.h b/samples/mfc/standard/06_Ocaf/src/StdAfx.h index 69b5e293f9..4a8af24a66 100755 --- a/samples/mfc/standard/06_Ocaf/src/StdAfx.h +++ b/samples/mfc/standard/06_Ocaf/src/StdAfx.h @@ -48,7 +48,6 @@ #include #include -#include #include #include #include diff --git a/samples/mfc/standard/08_HLR/src/StdAfx.h b/samples/mfc/standard/08_HLR/src/StdAfx.h index aa6708e925..f7347b9bd6 100755 --- a/samples/mfc/standard/08_HLR/src/StdAfx.h +++ b/samples/mfc/standard/08_HLR/src/StdAfx.h @@ -114,7 +114,6 @@ #include #include -#include #include #include #include diff --git a/samples/mfc/standard/09_Animation/src/StdAfx.h b/samples/mfc/standard/09_Animation/src/StdAfx.h index 9e7a499bf3..4a3b5ed00d 100755 --- a/samples/mfc/standard/09_Animation/src/StdAfx.h +++ b/samples/mfc/standard/09_Animation/src/StdAfx.h @@ -125,7 +125,6 @@ enum CurrentAction3d { #include #include -#include #include #include #include diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h index fc38854d7f..3a38e51fb4 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Image.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Image.h @@ -5,7 +5,6 @@ #include #include -#include #include #include #include diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp b/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp index cc71e63622..98d812b7ff 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.cpp @@ -7,7 +7,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Sample2D_Text,AIS_InteractiveObject) Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText, const gp_Pnt& thePosition, - const Aspect_TypeOfText theType, const Quantity_PlaneAngle theAngle, const Quantity_Color theColor, const Font_FontAspect theFontAspect, @@ -20,7 +19,6 @@ Sample2D_Text::Sample2D_Text (const TCollection_AsciiString& theText, { myText = theText ; myPosition = thePosition ; - myTypeOfText = theType ; myAngle = theAngle ; myColor = theColor ; myFontAspect = theFontAspect; diff --git a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h index a4d1e22df0..1d5af73301 100755 --- a/samples/mfc/standard/Common/Primitive/Sample2D_Text.h +++ b/samples/mfc/standard/Common/Primitive/Sample2D_Text.h @@ -15,7 +15,6 @@ public: Standard_EXPORT 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_Color theColor = Quantity_NOC_YELLOW, 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 GetCoord(gp_Pnt& thePosition) const { thePosition=gp_Pnt(myPosition); } 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 void SetAngle(const Standard_Real theAngle) { myAngle = theAngle; } inline Quantity_Color GetColor() const { return myColor; } @@ -58,7 +55,6 @@ private: TCollection_AsciiString myText ; gp_Pnt myPosition ; -Aspect_TypeOfText myTypeOfText ; Standard_Real myAngle ; Quantity_Color myColor ; Standard_CString myFont ; diff --git a/samples/mfc/standard/Common/StdAfx.h b/samples/mfc/standard/Common/StdAfx.h index 175a1116e5..7b16de8717 100755 --- a/samples/mfc/standard/Common/StdAfx.h +++ b/samples/mfc/standard/Common/StdAfx.h @@ -35,7 +35,6 @@ #include #include #include -#include #include #include diff --git a/samples/mfc/standard/Common/User_Cylinder.cxx b/samples/mfc/standard/Common/User_Cylinder.cxx index 20b543006c..cac51bb93e 100755 --- a/samples/mfc/standard/Common/User_Cylinder.cxx +++ b/samples/mfc/standard/Common/User_Cylinder.cxx @@ -19,7 +19,6 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject) #include #include #include -#include #include #include #include diff --git a/src/Aspect/Aspect.cdl b/src/Aspect/Aspect.cdl index b58798d3ec..a199905619 100644 --- a/src/Aspect/Aspect.cdl +++ b/src/Aspect/Aspect.cdl @@ -13,32 +13,6 @@ -- Alternatively, this file may be used under the terms of Open CASCADE -- 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 ---Version: @@ -106,9 +80,6 @@ is exception BadAccess inherits DomainError; ---Category: Exceptions - exception EdgeDefinitionError inherits OutOfRange; - ---Category: Exceptions - exception IdentDefinitionError inherits OutOfRange; ---Category: Exceptions @@ -150,9 +121,6 @@ is class GradientBackground; ---Category: Classes - class Edge; - ---Category: Classes - class GenId; ---Category: Classes @@ -292,29 +260,6 @@ is -- WOL_USERDEFINED defined by Users ---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, TOST_ANNOTATION end TypeOfStyleText; @@ -407,54 +352,6 @@ is ---Purpose: Defines the type of Resize Window method applied -- 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 TOP_UNKNOWN, TOP_POLYLINE, @@ -629,37 +526,7 @@ is -- Category: Instantiated classes --------------------------------- - class Array1OfEdge instantiates - Array1 from TCollection (Edge from Aspect); - ---Category: Instantiated classes - class SequenceOfColor instantiates 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 . - -- 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 a 4x4 matrix. - end Aspect; diff --git a/src/Aspect/Aspect.cxx b/src/Aspect/Aspect.cxx deleted file mode 100644 index f558450d82..0000000000 --- a/src/Aspect/Aspect.cxx +++ /dev/null @@ -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 -#include -#include -#include -#ifdef UNICOD -#include -#include -#endif - -#include -#include - -# include - -// 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; -} diff --git a/src/Aspect/Aspect_Edge.cdl b/src/Aspect/Aspect_Edge.cdl deleted file mode 100644 index 5cdfc01c81..0000000000 --- a/src/Aspect/Aspect_Edge.cdl +++ /dev/null @@ -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. - -- 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 . - -- 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 . - ---Category: Inquire methods - - FirstIndex ( me ) - returns Integer from Standard; - ---Level: Public - ---Purpose: Returns the index of the begin of the edge . - ---Category: Inquire methods - - LastIndex ( me ) - returns Integer from Standard; - ---Level: Public - ---Purpose: Returns the index of the end of the edge . - ---Category: Inquire methods - - Type ( me) - returns TypeOfEdge from Aspect; - ---Level: Public - ---Purpose: Returns the type of the edge . - ---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; diff --git a/src/Aspect/Aspect_Edge.cxx b/src/Aspect/Aspect_Edge.cxx deleted file mode 100644 index 6ced287732..0000000000 --- a/src/Aspect/Aspect_Edge.cxx +++ /dev/null @@ -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 - -//-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); - -} diff --git a/src/Graphic3d/Graphic3d_GraphicDriver.cdl b/src/Graphic3d/Graphic3d_GraphicDriver.cdl index 8203a5806b..1145d25b89 100644 --- a/src/Graphic3d/Graphic3d_GraphicDriver.cdl +++ b/src/Graphic3d/Graphic3d_GraphicDriver.cdl @@ -42,7 +42,6 @@ uses PixMap from Image, - Array1OfEdge from Aspect, CLayer2d from Aspect, TypeOfTriedronEcho from Aspect, TypeOfTriedronPosition from Aspect, diff --git a/src/Graphic3d/Graphic3d_Group.cdl b/src/Graphic3d/Graphic3d_Group.cdl index 44f0c26e4e..3c4d230ecc 100644 --- a/src/Graphic3d/Graphic3d_Group.cdl +++ b/src/Graphic3d/Graphic3d_Group.cdl @@ -59,10 +59,7 @@ deferred class Group from Graphic3d inherits TShared ExtendedString from TCollection, PlaneAngle from Quantity, - - Array1OfEdge from Aspect, - Edge from Aspect, - + GroupAspect from Graphic3d, AspectLine3d from Graphic3d, AspectMarker3d from Graphic3d, diff --git a/src/OpenGl/OpenGl_GraphicDriver.hxx b/src/OpenGl/OpenGl_GraphicDriver.hxx index 9df98f1767..7eb94c14cd 100644 --- a/src/OpenGl/OpenGl_GraphicDriver.hxx +++ b/src/OpenGl/OpenGl_GraphicDriver.hxx @@ -64,7 +64,6 @@ class TColStd_HArray1OfByte; class Graphic3d_Vector; class Quantity_Color; class Graphic3d_Vertex; -class Aspect_Array1OfEdge; class TCollection_ExtendedString; class Image_PixMap; class TColStd_HArray1OfReal; diff --git a/src/V3d/V3d_View_4.cxx b/src/V3d/V3d_View_4.cxx index 5062485d4c..7b44fdec93 100644 --- a/src/V3d/V3d_View_4.cxx +++ b/src/V3d/V3d_View_4.cxx @@ -17,8 +17,6 @@ #include -#include - #include #include diff --git a/src/Visual3d/Visual3d_ViewManager.cxx b/src/Visual3d/Visual3d_ViewManager.cxx index 1ac96a3d98..9bfa0f5bb4 100644 --- a/src/Visual3d/Visual3d_ViewManager.cxx +++ b/src/Visual3d/Visual3d_ViewManager.cxx @@ -59,7 +59,6 @@ #include -#include #include #include