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

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,203 +0,0 @@
-- Created on: 1991-04-24
-- Created by: Arnaud BOUZY
-- 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.
package Draw
---Purpose: MAQUETTE DESSIN MODELISATION
uses OSD, MMgt, TCollection, TColStd, gp, Message
is
exception Failure inherits Failure from Standard;
enumeration ColorKind is blanc,
--white in english
rouge,
--red in english
vert,
--green in english
bleu,
--blue in english
cyan,
-- same in english
or,
--gold in english
magenta,
--same in english
marron,
--brown in english
orange,
--same in english
rose,
--pink in english
saumon,
--salmon in english
violet,
--same in english
jaune,
--yellow in english
kaki,
--DarkOliveGreen in english
corail;
--Coral in english
enumeration MarkerShape is
Square, Losange, X, Plus, Circle, CircleZoom;
---Purpose: Circle is not sensible to zoom, like
-- other MarkerShape, contrarily to CircleZoom
deferred class Drawable3D;
deferred class Drawable2D;
class Color;
class Display;
class Segment3D;
class Segment2D;
class Marker3D;
class Marker2D;
class Axis3D;
class Axis2D;
class Text3D;
class Text2D;
class Circle3D;
class Circle2D;
class Number;
class Chronometer;
class Grid;
class Box;
imported SequenceOfDrawable3D;
class ProgressIndicator;
imported PInterp;
primitive CommandFunction;
imported Interpretor;
class Printer;
imported MapOfAsciiString;
Load(theDI: out Interpretor from Draw;
theKey, theResourceFileName: AsciiString from TCollection;
theDefaultsDirectory, theUserDefaultsDirectory: in out AsciiString from TCollection;
Verbose : Boolean from Standard = Standard_False)
raises Failure from Draw;
--
-- methods to handle variables
--
Set(Name : CString;
D : Drawable3D from Draw;
Disp : Boolean from Standard);
---Purpose: Sets a variable. Display it if <Disp> is true.
Set(Name : CString;
D : Drawable3D from Draw);
---Purpose: Sets a variable, a null handle clear the
-- vartiable. Automatic display is context driven.
Set(Name : CString;
val : Real);
---Purpose: Sets a numeric variable.
Get(Name : in out CString;
Complain : Boolean = Standard_True)
returns Drawable3D from Draw;
---Purpose: Returns a variable value. Null if the variable
-- does not exist, a warning is printed if Complain
-- is True.
--
-- The name "." does a graphic selection. If the
-- selection is a variable <Name> is overwritten with
-- the name of the variable.
Get(Name : CString;
val : out Real)
returns Boolean;
---Purpose: Gets a numeric variable. Returns True if the
-- variable exist.
Set(Name : CString; val : CString);
---Purpose: Sets a TCL sting variable
Atof(Name : CString) returns Real;
---Purpose: Converts numeric expression, that can involve DRAW
-- variables, to real value.
Atoi(Name : CString) returns Integer;
---Purpose: Converts numeric expression, that can involve DRAW
-- variables, to integer value.
-- Implemented as cast of Atof() to integer.
LastPick(view,X,Y,button : out Integer);
---Purpose: Returns last graphic selection description.
Repaint;
---Purpose: Asks to repaint the screen after the current command.
SetProgressBar(thePI: ProgressIndicator from Draw);
---Purpose: sets progress indicator
GetProgressBar returns ProgressIndicator from Draw;
---Purpose: gets progress indicator
--
-- Draw Commands
--
Commands(I : in out Interpretor from Draw);
---Purpose: Defines all Draw commands
BasicCommands(I : in out Interpretor from Draw);
---Purpose: Defines Draw basic commands
VariableCommands(I : in out Interpretor from Draw);
---Purpose: Defines Draw variables handling commands.
GraphicCommands(I : in out Interpretor from Draw);
---Purpose: Defines Draw variables handling commands.
PloadCommands(I : in out Interpretor from Draw);
---Purpose: Defines Loads Draw plugins commands.
UnitCommands(I : in out Interpretor from Draw);
---Purpose: Defines Draw unit commands
end Draw;

View File

@@ -14,32 +14,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw.ixx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <OSD.hxx>
#include <OSD_Environment.hxx>
#include <OSD_Timer.hxx>
#include <Draw_Window.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Stream.hxx>
#include <Standard_Version.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Failure.hxx>
#include <Draw_Interpretor.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Plugin_MapOfFunctions.hxx>
#include <Draw_Window.hxx>
#include <gp_Pnt2d.hxx>
#include <OSD.hxx>
#include <OSD_Environment.hxx>
#include <OSD_SharedLibrary.hxx>
#include <OSD_Timer.hxx>
#include <Plugin_MapOfFunctions.hxx>
#include <Resource_Manager.hxx>
#include <Draw_Failure.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Standard_Stream.hxx>
#include <Standard_Version.hxx>
#include <TCollection_AsciiString.hxx>
#include <tcl.h>
// on MSVC, use #pragma to define name of the Tcl library to link with,
// depending on Tcl version number
#ifdef _MSC_VER

172
src/Draw/Draw.hxx Normal file
View File

@@ -0,0 +1,172 @@
// Created on: 1991-04-24
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_HeaderFile
#define _Draw_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Draw_Interpretor.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class TCollection_AsciiString;
class Draw_Drawable3D;
class Draw_ProgressIndicator;
class Draw_Drawable3D;
class Draw_Drawable2D;
class Draw_Color;
class Draw_Display;
class Draw_Segment3D;
class Draw_Segment2D;
class Draw_Marker3D;
class Draw_Marker2D;
class Draw_Axis3D;
class Draw_Axis2D;
class Draw_Text3D;
class Draw_Text2D;
class Draw_Circle3D;
class Draw_Circle2D;
class Draw_Number;
class Draw_Chronometer;
class Draw_Grid;
class Draw_Box;
class Draw_ProgressIndicator;
class Draw_Printer;
//! MAQUETTE DESSIN MODELISATION
class Draw
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static void Load (Draw_Interpretor& theDI, const TCollection_AsciiString& theKey, const TCollection_AsciiString& theResourceFileName, TCollection_AsciiString& theDefaultsDirectory, TCollection_AsciiString& theUserDefaultsDirectory, const Standard_Boolean Verbose = Standard_False);
//! Sets a variable. Display it if <Disp> is true.
Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Draw_Drawable3D)& D, const Standard_Boolean Disp);
//! Sets a variable, a null handle clear the
//! vartiable. Automatic display is context driven.
Standard_EXPORT static void Set (const Standard_CString Name, const Handle(Draw_Drawable3D)& D);
//! Sets a numeric variable.
Standard_EXPORT static void Set (const Standard_CString Name, const Standard_Real val);
//! Returns a variable value. Null if the variable
//! does not exist, a warning is printed if Complain
//! is True.
//!
//! The name "." does a graphic selection. If the
//! selection is a variable <Name> is overwritten with
//! the name of the variable.
Standard_EXPORT static Handle(Draw_Drawable3D) Get (Standard_CString& Name, const Standard_Boolean Complain = Standard_True);
//! Gets a numeric variable. Returns True if the
//! variable exist.
Standard_EXPORT static Standard_Boolean Get (const Standard_CString Name, Standard_Real& val);
//! Sets a TCL sting variable
Standard_EXPORT static void Set (const Standard_CString Name, const Standard_CString val);
//! Converts numeric expression, that can involve DRAW
//! variables, to real value.
Standard_EXPORT static Standard_Real Atof (const Standard_CString Name);
//! Converts numeric expression, that can involve DRAW
//! variables, to integer value.
//! Implemented as cast of Atof() to integer.
Standard_EXPORT static Standard_Integer Atoi (const Standard_CString Name);
//! Returns last graphic selection description.
Standard_EXPORT static void LastPick (Standard_Integer& view, Standard_Integer& X, Standard_Integer& Y, Standard_Integer& button);
//! Asks to repaint the screen after the current command.
Standard_EXPORT static void Repaint();
//! sets progress indicator
Standard_EXPORT static void SetProgressBar (const Handle(Draw_ProgressIndicator)& thePI);
//! gets progress indicator
Standard_EXPORT static Handle(Draw_ProgressIndicator) GetProgressBar();
//! Defines all Draw commands
Standard_EXPORT static void Commands (Draw_Interpretor& I);
//! Defines Draw basic commands
Standard_EXPORT static void BasicCommands (Draw_Interpretor& I);
//! Defines Draw variables handling commands.
Standard_EXPORT static void VariableCommands (Draw_Interpretor& I);
//! Defines Draw variables handling commands.
Standard_EXPORT static void GraphicCommands (Draw_Interpretor& I);
//! Defines Loads Draw plugins commands.
Standard_EXPORT static void PloadCommands (Draw_Interpretor& I);
//! Defines Draw unit commands
Standard_EXPORT static void UnitCommands (Draw_Interpretor& I);
protected:
private:
friend class Draw_Drawable3D;
friend class Draw_Drawable2D;
friend class Draw_Color;
friend class Draw_Display;
friend class Draw_Segment3D;
friend class Draw_Segment2D;
friend class Draw_Marker3D;
friend class Draw_Marker2D;
friend class Draw_Axis3D;
friend class Draw_Axis2D;
friend class Draw_Text3D;
friend class Draw_Text2D;
friend class Draw_Circle3D;
friend class Draw_Circle2D;
friend class Draw_Number;
friend class Draw_Chronometer;
friend class Draw_Grid;
friend class Draw_Box;
friend class Draw_ProgressIndicator;
friend class Draw_Printer;
};
#endif // _Draw_HeaderFile

View File

@@ -1,45 +0,0 @@
-- Created on: 1994-04-18
-- Created by: Modelistation
-- Copyright (c) 1994-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 Axis2D from Draw inherits Drawable2D from Draw
---Purpose:
uses Pnt2d from gp,
Ax22d from gp,
Color from Draw,
Display from Draw
is
Create(col : Color; Size : Integer = 5)
returns Axis2D;
Create(p : Pnt2d; col : Color; Size : Integer = 5)
returns Axis2D;
Create(A : Ax22d from gp; col : Color; Size : Integer = 5)
returns Axis2D;
DrawOn(me; dis : in out Display);
fields
myAxes : Ax22d from gp;
myColor : Color;
mySize : Integer;
end Axis2D;

View File

@@ -14,9 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Axis2D.ixx>
#include <gp_Vec2d.hxx>
#include <Draw_Axis2D.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp.hxx>
#include <gp_Ax22d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_Type.hxx>
extern Standard_Boolean Draw_Bounds;

77
src/Draw/Draw_Axis2D.hxx Normal file
View File

@@ -0,0 +1,77 @@
// Created on: 1994-04-18
// Created by: Modelistation
// Copyright (c) 1994-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.
#ifndef _Draw_Axis2D_HeaderFile
#define _Draw_Axis2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Ax22d.hxx>
#include <Draw_Color.hxx>
#include <Standard_Integer.hxx>
#include <Draw_Drawable2D.hxx>
class Draw_Color;
class gp_Pnt2d;
class gp_Ax22d;
class Draw_Display;
class Draw_Axis2D;
DEFINE_STANDARD_HANDLE(Draw_Axis2D, Draw_Drawable2D)
class Draw_Axis2D : public Draw_Drawable2D
{
public:
Standard_EXPORT Draw_Axis2D(const Draw_Color& col, const Standard_Integer Size = 5);
Standard_EXPORT Draw_Axis2D(const gp_Pnt2d& p, const Draw_Color& col, const Standard_Integer Size = 5);
Standard_EXPORT Draw_Axis2D(const gp_Ax22d& A, const Draw_Color& col, const Standard_Integer Size = 5);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
DEFINE_STANDARD_RTTI(Draw_Axis2D,Draw_Drawable2D)
protected:
private:
gp_Ax22d myAxes;
Draw_Color myColor;
Standard_Integer mySize;
};
#endif // _Draw_Axis2D_HeaderFile

View File

@@ -1,45 +0,0 @@
-- Created on: 1992-04-29
-- Created by: Remi LEQUETTE
-- Copyright (c) 1992-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 Axis3D from Draw inherits Drawable3D from Draw
---Purpose:
uses Pnt from gp,
Ax3 from gp,
Color from Draw,
Display from Draw
is
Create(col : Color; Size : Integer = 5)
returns Axis3D;
Create(p : Pnt; col : Color; Size : Integer = 5)
returns Axis3D;
Create(A : Ax3 from gp; col : Color; Size : Integer = 5)
returns Axis3D;
DrawOn(me; dis : in out Display);
fields
myAxes : Ax3 from gp;
myColor : Color;
mySize : Integer;
end Axis3D;

View File

@@ -14,9 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Axis3D.ixx>
#include <gp_Vec.hxx>
#include <Draw_Axis3D.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp.hxx>
#include <gp_Ax3.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Standard_Type.hxx>
extern Standard_Boolean Draw_Bounds;

77
src/Draw/Draw_Axis3D.hxx Normal file
View File

@@ -0,0 +1,77 @@
// Created on: 1992-04-29
// Created by: Remi LEQUETTE
// Copyright (c) 1992-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.
#ifndef _Draw_Axis3D_HeaderFile
#define _Draw_Axis3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Ax3.hxx>
#include <Draw_Color.hxx>
#include <Standard_Integer.hxx>
#include <Draw_Drawable3D.hxx>
class Draw_Color;
class gp_Pnt;
class gp_Ax3;
class Draw_Display;
class Draw_Axis3D;
DEFINE_STANDARD_HANDLE(Draw_Axis3D, Draw_Drawable3D)
class Draw_Axis3D : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Axis3D(const Draw_Color& col, const Standard_Integer Size = 5);
Standard_EXPORT Draw_Axis3D(const gp_Pnt& p, const Draw_Color& col, const Standard_Integer Size = 5);
Standard_EXPORT Draw_Axis3D(const gp_Ax3& A, const Draw_Color& col, const Standard_Integer Size = 5);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
DEFINE_STANDARD_RTTI(Draw_Axis3D,Draw_Drawable3D)
protected:
private:
gp_Ax3 myAxes;
Draw_Color myColor;
Standard_Integer mySize;
};
#endif // _Draw_Axis3D_HeaderFile

View File

@@ -14,26 +14,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Standard_Macro.hxx>
#include <Standard_Stream.hxx>
#include <Standard_SStream.hxx>
#include <Standard_Version.hxx>
#include <Draw.ixx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <Draw_Chronometer.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Printer.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <OSD_MemInfo.hxx>
#include <OSD_MAllocHook.hxx>
#include <OSD_Chronometer.hxx>
#include <OSD.hxx>
#include <OSD_Chronometer.hxx>
#include <OSD_Exception_CTRL_BREAK.hxx>
#include <OSD_PerfMeter.h>
#include <OSD_MAllocHook.hxx>
#include <OSD_MemInfo.hxx>
#include <Standard_Macro.hxx>
#include <Standard_SStream.hxx>
#include <Standard_Stream.hxx>
#include <Standard_Version.hxx>
#include <TCollection_AsciiString.hxx>
#include <OSD_PerfMeter.h>
#ifdef _WIN32
#include <windows.h>

View File

@@ -1,52 +0,0 @@
-- Created on: 1995-03-10
-- Created by: Remi LEQUETTE
-- 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.
class Box from Draw inherits Drawable3D from Draw
---Purpose: a 3d box
uses Pnt from gp,
Color from Draw,
Display from Draw
is
Create(p1,p2 : Pnt; col : Color)
returns Box;
DrawOn(me; dis : in out Display);
First(me) returns Pnt from gp
---C++: return const&
is static;
First(me : mutable; P : Pnt from gp)
is static;
Last(me) returns Pnt from gp
---C++: return const&
is static;
Last(me : mutable; P : Pnt from gp)
is static;
fields
myFirst : Pnt;
myLast : Pnt;
myColor : Color;
end Box;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Box.ixx>
#include <Draw_Box.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Box
//purpose :
//=======================================================================
Draw_Box::Draw_Box(const gp_Pnt& p1, const gp_Pnt& p2, const Draw_Color& col) :
myFirst(p1), myLast(p2),myColor(col)
{

79
src/Draw/Draw_Box.hxx Normal file
View File

@@ -0,0 +1,79 @@
// Created on: 1995-03-10
// Created by: Remi LEQUETTE
// 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.
#ifndef _Draw_Box_HeaderFile
#define _Draw_Box_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable3D.hxx>
class gp_Pnt;
class Draw_Color;
class Draw_Display;
class Draw_Box;
DEFINE_STANDARD_HANDLE(Draw_Box, Draw_Drawable3D)
//! a 3d box
class Draw_Box : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Box(const gp_Pnt& p1, const gp_Pnt& p2, const Draw_Color& col);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
Standard_EXPORT const gp_Pnt& First() const;
Standard_EXPORT void First (const gp_Pnt& P);
Standard_EXPORT const gp_Pnt& Last() const;
Standard_EXPORT void Last (const gp_Pnt& P);
DEFINE_STANDARD_RTTI(Draw_Box,Draw_Drawable3D)
protected:
private:
gp_Pnt myFirst;
gp_Pnt myLast;
Draw_Color myColor;
};
#endif // _Draw_Box_HeaderFile

View File

@@ -1,19 +0,0 @@
-- 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.
@uses "CSF.edl";
---@string %CMPLRS_CXX_Options += " -I"%CSF_TCL_INCLUDE" -DUSE_TK";
@string %CMPLRS_CXX_Options += " " %CSF_TCL_INCLUDE;
@string %CMPLRS_CXX_Options += " " %CSF_TBB_INCLUDES;

View File

@@ -1,55 +0,0 @@
-- Created on: 1993-08-16
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 Chronometer from Draw inherits Drawable3D from Draw
---Purpose: Class to store chronometer variables.
uses
Timer from OSD,
Display from Draw,
Interpretor from Draw
is
Create returns Chronometer from Draw;
Timer(me : mutable) returns Timer from OSD
---C++: return &
is static;
DrawOn(me; dis : in out Display);
---Purpose: Does nothhing,
Copy(me) returns Drawable3D from Draw
---Purpose: For variable copy.
is redefined;
Dump(me; S : in out OStream)
---Purpose: For variable dump.
is redefined;
Whatis(me; I : in out Interpretor from Draw)
---Purpose: For variable whatis command.
is redefined;
fields
myTimer : Timer from OSD;
end Chronometer;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Chronometer.ixx>
#include <Draw_Chronometer.hxx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <OSD_Timer.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Chronometer
//purpose :
//=======================================================================
Draw_Chronometer::Draw_Chronometer()
{
}

View File

@@ -0,0 +1,82 @@
// Created on: 1993-08-16
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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.
#ifndef _Draw_Chronometer_HeaderFile
#define _Draw_Chronometer_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <OSD_Timer.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class OSD_Timer;
class Draw_Display;
class Draw_Drawable3D;
class Draw_Chronometer;
DEFINE_STANDARD_HANDLE(Draw_Chronometer, Draw_Drawable3D)
//! Class to store chronometer variables.
class Draw_Chronometer : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Chronometer();
Standard_EXPORT OSD_Timer& Timer();
//! Does nothhing,
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
//! For variable copy.
Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
//! For variable dump.
Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
//! For variable whatis command.
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Chronometer,Draw_Drawable3D)
protected:
private:
OSD_Timer myTimer;
};
#endif // _Draw_Chronometer_HeaderFile

View File

@@ -1,41 +0,0 @@
-- Created on: 1994-04-18
-- Created by: Modelistation
-- Copyright (c) 1994-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 Circle2D from Draw inherits Drawable2D from Draw
---Purpose:
uses
Circ2d from gp,
Color from Draw,
Display from Draw
is
Create(C : Circ2d from gp; A1,A2 : Real; col : Color)
returns Circle2D;
DrawOn(me; dis : in out Display);
fields
myCirc : Circ2d from gp;
myA1 : Real;
myA2 : Real;
myColor : Color;
end Circle2D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Circle2D.ixx>
#include <Draw_Circle2D.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp_Circ2d.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Circle2D
//purpose :
//=======================================================================
Draw_Circle2D::Draw_Circle2D(const gp_Circ2d& C,
const Standard_Real A1, const Standard_Real A2,
const Draw_Color& col) :

View File

@@ -0,0 +1,73 @@
// Created on: 1994-04-18
// Created by: Modelistation
// Copyright (c) 1994-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.
#ifndef _Draw_Circle2D_HeaderFile
#define _Draw_Circle2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Circ2d.hxx>
#include <Standard_Real.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable2D.hxx>
class gp_Circ2d;
class Draw_Color;
class Draw_Display;
class Draw_Circle2D;
DEFINE_STANDARD_HANDLE(Draw_Circle2D, Draw_Drawable2D)
class Draw_Circle2D : public Draw_Drawable2D
{
public:
Standard_EXPORT Draw_Circle2D(const gp_Circ2d& C, const Standard_Real A1, const Standard_Real A2, const Draw_Color& col);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
DEFINE_STANDARD_RTTI(Draw_Circle2D,Draw_Drawable2D)
protected:
private:
gp_Circ2d myCirc;
Standard_Real myA1;
Standard_Real myA2;
Draw_Color myColor;
};
#endif // _Draw_Circle2D_HeaderFile

View File

@@ -1,41 +0,0 @@
-- Created on: 1992-04-30
-- Created by: Remi LEQUETTE
-- Copyright (c) 1992-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 Circle3D from Draw inherits Drawable3D from Draw
---Purpose:
uses
Circ from gp,
Color from Draw,
Display from Draw
is
Create(C : Circ from gp; A1,A2 : Real; col : Color)
returns Circle3D;
DrawOn(me; dis : in out Display);
fields
myCirc : Circ from gp;
myA1 : Real;
myA2 : Real;
myColor : Color;
end Circle3D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Circle3D.ixx>
#include <Draw_Circle3D.hxx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <gp_Circ.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Circle3D
//purpose :
//=======================================================================
Draw_Circle3D::Draw_Circle3D(const gp_Circ& C,
const Standard_Real A1, const Standard_Real A2,
const Draw_Color& col) :

View File

@@ -0,0 +1,73 @@
// Created on: 1992-04-30
// Created by: Remi LEQUETTE
// Copyright (c) 1992-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.
#ifndef _Draw_Circle3D_HeaderFile
#define _Draw_Circle3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Circ.hxx>
#include <Standard_Real.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable3D.hxx>
class gp_Circ;
class Draw_Color;
class Draw_Display;
class Draw_Circle3D;
DEFINE_STANDARD_HANDLE(Draw_Circle3D, Draw_Drawable3D)
class Draw_Circle3D : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Circle3D(const gp_Circ& C, const Standard_Real A1, const Standard_Real A2, const Draw_Color& col);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
DEFINE_STANDARD_RTTI(Draw_Circle3D,Draw_Drawable3D)
protected:
private:
gp_Circ myCirc;
Standard_Real myA1;
Standard_Real myA2;
Draw_Color myColor;
};
#endif // _Draw_Circle3D_HeaderFile

View File

@@ -1,39 +0,0 @@
-- Created on: 1991-04-24
-- Created by: Arnaud BOUZY
-- 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 Color from Draw
---Purpose:
uses ColorKind from Draw
is
Create
returns Color from Draw;
Create(c : ColorKind)
returns Color from Draw;
ID(me)
returns ColorKind from Draw;
fields
myKind : ColorKind from Draw;
end Color;

View File

@@ -14,7 +14,8 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Color.ixx>
#include <Draw_Color.hxx>
Draw_Color::Draw_Color () :
myKind(Draw_blanc)

65
src/Draw/Draw_Color.hxx Normal file
View File

@@ -0,0 +1,65 @@
// Created on: 1991-04-24
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_Color_HeaderFile
#define _Draw_Color_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Draw_ColorKind.hxx>
class Draw_Color
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Draw_Color();
Standard_EXPORT Draw_Color(const Draw_ColorKind c);
Standard_EXPORT Draw_ColorKind ID() const;
protected:
private:
Draw_ColorKind myKind;
};
#endif // _Draw_Color_HeaderFile

View File

@@ -0,0 +1,40 @@
// Created on: 1991-04-24
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_ColorKind_HeaderFile
#define _Draw_ColorKind_HeaderFile
enum Draw_ColorKind
{
Draw_blanc,
Draw_rouge,
Draw_vert,
Draw_bleu,
Draw_cyan,
Draw_or,
Draw_magenta,
Draw_marron,
Draw_orange,
Draw_rose,
Draw_saumon,
Draw_violet,
Draw_jaune,
Draw_kaki,
Draw_corail
};
#endif // _Draw_ColorKind_HeaderFile

View File

@@ -14,12 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw.ixx>
#include <Draw.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Printer.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Message_PrinterOStream.hxx>
#include <TCollection_AsciiString.hxx>
void Draw::Commands (Draw_Interpretor& theCommands)
{

View File

@@ -1,141 +0,0 @@
-- Created on: 1991-07-15
-- Created by: Arnaud BOUZY
-- 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 Display from Draw
---Purpose: Use to draw in a 3d or a 2d view.
--
-- * The 3d methods draw in the 3d system, in a 2d
-- view the drawing is projected on X,Y.
--
-- * The 2d methods draw in the projection plane.
--
-- * To draw in screen coordinates the length must be
-- divided by the zoom.
uses
CString,
Color from Draw,
MarkerShape from Draw,
Pnt from gp,
Pnt2d from gp,
Circ from gp,
Circ2d from gp
is
Create
returns Display;
SetColor(me; col : Color)
---Purpose: Following drawings will use this color.
is static;
SetMode(me; M : Integer)
---Purpose: Set the drawing mode, 3 = copy, 6 = xor
is static;
Flush(me)
is static;
MoveTo(me : in out; pt : Pnt from gp)
is static;
DrawTo(me : in out; pt : Pnt from gp)
is static;
MoveTo(me : in out; pt : Pnt2d from gp)
is static;
DrawTo(me : in out; pt : Pnt2d from gp)
is static;
Draw(me : in out; p1,p2 : Pnt from gp)
is static;
Draw(me : in out; p1,p2 : Pnt2d from gp)
is static;
Draw(me : in out; C : Circ from gp; A1, A2 : Real;
ModifyWithZoom : Boolean = Standard_True)
---Purpose: Draw a circle <C> from angle <A1> to <A2>
-- (Radians). if ModifyWithZoom = 0, then
-- rayon of circle is convert to Integer.
is static;
Draw(me : in out; C : Circ2d from gp; A1, A2 : Real;
ModifyWithZoom : Boolean = Standard_True)
---Purpose: Draw a 2D circle <C> from angle <A1> to <A2>
-- (Radians). if ModifyWithZoom = 0, then
-- rayon of circle is convert to Integer.
is static;
DrawMarker(me : in out; pt : Pnt from gp; S : MarkerShape from Draw;
Size : Integer = 5)
is static;
DrawMarker(me : in out; pt : Pnt2d from gp; S : MarkerShape from Draw;
Size : Integer = 5)
is static;
DrawMarker(me : in out; pt : Pnt from gp; S : MarkerShape from Draw;
Size : Real)
is static;
DrawMarker(me : in out; pt : Pnt2d from gp; S : MarkerShape from Draw;
Size : Real)
is static;
DrawString(me : in out; pt : Pnt from gp; S : CString)
is static;
DrawString(me : in out; pt : Pnt2d from gp; S : CString)
is static;
DrawString(me : in out; pt : Pnt from gp; S : CString; moveX : Real; moveY : Real)
is static;
DrawString(me : in out; pt : Pnt2d from gp; S : CString; moveX : Real; moveY : Real)
is static;
Project(me; pt : Pnt from gp) returns Pnt2d from gp
---Purpose: Returns the 2D projection of a 3D point.
is static;
Project(me; pt : Pnt from gp; pt2d : out Pnt2d from gp)
---Purpose: Returns the 2D projection of a 3D point.
is static;
Zoom(me) returns Real
---Purpose: Returns the current Zoom value.
is static;
ViewId(me) returns Integer
---Purpose: Returns the identifier of the view where the
-- display is drawing.
is static;
HasPicked(me) returns Boolean
---Purpose: Returs True if the last drawing operations
-- generated a pick hit. When HasPicked is True the
-- Drawing should be resumed.
--
-- This function is used to shorten the drawing when
-- picking and to save the picked sub-parts.
is static;
end Display;

View File

@@ -14,8 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Display.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <ElCLib.hxx>
#include <gp_Circ.hxx>
#include <gp_Circ2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
extern Standard_Boolean Draw_Bounds;

144
src/Draw/Draw_Display.hxx Normal file
View File

@@ -0,0 +1,144 @@
// Created on: 1991-07-15
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_Display_HeaderFile
#define _Draw_Display_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Draw_MarkerShape.hxx>
#include <Standard_CString.hxx>
class Draw_Color;
class gp_Pnt;
class gp_Pnt2d;
class gp_Circ;
class gp_Circ2d;
//! Use to draw in a 3d or a 2d view.
//!
//! * The 3d methods draw in the 3d system, in a 2d
//! view the drawing is projected on X,Y.
//!
//! * The 2d methods draw in the projection plane.
//!
//! * To draw in screen coordinates the length must be
//! divided by the zoom.
class Draw_Display
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Draw_Display();
//! Following drawings will use this color.
Standard_EXPORT void SetColor (const Draw_Color& col) const;
//! Set the drawing mode, 3 = copy, 6 = xor
Standard_EXPORT void SetMode (const Standard_Integer M) const;
Standard_EXPORT void Flush() const;
Standard_EXPORT void MoveTo (const gp_Pnt& pt);
Standard_EXPORT void DrawTo (const gp_Pnt& pt);
Standard_EXPORT void MoveTo (const gp_Pnt2d& pt);
Standard_EXPORT void DrawTo (const gp_Pnt2d& pt);
Standard_EXPORT void Draw (const gp_Pnt& p1, const gp_Pnt& p2);
Standard_EXPORT void Draw (const gp_Pnt2d& p1, const gp_Pnt2d& p2);
//! Draw a circle <C> from angle <A1> to <A2>
//! (Radians). if ModifyWithZoom = 0, then
//! rayon of circle is convert to Integer.
Standard_EXPORT void Draw (const gp_Circ& C, const Standard_Real A1, const Standard_Real A2, const Standard_Boolean ModifyWithZoom = Standard_True);
//! Draw a 2D circle <C> from angle <A1> to <A2>
//! (Radians). if ModifyWithZoom = 0, then
//! rayon of circle is convert to Integer.
Standard_EXPORT void Draw (const gp_Circ2d& C, const Standard_Real A1, const Standard_Real A2, const Standard_Boolean ModifyWithZoom = Standard_True);
Standard_EXPORT void DrawMarker (const gp_Pnt& pt, const Draw_MarkerShape S, const Standard_Integer Size = 5);
Standard_EXPORT void DrawMarker (const gp_Pnt2d& pt, const Draw_MarkerShape S, const Standard_Integer Size = 5);
Standard_EXPORT void DrawMarker (const gp_Pnt& pt, const Draw_MarkerShape S, const Standard_Real Size);
Standard_EXPORT void DrawMarker (const gp_Pnt2d& pt, const Draw_MarkerShape S, const Standard_Real Size);
Standard_EXPORT void DrawString (const gp_Pnt& pt, const Standard_CString S);
Standard_EXPORT void DrawString (const gp_Pnt2d& pt, const Standard_CString S);
Standard_EXPORT void DrawString (const gp_Pnt& pt, const Standard_CString S, const Standard_Real moveX, const Standard_Real moveY);
Standard_EXPORT void DrawString (const gp_Pnt2d& pt, const Standard_CString S, const Standard_Real moveX, const Standard_Real moveY);
//! Returns the 2D projection of a 3D point.
Standard_EXPORT gp_Pnt2d Project (const gp_Pnt& pt) const;
//! Returns the 2D projection of a 3D point.
Standard_EXPORT void Project (const gp_Pnt& pt, gp_Pnt2d& pt2d) const;
//! Returns the current Zoom value.
Standard_EXPORT Standard_Real Zoom() const;
//! Returns the identifier of the view where the
//! display is drawing.
Standard_EXPORT Standard_Integer ViewId() const;
//! Returs True if the last drawing operations
//! generated a pick hit. When HasPicked is True the
//! Drawing should be resumed.
//!
//! This function is used to shorten the drawing when
//! picking and to save the picked sub-parts.
Standard_EXPORT Standard_Boolean HasPicked() const;
protected:
private:
};
#endif // _Draw_Display_HeaderFile

View File

@@ -1,30 +0,0 @@
-- Created on: 1994-04-18
-- Created by: Modelistation
-- Copyright (c) 1994-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.
deferred class Drawable2D from Draw inherits Drawable3D from Draw
uses
Pnt2d from gp,
Pnt from gp
is
Is3D(me) returns Boolean
---Purpose: Returns False.
is redefined;
end Drawable2D;

View File

@@ -12,7 +12,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Drawable2D.ixx>
#include <Draw_Drawable2D.hxx>
#include <Standard_Type.hxx>
Standard_Boolean Draw_Drawable2D::Is3D() const
{

View File

@@ -0,0 +1,63 @@
// Created on: 1994-04-18
// Created by: Modelistation
// Copyright (c) 1994-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.
#ifndef _Draw_Drawable2D_HeaderFile
#define _Draw_Drawable2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_Boolean.hxx>
class Draw_Drawable2D;
DEFINE_STANDARD_HANDLE(Draw_Drawable2D, Draw_Drawable3D)
class Draw_Drawable2D : public Draw_Drawable3D
{
public:
//! Returns False.
Standard_EXPORT virtual Standard_Boolean Is3D() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Drawable2D,Draw_Drawable3D)
protected:
private:
};
#endif // _Draw_Drawable2D_HeaderFile

View File

@@ -1,91 +0,0 @@
-- Created on: 1991-04-24
-- Created by: Arnaud BOUZY
-- 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.
deferred class Drawable3D from Draw inherits TShared from MMgt
---Purpose:
uses Color from Draw,
Display from Draw,
Interpretor from Draw,
OStream
is
Initialize;
DrawOn(me; dis : in out Display)
is deferred;
PickReject(me; X,Y,Prec : Real) returns Boolean
---Purpose: Returs True if the pick is outside the box
is virtual;
Copy(me) returns Drawable3D from Draw
is virtual;
---Purpose: For variable copy.
Dump(me; S : in out OStream)
is virtual;
---Purpose: For variable dump.
Whatis(me; I : in out Interpretor from Draw)
is virtual;
---Purpose: For variable whatis command. Set as a result the
-- type of the variable.
Is3D(me) returns Boolean
is virtual;
---Purpose: Is a 3D object. (Default True).
SetBounds(me : mutable; xmin,xmax,ymin,ymax : Real)
is static;
Bounds(me; xmin,xmax,ymin,ymax : out Real)
is static;
Visible(me) returns Boolean;
---C++: inline
Visible(me : mutable; V : Boolean);
---C++: inline
Protected(me) returns Boolean;
---C++: inline
Protected(me : mutable; P : Boolean);
---C++: inline
Name(me) returns CString;
---C++: inline
Name(me : mutable; N : CString)
is virtual;
---C++: inline
fields
myXmin : Real;
myXmax : Real;
myYmin : Real;
myYmax : Real;
isVisible : Boolean;
isProtected : Boolean;
myName : CString;
end Drawable3D;

View File

@@ -14,13 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Drawable3D.ixx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Drawable3D
//purpose :
//=======================================================================
Draw_Drawable3D::Draw_Drawable3D() :
isVisible(Standard_False),
isProtected(Standard_False),

View File

@@ -0,0 +1,109 @@
// Created on: 1991-04-24
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_Drawable3D_HeaderFile
#define _Draw_Drawable3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.hxx>
#include <MMgt_TShared.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class Draw_Display;
class Draw_Drawable3D;
DEFINE_STANDARD_HANDLE(Draw_Drawable3D, MMgt_TShared)
class Draw_Drawable3D : public MMgt_TShared
{
public:
Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const = 0;
//! Returs True if the pick is outside the box
Standard_EXPORT virtual Standard_Boolean PickReject (const Standard_Real X, const Standard_Real Y, const Standard_Real Prec) const;
//! For variable copy.
Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const;
//! For variable dump.
Standard_EXPORT virtual void Dump (Standard_OStream& S) const;
//! For variable whatis command. Set as a result the
//! type of the variable.
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const;
//! Is a 3D object. (Default True).
Standard_EXPORT virtual Standard_Boolean Is3D() const;
Standard_EXPORT void SetBounds (const Standard_Real xmin, const Standard_Real xmax, const Standard_Real ymin, const Standard_Real ymax);
Standard_EXPORT void Bounds (Standard_Real& xmin, Standard_Real& xmax, Standard_Real& ymin, Standard_Real& ymax) const;
Standard_Boolean Visible() const;
void Visible (const Standard_Boolean V);
Standard_Boolean Protected() const;
void Protected (const Standard_Boolean P);
Standard_CString Name() const;
virtual void Name (const Standard_CString N);
DEFINE_STANDARD_RTTI(Draw_Drawable3D,MMgt_TShared)
protected:
Standard_EXPORT Draw_Drawable3D();
private:
Standard_Real myXmin;
Standard_Real myXmax;
Standard_Real myYmin;
Standard_Real myYmax;
Standard_Boolean isVisible;
Standard_Boolean isProtected;
Standard_CString myName;
};
#include <Draw_Drawable3D.lxx>
#endif // _Draw_Drawable3D_HeaderFile

37
src/Draw/Draw_Failure.hxx Normal file
View File

@@ -0,0 +1,37 @@
// Created on: 1991-04-24
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_Failure_HeaderFile
#define _Draw_Failure_HeaderFile
#include <Standard_Type.hxx>
#include <Standard_DefineException.hxx>
#include <Standard_SStream.hxx>
#include <Standard_Failure.hxx>
class Draw_Failure;
DEFINE_STANDARD_HANDLE(Draw_Failure, Standard_Failure)
#if !defined No_Exception && !defined No_Draw_Failure
#define Draw_Failure_Raise_if(CONDITION, MESSAGE) \
if (CONDITION) Draw_Failure::Raise(MESSAGE);
#else
#define Draw_Failure_Raise_if(CONDITION, MESSAGE)
#endif
DEFINE_STANDARD_EXCEPTION(Draw_Failure, Standard_Failure)
#endif // _Draw_Failure_HeaderFile

View File

@@ -15,19 +15,18 @@
// commercial license or contractual agreement.
// **************************************************************
// Modif : DFO 05/11/96
#include <Draw.ixx>
#include <Draw_Appli.hxx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Grid.hxx>
#include <Draw_Display.hxx>
#include <Draw_Text3D.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Draw_Text2D.hxx>
#include <Draw_Text3D.hxx>
#include <Standard_Stream.hxx>
#include <TCollection_AsciiString.hxx>
#include <stdio.h>
#ifdef _WIN32

View File

@@ -1,92 +0,0 @@
-- Created on: 1994-02-03
-- Created by: Jean Marc LACHAUME
-- Copyright (c) 1994-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 Grid from Draw inherits Drawable3D from Draw
uses
Display from Draw
is
Create
---Purpose: Creates a grid.
returns Grid from Draw ;
Steps (me : mutable; StepX, StepY, StepZ : Real from Standard)
---Purpose: Sets the steps along the X, Y & Z axis.
is static ;
StepX (me)
---Purpose: Returns the step along the X axis.
---C++: inline
returns Real from Standard
is static ;
StepY (me)
---Purpose: Returns the step along the Y axis.
---C++: inline
returns Real from Standard
is static ;
StepZ (me)
---Purpose: Returns the step along the Z axis.
---C++: inline
returns Real from Standard
is static ;
IsActive (me)
---Purpose: Returns if the grid is active or not.
---C++: inline
returns Boolean from Standard
is static ;
DrawOn (me; Out : in out Display from Draw)
---Purpose: Displays the grid.
is static ;
fields
myStepX : Real from Standard ;
myStepY : Real from Standard ;
myStepZ : Real from Standard ;
myIsActive : Boolean from Standard ;
end Grid ;

View File

@@ -14,14 +14,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Grid.ixx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <Draw_Appli.hxx>
#include <Draw_ColorKind.hxx>
#include <Draw_Color.hxx>
#include <Draw_ColorKind.hxx>
#include <Draw_Display.hxx>
#include <Draw_Grid.hxx>
#include <gp_Pnt.hxx>
#include <gp_Trsf.hxx>
#include <Standard_Type.hxx>
static Standard_Real MinimumStep = 1.e-3 ;
static Standard_Real Ratio = 200.0 ;

88
src/Draw/Draw_Grid.hxx Normal file
View File

@@ -0,0 +1,88 @@
// Created on: 1994-02-03
// Created by: Jean Marc LACHAUME
// Copyright (c) 1994-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.
#ifndef _Draw_Grid_HeaderFile
#define _Draw_Grid_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Draw_Drawable3D.hxx>
class Draw_Display;
class Draw_Grid;
DEFINE_STANDARD_HANDLE(Draw_Grid, Draw_Drawable3D)
class Draw_Grid : public Draw_Drawable3D
{
public:
//! Creates a grid.
Standard_EXPORT Draw_Grid();
//! Sets the steps along the X, Y & Z axis.
Standard_EXPORT void Steps (const Standard_Real StepX, const Standard_Real StepY, const Standard_Real StepZ);
//! Returns the step along the X axis.
Standard_Real StepX() const;
//! Returns the step along the Y axis.
Standard_Real StepY() const;
//! Returns the step along the Z axis.
Standard_Real StepZ() const;
//! Returns if the grid is active or not.
Standard_Boolean IsActive() const;
//! Displays the grid.
Standard_EXPORT void DrawOn (Draw_Display& Out) const;
DEFINE_STANDARD_RTTI(Draw_Grid,Draw_Drawable3D)
protected:
private:
Standard_Real myStepX;
Standard_Real myStepY;
Standard_Real myStepZ;
Standard_Boolean myIsActive;
};
#include <Draw_Grid.lxx>
#endif // _Draw_Grid_HeaderFile

View File

@@ -1,51 +0,0 @@
-- Created on: 1994-04-18
-- Created by: Modelistation
-- Copyright (c) 1994-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 Marker2D from Draw inherits Drawable2D from Draw
---Purpose:
uses
Pnt2d from gp,
Color from Draw,
MarkerShape from Draw,
Display from Draw
is
Create(P : Pnt2d from gp; T : MarkerShape from Draw; C : Color from Draw;
Size : Integer = 5) returns Marker2D from Draw;
Create(P : Pnt2d from gp; T : MarkerShape from Draw; C : Color from Draw;
RSize : Real) returns Marker2D from Draw;
ChangePos(me : mutable) returns Pnt2d from gp;
---C++: return &
---Purpose: myPos field
DrawOn(me; dis : in out Display from Draw);
PickReject(me; X,Y,Prec : Real) returns Boolean
---Purpose: Returs always false
is redefined;
fields
myPos : Pnt2d from gp;
myCol : Color from Draw;
myTyp : MarkerShape from Draw;
mySiz : Integer;
end Marker2D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Marker2D.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Marker2D.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Marker2D
//purpose :
//=======================================================================
Draw_Marker2D::Draw_Marker2D(const gp_Pnt2d& P, const Draw_MarkerShape T,
const Draw_Color& C, const Standard_Integer S) :
myPos(P), myCol(C), myTyp(T),mySiz(S)

View File

@@ -0,0 +1,84 @@
// Created on: 1994-04-18
// Created by: Modelistation
// Copyright (c) 1994-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.
#ifndef _Draw_Marker2D_HeaderFile
#define _Draw_Marker2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt2d.hxx>
#include <Draw_Color.hxx>
#include <Draw_MarkerShape.hxx>
#include <Standard_Integer.hxx>
#include <Draw_Drawable2D.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
class gp_Pnt2d;
class Draw_Color;
class Draw_Display;
class Draw_Marker2D;
DEFINE_STANDARD_HANDLE(Draw_Marker2D, Draw_Drawable2D)
class Draw_Marker2D : public Draw_Drawable2D
{
public:
Standard_EXPORT Draw_Marker2D(const gp_Pnt2d& P, const Draw_MarkerShape T, const Draw_Color& C, const Standard_Integer Size = 5);
Standard_EXPORT Draw_Marker2D(const gp_Pnt2d& P, const Draw_MarkerShape T, const Draw_Color& C, const Standard_Real RSize);
//! myPos field
Standard_EXPORT gp_Pnt2d& ChangePos();
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
//! Returs always false
Standard_EXPORT virtual Standard_Boolean PickReject (const Standard_Real X, const Standard_Real Y, const Standard_Real Prec) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Marker2D,Draw_Drawable2D)
protected:
private:
gp_Pnt2d myPos;
Draw_Color myCol;
Draw_MarkerShape myTyp;
Standard_Integer mySiz;
};
#endif // _Draw_Marker2D_HeaderFile

View File

@@ -1,53 +0,0 @@
-- Created on: 1992-04-23
-- Created by: Modelistation
-- Copyright (c) 1992-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 Marker3D from Draw inherits Drawable3D from Draw
---Purpose:
uses
Pnt from gp,
Color from Draw,
MarkerShape from Draw,
Display from Draw
is
Create(P : Pnt from gp; T : MarkerShape from Draw; C : Color from Draw;
ISize : Integer = 5) returns Marker3D from Draw;
Create(P : Pnt from gp; T : MarkerShape from Draw; C : Color from Draw;
RSize : Real) returns Marker3D from Draw;
ChangePos(me : mutable) returns Pnt from gp;
---C++: return &
---Purpose: myPos field
DrawOn(me; dis : in out Display from Draw);
PickReject(me; X,Y,Prec : Real) returns Boolean
---Purpose: Returs always false
is redefined;
fields
myPos : Pnt from gp;
myCol : Color from Draw;
myTyp : MarkerShape from Draw;
mySiz : Integer;
myRSiz : Real;
myIsRSiz : Boolean;
end Marker3D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Marker3D.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Marker3D.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Marker3D
//purpose :
//=======================================================================
Draw_Marker3D::Draw_Marker3D(const gp_Pnt& P, const Draw_MarkerShape T,
const Draw_Color& C, const Standard_Integer S) :
myPos(P), myCol(C), myTyp(T), mySiz(S), myIsRSiz(Standard_False)

View File

@@ -0,0 +1,86 @@
// Created on: 1992-04-23
// Created by: Modelistation
// Copyright (c) 1992-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.
#ifndef _Draw_Marker3D_HeaderFile
#define _Draw_Marker3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <Draw_Color.hxx>
#include <Draw_MarkerShape.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Draw_Drawable3D.hxx>
class gp_Pnt;
class Draw_Color;
class Draw_Display;
class Draw_Marker3D;
DEFINE_STANDARD_HANDLE(Draw_Marker3D, Draw_Drawable3D)
class Draw_Marker3D : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Marker3D(const gp_Pnt& P, const Draw_MarkerShape T, const Draw_Color& C, const Standard_Integer ISize = 5);
Standard_EXPORT Draw_Marker3D(const gp_Pnt& P, const Draw_MarkerShape T, const Draw_Color& C, const Standard_Real RSize);
//! myPos field
Standard_EXPORT gp_Pnt& ChangePos();
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
//! Returs always false
Standard_EXPORT virtual Standard_Boolean PickReject (const Standard_Real X, const Standard_Real Y, const Standard_Real Prec) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Marker3D,Draw_Drawable3D)
protected:
private:
gp_Pnt myPos;
Draw_Color myCol;
Draw_MarkerShape myTyp;
Standard_Integer mySiz;
Standard_Real myRSiz;
Standard_Boolean myIsRSiz;
};
#endif // _Draw_Marker3D_HeaderFile

View File

@@ -0,0 +1,32 @@
// Created on: 1991-04-24
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_MarkerShape_HeaderFile
#define _Draw_MarkerShape_HeaderFile
//! Circle is not sensible to zoom, like
//! other MarkerShape, contrarily to CircleZoom
enum Draw_MarkerShape
{
Draw_Square,
Draw_Losange,
Draw_X,
Draw_Plus,
Draw_Circle,
Draw_CircleZoom
};
#endif // _Draw_MarkerShape_HeaderFile

View File

@@ -1,54 +0,0 @@
-- Created on: 1993-08-16
-- Created by: Bruno DUMORTIER
-- Copyright (c) 1993-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 Number from Draw inherits Drawable3D from Draw
---Purpose: To store nummbers in variables.
uses
Display from Draw,
OStream,
Interpretor from Draw
is
Create (V : Real) returns Number from Draw;
Value(me) returns Real
is static;
Value(me : mutable; V : Real)
is static;
DrawOn(me; dis : in out Display);
---Purpose: Does nothhing,
Copy(me) returns Drawable3D from Draw
---Purpose: For variable copy.
is redefined;
Dump(me; S : in out OStream)
---Purpose: For variable dump.
is redefined;
Whatis(me; I : in out Interpretor from Draw) is redefined;
---Purpose: For variable whatis command. Set as a result the
-- type of the variable.
fields
myValue : Real;
end Number;

View File

@@ -14,13 +14,16 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Number.ixx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_Number.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Number
//purpose :
//=======================================================================
Draw_Number::Draw_Number(const Standard_Real V) :
myValue(V)
{

84
src/Draw/Draw_Number.hxx Normal file
View File

@@ -0,0 +1,84 @@
// Created on: 1993-08-16
// Created by: Bruno DUMORTIER
// Copyright (c) 1993-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.
#ifndef _Draw_Number_HeaderFile
#define _Draw_Number_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class Draw_Display;
class Draw_Drawable3D;
class Draw_Number;
DEFINE_STANDARD_HANDLE(Draw_Number, Draw_Drawable3D)
//! To store nummbers in variables.
class Draw_Number : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Number(const Standard_Real V);
Standard_EXPORT Standard_Real Value() const;
Standard_EXPORT void Value (const Standard_Real V);
//! Does nothhing,
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
//! For variable copy.
Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
//! For variable dump.
Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
//! For variable whatis command. Set as a result the
//! type of the variable.
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Number,Draw_Drawable3D)
protected:
private:
Standard_Real myValue;
};
#endif // _Draw_Number_HeaderFile

View File

@@ -1,60 +0,0 @@
-- Created on: 2007-07-31
-- Created by: OCC Team
-- Copyright (c) 2007-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 Printer from Draw inherits Printer from Message
---Purpose: Implementation of Printer class with output
-- (Message_Messenge) directed to Draw_Interpretor
uses
Interpretor from Draw,
Gravity from Message,
AsciiString from TCollection,
ExtendedString from TCollection
is
Create (theTcl : Interpretor from Draw);
---Purpose: Creates a printer connected to the interpretor.
Send (me; theString: ExtendedString from TCollection;
theGravity: Gravity from Message;
putEndl: Boolean) is redefined;
---Purpose: Send a string message with specified trace level.
-- The parameter putEndl specified whether end-of-line
-- should be added to the end of the message.
-- This method must be redefined in descentant.
Send (me; theString: CString; theGravity: Gravity from Message;
putEndl: Boolean) is redefined;
---Purpose: Send a string message with specified trace level.
-- The parameter putEndl specified whether end-of-line
-- should be added to the end of the message.
-- Default implementation calls first method Send().
Send (me; theString: AsciiString from TCollection;
theGravity: Gravity from Message;
putEndl: Boolean) is redefined;
---Purpose: Send a string message with specified trace level.
-- The parameter putEndl specified whether end-of-line
-- should be added to the end of the message.
-- Default implementation calls first method Send().
fields
myTcl : Address from Standard; -- pointer to interpretor
end Printer;

View File

@@ -13,8 +13,9 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Printer.ixx>
#include <Draw_Printer.hxx>
#include <Standard_Type.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
@@ -22,7 +23,6 @@
//function : Draw_Printer
//purpose :
//=======================================================================
Draw_Printer::Draw_Printer (const Draw_Interpretor& theTcl)
: myTcl((Standard_Address)&theTcl)
{

88
src/Draw/Draw_Printer.hxx Normal file
View File

@@ -0,0 +1,88 @@
// Created on: 2007-07-31
// Created by: OCC Team
// Copyright (c) 2007-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.
#ifndef _Draw_Printer_HeaderFile
#define _Draw_Printer_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Address.hxx>
#include <Message_Printer.hxx>
#include <Draw_Interpretor.hxx>
#include <Message_Gravity.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.hxx>
class TCollection_ExtendedString;
class TCollection_AsciiString;
class Draw_Printer;
DEFINE_STANDARD_HANDLE(Draw_Printer, Message_Printer)
//! Implementation of Printer class with output
//! (Message_Messenge) directed to Draw_Interpretor
class Draw_Printer : public Message_Printer
{
public:
//! Creates a printer connected to the interpretor.
Standard_EXPORT Draw_Printer(const Draw_Interpretor& theTcl);
//! Send a string message with specified trace level.
//! The parameter putEndl specified whether end-of-line
//! should be added to the end of the message.
//! This method must be redefined in descentant.
Standard_EXPORT virtual void Send (const TCollection_ExtendedString& theString, const Message_Gravity theGravity, const Standard_Boolean putEndl) const Standard_OVERRIDE;
//! Send a string message with specified trace level.
//! The parameter putEndl specified whether end-of-line
//! should be added to the end of the message.
//! Default implementation calls first method Send().
Standard_EXPORT virtual void Send (const Standard_CString theString, const Message_Gravity theGravity, const Standard_Boolean putEndl) const Standard_OVERRIDE;
//! Send a string message with specified trace level.
//! The parameter putEndl specified whether end-of-line
//! should be added to the end of the message.
//! Default implementation calls first method Send().
Standard_EXPORT virtual void Send (const TCollection_AsciiString& theString, const Message_Gravity theGravity, const Standard_Boolean putEndl) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Printer,Message_Printer)
protected:
private:
Standard_Address myTcl;
};
#endif // _Draw_Printer_HeaderFile

View File

@@ -1,88 +0,0 @@
-- Created on: 2008-06-25
-- Created by: data exchange team
-- Copyright (c) 2008-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 ProgressIndicator from Draw inherits ProgressIndicator from Message
---Purpose: Implements ProgressIndicator (interface provided by Message)
-- for DRAW, with possibility to output to TCL window
-- and/or trace file
uses
Interpretor from Draw
is
Create (di: Interpretor from Draw; updateTime: Integer = 0)
returns ProgressIndicator from Draw;
---Purpose: Creates a progress indicator and remembers pointer to
-- Draw_Interpretor
-- The updateTime, if given, defines time interval between
-- updates of the indicator (in seconds)
Destroy (me: mutable);
---C++: alias ~
---Purpose: Destructor; calls Reset()
SetTextMode(me : mutable; theTextMode : Boolean);
---Purpose: Sets text output mode (on/off)
GetTextMode(me) returns Boolean;
---Purpose: Gets text output mode (on/off)
SetGraphMode(me : mutable; theGraphMode : Boolean);
---Purpose: Sets graphical output mode (on/off)
GetGraphMode(me) returns Boolean;
---Purpose: Gets graphical output mode (on/off)
---Scope: Redefined methods
Reset (me: mutable) is redefined;
---Purpose: Clears/erases opened TCL windows if any
-- and sets myBreak to False
Show (me: mutable; force: Boolean = Standard_True)
returns Boolean is redefined;
---Purpose: Defines method Show of Progress Indicator
UserBreak (me: mutable) returns Boolean is redefined;
---Purpose: Redefines method UserBreak of Progress Indicator
---Scope: Class methods maintaining static data
DefaultTextMode (myclass) returns Boolean;
---C++: return &
DefaultGraphMode (myclass) returns Boolean;
---C++: return &
---Purpose: Get/Set default values for output modes
StopIndicator (myclass) returns Integer;
---C++: return &
---Purpose: Internal method for implementation of UserBreak mechanism
fields
myTextMode : Boolean; -- text output mode (on/off)
myGraphMode : Boolean; -- graphical output mode (on/off)
myDraw: Address; -- pointer to Draw_Interpretor (!!!)
myShown: Boolean; -- whether graphical window is shown
myBreak: Boolean; -- whether user break was signaled
myUpdateTime: Integer; -- Time interval for update (in sec)
myLastUpdate: Size; -- Start time (first call to Show())
myStartTime: Size; -- Start time (first call to Show())
end ProgressIndicator;

View File

@@ -11,21 +11,21 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_ProgressIndicator.ixx>
#include <Draw_Interpretor.hxx>
#include <Draw.hxx>
#include <Message_ProgressScale.hxx>
#include <Message_Messenger.hxx>
#include <Draw_Interpretor.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <Message_ProgressScale.hxx>
#include <Standard_Type.hxx>
#include <time.h>
#include <stdio.h>
#include <time.h>
//=======================================================================
//function : Draw_ProgressIndicator
//purpose :
//=======================================================================
Draw_ProgressIndicator::Draw_ProgressIndicator(const Draw_Interpretor &di,
const Standard_Integer updateTime) :
myTextMode ( DefaultTextMode() ),

View File

@@ -0,0 +1,115 @@
// Created on: 2008-06-25
// Created by: data exchange team
// Copyright (c) 2008-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.
#ifndef _Draw_ProgressIndicator_HeaderFile
#define _Draw_ProgressIndicator_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Address.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Size.hxx>
#include <Message_ProgressIndicator.hxx>
#include <Draw_Interpretor.hxx>
class Draw_ProgressIndicator;
DEFINE_STANDARD_HANDLE(Draw_ProgressIndicator, Message_ProgressIndicator)
//! Implements ProgressIndicator (interface provided by Message)
//! for DRAW, with possibility to output to TCL window
//! and/or trace file
class Draw_ProgressIndicator : public Message_ProgressIndicator
{
public:
//! Creates a progress indicator and remembers pointer to
//! Draw_Interpretor
//! The updateTime, if given, defines time interval between
//! updates of the indicator (in seconds)
Standard_EXPORT Draw_ProgressIndicator(const Draw_Interpretor& di, const Standard_Integer updateTime = 0);
//! Destructor; calls Reset()
Standard_EXPORT void Destroy();
~Draw_ProgressIndicator()
{
Destroy();
}
//! Sets text output mode (on/off)
Standard_EXPORT void SetTextMode (const Standard_Boolean theTextMode);
//! Gets text output mode (on/off)
Standard_EXPORT Standard_Boolean GetTextMode() const;
//! Sets graphical output mode (on/off)
Standard_EXPORT void SetGraphMode (const Standard_Boolean theGraphMode);
//! Gets graphical output mode (on/off)
Standard_EXPORT Standard_Boolean GetGraphMode() const;
//! Clears/erases opened TCL windows if any
//! and sets myBreak to False
Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
//! Defines method Show of Progress Indicator
Standard_EXPORT virtual Standard_Boolean Show (const Standard_Boolean force = Standard_True) Standard_OVERRIDE;
//! Redefines method UserBreak of Progress Indicator
Standard_EXPORT virtual Standard_Boolean UserBreak() Standard_OVERRIDE;
Standard_EXPORT static Standard_Boolean& DefaultTextMode();
//! Get/Set default values for output modes
Standard_EXPORT static Standard_Boolean& DefaultGraphMode();
//! Internal method for implementation of UserBreak mechanism
Standard_EXPORT static Standard_Integer& StopIndicator();
DEFINE_STANDARD_RTTI(Draw_ProgressIndicator,Message_ProgressIndicator)
protected:
private:
Standard_Boolean myTextMode;
Standard_Boolean myGraphMode;
Standard_Address myDraw;
Standard_Boolean myShown;
Standard_Boolean myBreak;
Standard_Integer myUpdateTime;
Standard_Size myLastUpdate;
Standard_Size myStartTime;
};
#endif // _Draw_ProgressIndicator_HeaderFile

View File

@@ -1,59 +0,0 @@
-- Created on: 1994-04-18
-- Created by: Modelistation
-- Copyright (c) 1994-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 Segment2D from Draw inherits Drawable2D from Draw
---Purpose:
uses Pnt2d from gp,
Color from Draw,
Display from Draw,
Interpretor from Draw
is
Create(p1,p2 : Pnt2d; col : Color)
returns Segment2D;
DrawOn(me; dis : in out Display);
First(me) returns Pnt2d from gp
---C++: return const&
is static;
First(me : mutable; P : Pnt2d from gp)
is static;
Last(me) returns Pnt2d from gp
---C++: return const&
is static;
Last(me : mutable; P : Pnt2d from gp)
is static;
Dump(me; S : in out OStream)
is redefined;
Whatis(me; I : in out Interpretor from Draw)
is redefined;
fields
myFirst : Pnt2d;
myLast : Pnt2d;
myColor : Color;
end Segment2D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Segment2D.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Segment2D.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Segment2D
//purpose :
//=======================================================================
Draw_Segment2D::Draw_Segment2D(const gp_Pnt2d& p1,
const gp_Pnt2d& p2,
const Draw_Color& col) :

View File

@@ -0,0 +1,85 @@
// Created on: 1994-04-18
// Created by: Modelistation
// Copyright (c) 1994-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.
#ifndef _Draw_Segment2D_HeaderFile
#define _Draw_Segment2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt2d.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable2D.hxx>
#include <Standard_OStream.hxx>
#include <Draw_Interpretor.hxx>
class gp_Pnt2d;
class Draw_Color;
class Draw_Display;
class Draw_Segment2D;
DEFINE_STANDARD_HANDLE(Draw_Segment2D, Draw_Drawable2D)
class Draw_Segment2D : public Draw_Drawable2D
{
public:
Standard_EXPORT Draw_Segment2D(const gp_Pnt2d& p1, const gp_Pnt2d& p2, const Draw_Color& col);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
Standard_EXPORT const gp_Pnt2d& First() const;
Standard_EXPORT void First (const gp_Pnt2d& P);
Standard_EXPORT const gp_Pnt2d& Last() const;
Standard_EXPORT void Last (const gp_Pnt2d& P);
Standard_EXPORT virtual void Dump (Standard_OStream& S) const Standard_OVERRIDE;
Standard_EXPORT virtual void Whatis (Draw_Interpretor& I) const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(Draw_Segment2D,Draw_Drawable2D)
protected:
private:
gp_Pnt2d myFirst;
gp_Pnt2d myLast;
Draw_Color myColor;
};
#endif // _Draw_Segment2D_HeaderFile

View File

@@ -1,52 +0,0 @@
-- Created on: 1991-04-25
-- Created by: Arnaud BOUZY
-- 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 Segment3D from Draw inherits Drawable3D from Draw
---Purpose:
uses Pnt from gp,
Color from Draw,
Display from Draw
is
Create(p1,p2 : Pnt; col : Color)
returns Segment3D;
DrawOn(me; dis : in out Display);
First(me) returns Pnt from gp
---C++: return const&
is static;
First(me : mutable; P : Pnt from gp)
is static;
Last(me) returns Pnt from gp
---C++: return const&
is static;
Last(me : mutable; P : Pnt from gp)
is static;
fields
myFirst : Pnt;
myLast : Pnt;
myColor : Color;
end Segment3D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Segment3D.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Segment3D.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Segment3D
//purpose :
//=======================================================================
Draw_Segment3D::Draw_Segment3D(const gp_Pnt& p1,
const gp_Pnt& p2,
const Draw_Color& col) :

View File

@@ -0,0 +1,79 @@
// Created on: 1991-04-25
// Created by: Arnaud BOUZY
// 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.
#ifndef _Draw_Segment3D_HeaderFile
#define _Draw_Segment3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <Draw_Color.hxx>
#include <Draw_Drawable3D.hxx>
class gp_Pnt;
class Draw_Color;
class Draw_Display;
class Draw_Segment3D;
DEFINE_STANDARD_HANDLE(Draw_Segment3D, Draw_Drawable3D)
class Draw_Segment3D : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Segment3D(const gp_Pnt& p1, const gp_Pnt& p2, const Draw_Color& col);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
Standard_EXPORT const gp_Pnt& First() const;
Standard_EXPORT void First (const gp_Pnt& P);
Standard_EXPORT const gp_Pnt& Last() const;
Standard_EXPORT void Last (const gp_Pnt& P);
DEFINE_STANDARD_RTTI(Draw_Segment3D,Draw_Drawable3D)
protected:
private:
gp_Pnt myFirst;
gp_Pnt myLast;
Draw_Color myColor;
};
#endif // _Draw_Segment3D_HeaderFile

View File

@@ -1,47 +0,0 @@
-- Created on: 1994-04-18
-- Created by: Modelistation
-- Copyright (c) 1994-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 Text2D from Draw inherits Drawable2D from Draw
---Purpose:
uses Pnt2d from gp,
Color from Draw,
Display from Draw,
AsciiString from TCollection
is
Create(p : Pnt2d; T : CString; col : Color)
returns Text2D from Draw;
Create(p : Pnt2d; T : CString; col : Color;
moveX : Integer; moveY : Integer)
returns Text2D from Draw;
SetPnt2d(me : mutable; p : Pnt2d);
DrawOn(me; dis : in out Display);
fields
myPoint : Pnt2d from gp;
myColor : Color from Draw;
myText : AsciiString from TCollection;
mymoveX : Integer from Standard;
mymoveY : Integer from Standard;
end Text2D;

View File

@@ -14,14 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Text2D.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Text2D.hxx>
#include <gp_Pnt2d.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Text2D
//purpose :
//=======================================================================
Draw_Text2D::Draw_Text2D(const gp_Pnt2d& p, const Standard_CString T,
const Draw_Color& col) :
myPoint(p), myColor(col), myText(T), mymoveX(0), mymoveY(0)

80
src/Draw/Draw_Text2D.hxx Normal file
View File

@@ -0,0 +1,80 @@
// Created on: 1994-04-18
// Created by: Modelistation
// Copyright (c) 1994-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.
#ifndef _Draw_Text2D_HeaderFile
#define _Draw_Text2D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt2d.hxx>
#include <Draw_Color.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_Integer.hxx>
#include <Draw_Drawable2D.hxx>
#include <Standard_CString.hxx>
class gp_Pnt2d;
class Draw_Color;
class Draw_Display;
class Draw_Text2D;
DEFINE_STANDARD_HANDLE(Draw_Text2D, Draw_Drawable2D)
class Draw_Text2D : public Draw_Drawable2D
{
public:
Standard_EXPORT Draw_Text2D(const gp_Pnt2d& p, const Standard_CString T, const Draw_Color& col);
Standard_EXPORT Draw_Text2D(const gp_Pnt2d& p, const Standard_CString T, const Draw_Color& col, const Standard_Integer moveX, const Standard_Integer moveY);
Standard_EXPORT void SetPnt2d (const gp_Pnt2d& p);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
DEFINE_STANDARD_RTTI(Draw_Text2D,Draw_Drawable2D)
protected:
private:
gp_Pnt2d myPoint;
Draw_Color myColor;
TCollection_AsciiString myText;
Standard_Integer mymoveX;
Standard_Integer mymoveY;
};
#endif // _Draw_Text2D_HeaderFile

View File

@@ -1,47 +0,0 @@
-- Created on: 1992-04-29
-- Created by: Remi LEQUETTE
-- Copyright (c) 1992-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 Text3D from Draw inherits Drawable3D from Draw
---Purpose:
uses Pnt from gp,
Color from Draw,
Display from Draw,
AsciiString from TCollection
is
Create(p : Pnt; T : CString; col : Color)
returns Text3D from Draw;
Create(p : Pnt; T : CString; col : Color;
moveX : Real; moveY : Real)
returns Text3D from Draw;
SetPnt(me : mutable; p : Pnt);
DrawOn(me; dis : in out Display);
fields
myPoint : Pnt from gp;
myColor : Color from Draw;
myText : AsciiString from TCollection;
mymoveX : Real from Standard;
mymoveY : Real from Standard;
end Text3D;

View File

@@ -14,13 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw_Text3D.ixx>
#include <Draw_Color.hxx>
#include <Draw_Display.hxx>
#include <Draw_Text3D.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : Draw_Text3D
//purpose :
//=======================================================================
Draw_Text3D::Draw_Text3D(const gp_Pnt& p, const Standard_CString T,
const Draw_Color& col) :
myPoint(p), myColor(col), myText(T), mymoveX(0.0), mymoveY(0.0)

80
src/Draw/Draw_Text3D.hxx Normal file
View File

@@ -0,0 +1,80 @@
// Created on: 1992-04-29
// Created by: Remi LEQUETTE
// Copyright (c) 1992-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.
#ifndef _Draw_Text3D_HeaderFile
#define _Draw_Text3D_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <gp_Pnt.hxx>
#include <Draw_Color.hxx>
#include <TCollection_AsciiString.hxx>
#include <Standard_Real.hxx>
#include <Draw_Drawable3D.hxx>
#include <Standard_CString.hxx>
class gp_Pnt;
class Draw_Color;
class Draw_Display;
class Draw_Text3D;
DEFINE_STANDARD_HANDLE(Draw_Text3D, Draw_Drawable3D)
class Draw_Text3D : public Draw_Drawable3D
{
public:
Standard_EXPORT Draw_Text3D(const gp_Pnt& p, const Standard_CString T, const Draw_Color& col);
Standard_EXPORT Draw_Text3D(const gp_Pnt& p, const Standard_CString T, const Draw_Color& col, const Standard_Real moveX, const Standard_Real moveY);
Standard_EXPORT void SetPnt (const gp_Pnt& p);
Standard_EXPORT void DrawOn (Draw_Display& dis) const;
DEFINE_STANDARD_RTTI(Draw_Text3D,Draw_Drawable3D)
protected:
private:
gp_Pnt myPoint;
Draw_Color myColor;
TCollection_AsciiString myText;
Standard_Real mymoveX;
Standard_Real mymoveY;
};
#endif // _Draw_Text3D_HeaderFile

View File

@@ -14,16 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw.ixx>
#include <Draw.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <TCollection_AsciiString.hxx>
#include <Units_Token.hxx>
#include <Units_UnitSentence.hxx>
#include <Units_TokensSequence.hxx>
#include <UnitsAPI.hxx>
#include <Units.hxx>
#include <Units_Token.hxx>
#include <Units_TokensSequence.hxx>
#include <Units_UnitsDictionary.hxx>
#include <Units_UnitSentence.hxx>
#include <UnitsAPI.hxx>
//=======================================================================
//function : parsing

View File

@@ -14,25 +14,23 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Draw.ixx>
#include <Standard_Stream.hxx>
#include <Standard_SStream.hxx>
#include <Draw_Display.hxx>
#include <Draw.hxx>
#include <Draw_Appli.hxx>
#include <Draw_Number.hxx>
#include <Draw_Axis3D.hxx>
#include <Draw_Axis2D.hxx>
#include <Draw_Grid.hxx>
#include <Draw_Axis3D.hxx>
#include <Draw_Display.hxx>
#include <Draw_Drawable3D.hxx>
#include <Draw_SequenceOfDrawable3D.hxx>
#include <Draw_Grid.hxx>
#include <Draw_Number.hxx>
#include <Draw_ProgressIndicator.hxx>
#include <Draw_SequenceOfDrawable3D.hxx>
#include <NCollection_Map.hxx>
#include <Standard_SStream.hxx>
#include <Standard_Stream.hxx>
#include <TCollection_AsciiString.hxx>
#include <ios>
#ifdef _WIN32
extern Draw_Viewer dout;
#endif

View File

@@ -1,33 +1,79 @@
EXTERNLIB
Draw_CMPLRS.edl
Draw_Replace.tcl
Draw_Commands.cxx
Draw_BasicCommands.cxx
Draw_VariableCommands.cxx
Draw_GraphicCommands.cxx
Draw_UnitCommands.cxx
CommandWindow.cxx
COMMANDWINDOW.h
Draw.cxx
Draw.hxx
Draw_Appli.hxx
Draw_Interpretor.hxx
Draw_Axis2D.cxx
Draw_Axis2D.hxx
Draw_Axis3D.cxx
Draw_Axis3D.hxx
Draw_BasicCommands.cxx
Draw_Box.cxx
Draw_Box.hxx
Draw_Chronometer.cxx
Draw_Chronometer.hxx
Draw_Circle2D.cxx
Draw_Circle2D.hxx
Draw_Circle3D.cxx
Draw_Circle3D.hxx
Draw_Color.cxx
Draw_Color.hxx
Draw_ColorKind.hxx
Draw_Commands.cxx
Draw_Debug.cxx
Draw_Display.cxx
Draw_Display.hxx
Draw_Drawable2D.cxx
Draw_Drawable2D.hxx
Draw_Drawable3D.cxx
Draw_Drawable3D.hxx
Draw_Drawable3D.lxx
Draw_Failure.hxx
Draw_GraphicCommands.cxx
Draw_Grid.cxx
Draw_Grid.hxx
Draw_Grid.lxx
Draw_Interpretor.cxx
Draw_View.hxx
Draw_Interpretor.hxx
Draw_Main.cxx
Draw_Main.hxx
Draw_MapOfAsciiString.hxx
Draw_Marker2D.cxx
Draw_Marker2D.hxx
Draw_Marker3D.cxx
Draw_Marker3D.hxx
Draw_MarkerShape.hxx
Draw_Number.cxx
Draw_Number.hxx
Draw_PInterp.hxx
Draw_PloadCommands.cxx
Draw_PluginMacro.hxx
Draw_Printer.cxx
Draw_Printer.hxx
Draw_ProgressIndicator.cxx
Draw_ProgressIndicator.hxx
Draw_Replace.tcl
Draw_Segment2D.cxx
Draw_Segment2D.hxx
Draw_Segment3D.cxx
Draw_Segment3D.hxx
Draw_SequenceOfDrawable3D.hxx
Draw_Text2D.cxx
Draw_Text2D.hxx
Draw_Text3D.cxx
Draw_Text3D.hxx
Draw_UnitCommands.cxx
Draw_VariableCommands.cxx
Draw_View.cxx
Draw_View.hxx
Draw_Viewer.cxx
Draw_Viewer.hxx
Draw_Window.cxx
Draw_Window.hxx
Draw_PInterp.hxx
DrawRessource.h
init.h
MAINWINDOW.h
MainWindow.cxx
CommandWindow.cxx
COMMANDWINDOW.h
init.cxx
Draw_Main.hxx
Draw_Main.cxx
Draw_PluginMacro.hxx
Draw_PloadCommands.cxx
Draw_Window_1.mm
Draw_Debug.cxx
Draw_SequenceOfDrawable3D.hxx
Draw_MapOfAsciiString.hxx
DrawRessource.h
EXTERNLIB
init.cxx
init.h
MainWindow.cxx
MAINWINDOW.h