mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +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:
@@ -1 +1,7 @@
|
||||
XSDRAW.cxx
|
||||
XSDRAW.hxx
|
||||
XSDRAW_Commands.hxx
|
||||
XSDRAW_Functions.cxx
|
||||
XSDRAW_Functions.hxx
|
||||
XSDRAW_Vars.cxx
|
||||
XSDRAW_Vars.hxx
|
||||
|
@@ -1,210 +0,0 @@
|
||||
-- Created on: 1995-03-14
|
||||
-- Created by: Christian CAILLET
|
||||
-- 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.
|
||||
|
||||
package XSDRAW
|
||||
|
||||
---Purpose : Basic package to work functions of X-STEP (IFSelect & Co)
|
||||
-- under control of DRAW
|
||||
--
|
||||
-- Works with some "static" data : a SessionPilot (used to run)
|
||||
-- with its WorkSession and Model and TransferReader, a
|
||||
-- FinderProcess
|
||||
|
||||
uses TCollection, TColStd, TopTools,
|
||||
gp, Geom, Geom2d, TopoDS, MoniTool,
|
||||
Interface, Transfer, IFSelect, XSControl, Draw, SWDRAW, Message
|
||||
|
||||
is
|
||||
|
||||
class Functions;
|
||||
|
||||
class Vars;
|
||||
---Purpose : Takes variables to/from the DRAW session
|
||||
|
||||
--class ProgressIndicator;
|
||||
---Purpose : Implements ProgressIndicator for DRAW
|
||||
|
||||
-- Linking with DRAW function set
|
||||
|
||||
ChangeCommand (oldname,newname : CString);
|
||||
---Purpose : Changes the name under which a command of xstep is known by
|
||||
-- Draw. This allows to avoid collisions
|
||||
-- To be called before LoadDraw or any other xstep initialisation
|
||||
|
||||
RemoveCommand (oldname : CString);
|
||||
---Purpose : Removes a command from the interpretation list of Draw
|
||||
-- To be called before LoadDraw or any other xstep initialisation
|
||||
|
||||
LoadSession returns Boolean;
|
||||
---Purpose : Defines the basic context to work with a X-STEP Session :
|
||||
-- it performs the basic inits, also records the Controller
|
||||
-- If the Controller is not yet set, it must be set after
|
||||
-- (call to SetController)
|
||||
-- LoadSession is called by LoadDraw
|
||||
-- Returns True the first time, False if already called
|
||||
|
||||
LoadDraw (theCommands : in out Interpretor from Draw);
|
||||
---Purpose : Defines the context for using a X-STEP Session under DRAW
|
||||
-- Once the various INITs have been done, a call to LoadDraw
|
||||
-- records the defined commands for the X-STEP SessionPilot,
|
||||
-- into the DRAW interpretation list.
|
||||
-- "Set" commands are accessed under command xset
|
||||
-- SDS>xset name command ...
|
||||
-- Other commands can be accessed directly or under command xstep
|
||||
-- SDS>command ... and SDS>xstep command ... are equivalent
|
||||
--
|
||||
-- Only the command xinit is accessed directly only :
|
||||
-- SDS>xinit (from the already defined Controller)
|
||||
-- SDS>xinit iges (first defines the Controller as for "iges")
|
||||
--
|
||||
-- It also records the function to be called by DRAW (not
|
||||
-- declared because specific).
|
||||
-- And it defines the context variables, i.e. a WorkSession, then
|
||||
-- it calls SetController with the currently defined Controller
|
||||
-- Remark : at least, the standard commands are recorded
|
||||
--
|
||||
-- See also Controller : it is part of the Context, but it must
|
||||
-- be precised separately
|
||||
|
||||
Execute (command : CString; var : CString = "") returns Integer;
|
||||
---Purpose : Allows to execute a xstep-draw command from C++ program
|
||||
-- Fixed form : Execute("command args...");
|
||||
-- Form with a variable text part : add %s for the variable :
|
||||
-- Execute ("command args %s args..",var) [var is a CString]
|
||||
-- Returns the same value as returned by call from DRAW
|
||||
|
||||
Pilot returns SessionPilot from IFSelect;
|
||||
---Purpose : Returns the SessionPilot (can be used for direct call)
|
||||
|
||||
Session returns WorkSession from XSControl;
|
||||
---Purpose : Returns the WorkSession defined in AddDraw (through Pilot)
|
||||
-- It is from XSControl, it brings functionnalities for Transfers
|
||||
|
||||
SetController (control : Controller from XSControl);
|
||||
---Purpose : Defines a Controller for the command "xinit" and applies it
|
||||
-- (i.e. calls its method Customise)
|
||||
|
||||
Controller returns Controller from XSControl;
|
||||
---Purpose : Returns the Controller, a Null Handle if not yet defined
|
||||
|
||||
SetNorm (normname : CString; profile : CString = "") returns Boolean;
|
||||
---Purpose : Sets a norm by its name (controller recorded as <normname> )
|
||||
-- Returns True if done, False if this norm is unknown
|
||||
-- If <profile> is given, also sets the norm to <profile>
|
||||
-- (if <profile> is undefined for <normname>, it is ignored)
|
||||
|
||||
-- Additionnal access to XSTEP data
|
||||
|
||||
Protocol returns Protocol from Interface;
|
||||
---Purpose : Returns the actually defined Protocol
|
||||
|
||||
Model returns InterfaceModel from Interface;
|
||||
---Purpose : Returns the Model of the Session (it is Session()->Model() )
|
||||
|
||||
SetModel (model : InterfaceModel from Interface; file : CString = "");
|
||||
---Purpose : Sets a Model in session (it is Session()->SetModel(model) )
|
||||
-- If <file> is defined, SetLoadedFile is also done
|
||||
|
||||
NewModel returns InterfaceModel from Interface;
|
||||
---Purpose : Produces a new model (from the Controller), can be Null
|
||||
-- Does not set it in the session
|
||||
|
||||
Entity (num : Integer) returns Transient;
|
||||
---Purpose : Returns the entity n0 <num> of the Model of the Session
|
||||
-- (it is StartingEntity)
|
||||
-- Null Handle if <num> is not suitable
|
||||
|
||||
Number (ent : Transient) returns Integer;
|
||||
---Purpose : Returns the number of an entity in the Model (StartingNumber)
|
||||
-- 0 if <ent> unknown in the model, or null
|
||||
|
||||
SetTransferProcess (TP : Transient);
|
||||
---Purpose : Sets a TransferProcess in order to analyse it (see Activator)
|
||||
-- It can be either a FinderProcess or a TransientProcess, in
|
||||
-- that case a new TransferReader is created on it
|
||||
|
||||
TransientProcess returns TransientProcess from Transfer;
|
||||
---Purpose : Returns the TransferProcess : TransientProcess detained by
|
||||
-- the TransferReader
|
||||
|
||||
FinderProcess returns FinderProcess from Transfer;
|
||||
---Purpose : Returns the FinderProcess, detained by the TransferWriter
|
||||
|
||||
|
||||
InitTransferReader (mode : Integer);
|
||||
---Purpose : Initialises a TransferReader, according to mode :
|
||||
-- 0 nullifies it, 1 clears it (not nullify)
|
||||
-- 2 sets it with TransientProcess & Model
|
||||
-- 3 idem plus roots of TransientProcess
|
||||
-- Remark : called with 0 at least at each SetModel/NewModel
|
||||
|
||||
TransferReader returns TransferReader from XSControl;
|
||||
---Purpose : Returns the current TransferReader, can be null
|
||||
-- It detains the TransientProcess
|
||||
|
||||
-- Some useful functions
|
||||
|
||||
|
||||
GetEntity (name : CString = "") returns Transient;
|
||||
---Purpose : Takes the name of an entity, either as argument, or (if <name>
|
||||
-- is empty) on keybord, and returns the entity
|
||||
-- name can be a label or a number (in alphanumeric), it is
|
||||
-- searched by NumberFromLabel from WorkSession.
|
||||
-- If <name> doesn't match en entity, a Null Handle is returned
|
||||
|
||||
GetEntityNumber (name : CString = "") returns Integer;
|
||||
---Purpose : Same as GetEntity, but returns the number in the model of the
|
||||
-- entity. Returns 0 for null handle
|
||||
|
||||
GetList (first : CString = ""; second : CString = "")
|
||||
returns HSequenceOfTransient from TColStd;
|
||||
---Purpose : Evaluates and returns a list of entity, from :
|
||||
-- keyboard if <first> and <second> are empty, see below
|
||||
-- first if second is empty : can be a number/label of an entity
|
||||
-- or the name of a selection to be evaluated (standard)
|
||||
-- first : name of a selection, evaluated from a list defined by
|
||||
-- second
|
||||
-- In case of failure, returns a Null Handle
|
||||
|
||||
FileAndVar (file, var, def : CString;
|
||||
resfile, resvar : out AsciiString from TCollection)
|
||||
returns Boolean;
|
||||
---Purpose : Analyses given file name and variable name, with a default
|
||||
-- name for variables. Returns resulting file name and variable
|
||||
-- name plus status "file to read"(True) or "already read"(False)
|
||||
-- In the latter case, empty resfile means no file available
|
||||
--
|
||||
-- If <file> is null or empty or equates ".", considers Session
|
||||
-- and returned status is False
|
||||
-- Else, returns resfile = file and status is True
|
||||
-- If <var> is neither null nor empty, resvar = var
|
||||
-- Else, the root part of <resfile> is considered, if defined
|
||||
-- Else, <def> is taken
|
||||
|
||||
MoreShapes (list : in out HSequenceOfShape from TopTools;
|
||||
name : CString) returns Integer;
|
||||
---Purpose : Analyses a name as designating Shapes from DRAW variables or
|
||||
-- XSTEP transfer (last Transfer on Reading). <name> can be :
|
||||
-- "*" : all the root shapes produced by last Transfer (Read)
|
||||
-- i.e. considers roots of the TransientProcess
|
||||
-- a name : a name of a variable DRAW
|
||||
--
|
||||
-- Returns the count of designated Shapes. Their list is put in
|
||||
-- <list>. If <list> is null, it is firstly created. Then it is
|
||||
-- completed (Append without Clear) by the Shapes found
|
||||
-- Returns 0 if no Shape could be found
|
||||
|
||||
end XSDRAW;
|
@@ -11,29 +11,35 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XSDRAW.ixx>
|
||||
|
||||
#include <DBRep.hxx>
|
||||
#include <Dico_DictionaryOfInteger.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
#include <Draw_Appli.hxx>
|
||||
#include <IFSelect_Functions.hxx>
|
||||
#include <IFSelect_SessionPilot.hxx>
|
||||
//#include <XSDRAW_Shape.hxx>
|
||||
#include <XSDRAW_Vars.hxx>
|
||||
#include <XSControl_Functions.hxx>
|
||||
#include <XSControl_FuncShape.hxx>
|
||||
#include <Draw_Appli.hxx>
|
||||
#include <XSControl.hxx>
|
||||
#include <XSControl_TransferWriter.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TransferBRep.hxx>
|
||||
#include <DBRep.hxx>
|
||||
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Message.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TColStd_HSequenceOfAsciiString.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
#include <TransferBRep.hxx>
|
||||
#include <XSControl.hxx>
|
||||
#include <XSControl_Controller.hxx>
|
||||
#include <XSControl_FuncShape.hxx>
|
||||
#include <XSControl_Functions.hxx>
|
||||
#include <XSControl_TransferReader.hxx>
|
||||
#include <XSControl_TransferWriter.hxx>
|
||||
#include <XSControl_WorkSession.hxx>
|
||||
#include <XSDRAW.hxx>
|
||||
#include <XSDRAW_Vars.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
//#include <XSDRAW_Shape.hxx>
|
||||
static int deja = 0, dejald = 0;
|
||||
//unused variable
|
||||
//static int okxset = 0;
|
||||
|
242
src/XSDRAW/XSDRAW.hxx
Normal file
242
src/XSDRAW/XSDRAW.hxx
Normal file
@@ -0,0 +1,242 @@
|
||||
// Created on: 1995-03-14
|
||||
// Created by: Christian CAILLET
|
||||
// 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 _XSDRAW_HeaderFile
|
||||
#define _XSDRAW_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Draw_Interpretor.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <TopTools_HSequenceOfShape.hxx>
|
||||
class IFSelect_SessionPilot;
|
||||
class XSControl_WorkSession;
|
||||
class XSControl_Controller;
|
||||
class Interface_Protocol;
|
||||
class Interface_InterfaceModel;
|
||||
class Standard_Transient;
|
||||
class Transfer_TransientProcess;
|
||||
class Transfer_FinderProcess;
|
||||
class XSControl_TransferReader;
|
||||
class TCollection_AsciiString;
|
||||
class XSDRAW_Functions;
|
||||
class XSDRAW_Vars;
|
||||
|
||||
|
||||
//! Basic package to work functions of X-STEP (IFSelect & Co)
|
||||
//! under control of DRAW
|
||||
//!
|
||||
//! Works with some "static" data : a SessionPilot (used to run)
|
||||
//! with its WorkSession and Model and TransferReader, a
|
||||
//! FinderProcess
|
||||
class XSDRAW
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Takes variables to/from the DRAW session
|
||||
//! Implements ProgressIndicator for DRAW
|
||||
//! Changes the name under which a command of xstep is known by
|
||||
//! Draw. This allows to avoid collisions
|
||||
//! To be called before LoadDraw or any other xstep initialisation
|
||||
Standard_EXPORT static void ChangeCommand (const Standard_CString oldname, const Standard_CString newname);
|
||||
|
||||
//! Removes a command from the interpretation list of Draw
|
||||
//! To be called before LoadDraw or any other xstep initialisation
|
||||
Standard_EXPORT static void RemoveCommand (const Standard_CString oldname);
|
||||
|
||||
//! Defines the basic context to work with a X-STEP Session :
|
||||
//! it performs the basic inits, also records the Controller
|
||||
//! If the Controller is not yet set, it must be set after
|
||||
//! (call to SetController)
|
||||
//! LoadSession is called by LoadDraw
|
||||
//! Returns True the first time, False if already called
|
||||
Standard_EXPORT static Standard_Boolean LoadSession();
|
||||
|
||||
//! Defines the context for using a X-STEP Session under DRAW
|
||||
//! Once the various INITs have been done, a call to LoadDraw
|
||||
//! records the defined commands for the X-STEP SessionPilot,
|
||||
//! into the DRAW interpretation list.
|
||||
//! "Set" commands are accessed under command xset
|
||||
//! SDS>xset name command ...
|
||||
//! Other commands can be accessed directly or under command xstep
|
||||
//! SDS>command ... and SDS>xstep command ... are equivalent
|
||||
//!
|
||||
//! Only the command xinit is accessed directly only :
|
||||
//! SDS>xinit (from the already defined Controller)
|
||||
//! SDS>xinit iges (first defines the Controller as for "iges")
|
||||
//!
|
||||
//! It also records the function to be called by DRAW (not
|
||||
//! declared because specific).
|
||||
//! And it defines the context variables, i.e. a WorkSession, then
|
||||
//! it calls SetController with the currently defined Controller
|
||||
//! Remark : at least, the standard commands are recorded
|
||||
//!
|
||||
//! See also Controller : it is part of the Context, but it must
|
||||
//! be precised separately
|
||||
Standard_EXPORT static void LoadDraw (Draw_Interpretor& theCommands);
|
||||
|
||||
//! Allows to execute a xstep-draw command from C++ program
|
||||
//! Fixed form : Execute("command args...");
|
||||
//! Form with a variable text part : add %s for the variable :
|
||||
//! Execute ("command args %s args..",var) [var is a CString]
|
||||
//! Returns the same value as returned by call from DRAW
|
||||
Standard_EXPORT static Standard_Integer Execute (const Standard_CString command, const Standard_CString var = "");
|
||||
|
||||
//! Returns the SessionPilot (can be used for direct call)
|
||||
Standard_EXPORT static Handle(IFSelect_SessionPilot) Pilot();
|
||||
|
||||
//! Returns the WorkSession defined in AddDraw (through Pilot)
|
||||
//! It is from XSControl, it brings functionnalities for Transfers
|
||||
Standard_EXPORT static Handle(XSControl_WorkSession) Session();
|
||||
|
||||
//! Defines a Controller for the command "xinit" and applies it
|
||||
//! (i.e. calls its method Customise)
|
||||
Standard_EXPORT static void SetController (const Handle(XSControl_Controller)& control);
|
||||
|
||||
//! Returns the Controller, a Null Handle if not yet defined
|
||||
Standard_EXPORT static Handle(XSControl_Controller) Controller();
|
||||
|
||||
//! Sets a norm by its name (controller recorded as <normname> )
|
||||
//! Returns True if done, False if this norm is unknown
|
||||
//! If <profile> is given, also sets the norm to <profile>
|
||||
//! (if <profile> is undefined for <normname>, it is ignored)
|
||||
Standard_EXPORT static Standard_Boolean SetNorm (const Standard_CString normname, const Standard_CString profile = "");
|
||||
|
||||
//! Returns the actually defined Protocol
|
||||
Standard_EXPORT static Handle(Interface_Protocol) Protocol();
|
||||
|
||||
//! Returns the Model of the Session (it is Session()->Model() )
|
||||
Standard_EXPORT static Handle(Interface_InterfaceModel) Model();
|
||||
|
||||
//! Sets a Model in session (it is Session()->SetModel(model) )
|
||||
//! If <file> is defined, SetLoadedFile is also done
|
||||
Standard_EXPORT static void SetModel (const Handle(Interface_InterfaceModel)& model, const Standard_CString file = "");
|
||||
|
||||
//! Produces a new model (from the Controller), can be Null
|
||||
//! Does not set it in the session
|
||||
Standard_EXPORT static Handle(Interface_InterfaceModel) NewModel();
|
||||
|
||||
//! Returns the entity n0 <num> of the Model of the Session
|
||||
//! (it is StartingEntity)
|
||||
//! Null Handle if <num> is not suitable
|
||||
Standard_EXPORT static Handle(Standard_Transient) Entity (const Standard_Integer num);
|
||||
|
||||
//! Returns the number of an entity in the Model (StartingNumber)
|
||||
//! 0 if <ent> unknown in the model, or null
|
||||
Standard_EXPORT static Standard_Integer Number (const Handle(Standard_Transient)& ent);
|
||||
|
||||
//! Sets a TransferProcess in order to analyse it (see Activator)
|
||||
//! It can be either a FinderProcess or a TransientProcess, in
|
||||
//! that case a new TransferReader is created on it
|
||||
Standard_EXPORT static void SetTransferProcess (const Handle(Standard_Transient)& TP);
|
||||
|
||||
//! Returns the TransferProcess : TransientProcess detained by
|
||||
//! the TransferReader
|
||||
Standard_EXPORT static Handle(Transfer_TransientProcess) TransientProcess();
|
||||
|
||||
//! Returns the FinderProcess, detained by the TransferWriter
|
||||
Standard_EXPORT static Handle(Transfer_FinderProcess) FinderProcess();
|
||||
|
||||
//! Initialises a TransferReader, according to mode :
|
||||
//! 0 nullifies it, 1 clears it (not nullify)
|
||||
//! 2 sets it with TransientProcess & Model
|
||||
//! 3 idem plus roots of TransientProcess
|
||||
//! Remark : called with 0 at least at each SetModel/NewModel
|
||||
Standard_EXPORT static void InitTransferReader (const Standard_Integer mode);
|
||||
|
||||
//! Returns the current TransferReader, can be null
|
||||
//! It detains the TransientProcess
|
||||
Standard_EXPORT static Handle(XSControl_TransferReader) TransferReader();
|
||||
|
||||
//! Takes the name of an entity, either as argument, or (if <name>
|
||||
//! is empty) on keybord, and returns the entity
|
||||
//! name can be a label or a number (in alphanumeric), it is
|
||||
//! searched by NumberFromLabel from WorkSession.
|
||||
//! If <name> doesn't match en entity, a Null Handle is returned
|
||||
Standard_EXPORT static Handle(Standard_Transient) GetEntity (const Standard_CString name = "");
|
||||
|
||||
//! Same as GetEntity, but returns the number in the model of the
|
||||
//! entity. Returns 0 for null handle
|
||||
Standard_EXPORT static Standard_Integer GetEntityNumber (const Standard_CString name = "");
|
||||
|
||||
//! Evaluates and returns a list of entity, from :
|
||||
//! keyboard if <first> and <second> are empty, see below
|
||||
//! first if second is empty : can be a number/label of an entity
|
||||
//! or the name of a selection to be evaluated (standard)
|
||||
//! first : name of a selection, evaluated from a list defined by
|
||||
//! second
|
||||
//! In case of failure, returns a Null Handle
|
||||
Standard_EXPORT static Handle(TColStd_HSequenceOfTransient) GetList (const Standard_CString first = "", const Standard_CString second = "");
|
||||
|
||||
//! Analyses given file name and variable name, with a default
|
||||
//! name for variables. Returns resulting file name and variable
|
||||
//! name plus status "file to read"(True) or "already read"(False)
|
||||
//! In the latter case, empty resfile means no file available
|
||||
//!
|
||||
//! If <file> is null or empty or equates ".", considers Session
|
||||
//! and returned status is False
|
||||
//! Else, returns resfile = file and status is True
|
||||
//! If <var> is neither null nor empty, resvar = var
|
||||
//! Else, the root part of <resfile> is considered, if defined
|
||||
//! Else, <def> is taken
|
||||
Standard_EXPORT static Standard_Boolean FileAndVar (const Standard_CString file, const Standard_CString var, const Standard_CString def, TCollection_AsciiString& resfile, TCollection_AsciiString& resvar);
|
||||
|
||||
//! Analyses a name as designating Shapes from DRAW variables or
|
||||
//! XSTEP transfer (last Transfer on Reading). <name> can be :
|
||||
//! "*" : all the root shapes produced by last Transfer (Read)
|
||||
//! i.e. considers roots of the TransientProcess
|
||||
//! a name : a name of a variable DRAW
|
||||
//!
|
||||
//! Returns the count of designated Shapes. Their list is put in
|
||||
//! <list>. If <list> is null, it is firstly created. Then it is
|
||||
//! completed (Append without Clear) by the Shapes found
|
||||
//! Returns 0 if no Shape could be found
|
||||
Standard_EXPORT static Standard_Integer MoreShapes (Handle(TopTools_HSequenceOfShape)& list, const Standard_CString name);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
friend class XSDRAW_Functions;
|
||||
friend class XSDRAW_Vars;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XSDRAW_HeaderFile
|
@@ -1,37 +0,0 @@
|
||||
-- Created on: 1995-03-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- 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 Functions from XSDRAW
|
||||
|
||||
---Purpose : Defines additionnal commands for XSDRAW to :
|
||||
-- - control of initialisation (xinit, xnorm, newmodel)
|
||||
-- - analyse of the result of a transfer (recorded in a
|
||||
-- TransientProcess for Read, FinderProcess for Write) :
|
||||
-- statistics, various lists (roots,complete,abnormal), what
|
||||
-- about one specific entity, producing a model with the
|
||||
-- abnormal result
|
||||
--
|
||||
-- This appendix of XSDRAW is compiled separately to distinguish
|
||||
-- basic features from user callable forms
|
||||
|
||||
uses CString
|
||||
|
||||
is
|
||||
|
||||
Init (myclass);
|
||||
---Purpose : Defines and loads all basic functions for XSDRAW (as ActFunc)
|
||||
|
||||
end Functions;
|
@@ -11,8 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XSDRAW_Functions.ixx>
|
||||
|
||||
#include <XSControl_FuncShape.hxx>
|
||||
#include <XSDRAW_Functions.hxx>
|
||||
|
||||
void XSDRAW_Functions::Init ()
|
||||
{
|
||||
|
69
src/XSDRAW/XSDRAW_Functions.hxx
Normal file
69
src/XSDRAW/XSDRAW_Functions.hxx
Normal file
@@ -0,0 +1,69 @@
|
||||
// Created on: 1995-03-16
|
||||
// Created by: Christian CAILLET
|
||||
// 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 _XSDRAW_Functions_HeaderFile
|
||||
#define _XSDRAW_Functions_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
|
||||
|
||||
//! Defines additionnal commands for XSDRAW to :
|
||||
//! - control of initialisation (xinit, xnorm, newmodel)
|
||||
//! - analyse of the result of a transfer (recorded in a
|
||||
//! TransientProcess for Read, FinderProcess for Write) :
|
||||
//! statistics, various lists (roots,complete,abnormal), what
|
||||
//! about one specific entity, producing a model with the
|
||||
//! abnormal result
|
||||
//!
|
||||
//! This appendix of XSDRAW is compiled separately to distinguish
|
||||
//! basic features from user callable forms
|
||||
class XSDRAW_Functions
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Defines and loads all basic functions for XSDRAW (as ActFunc)
|
||||
Standard_EXPORT static void Init();
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XSDRAW_Functions_HeaderFile
|
@@ -1,56 +0,0 @@
|
||||
-- Created on: 1998-07-22
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1998-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 Vars from XSDRAW inherits Vars from XSControl
|
||||
|
||||
---Purpose : Vars for DRAW session (i.e. DBRep and DrawTrSurf)
|
||||
|
||||
uses CString, Transient,
|
||||
Pnt from gp, Pnt2d from gp,
|
||||
Geometry from Geom, Curve from Geom, Curve from Geom2d, Surface from Geom,
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
|
||||
Create returns Vars from XSDRAW;
|
||||
|
||||
Set (me : mutable; name : CString; val : Transient) is redefined;
|
||||
|
||||
-- Get (me; name : CString) returns Transient is redefined; unused here
|
||||
|
||||
|
||||
GetGeom (me; name : in out CString) returns Geometry is redefined;
|
||||
|
||||
GetCurve2d (me; name : in out CString) returns Curve from Geom2d is redefined;
|
||||
|
||||
GetCurve (me; name : in out CString) returns Curve from Geom is redefined;
|
||||
|
||||
GetSurface (me; name : in out CString) returns Surface from Geom is redefined;
|
||||
|
||||
SetPoint (me : mutable; name : CString; val : Pnt from gp) is redefined;
|
||||
|
||||
SetPoint2d (me : mutable; name : CString; val : Pnt2d from gp) is redefined;
|
||||
|
||||
GetPoint (me; name : in out CString; pnt : out Pnt from gp) returns Boolean is redefined;
|
||||
|
||||
GetPoint2d (me; name : in out CString; pnt : out Pnt2d from gp) returns Boolean is redefined;
|
||||
|
||||
|
||||
SetShape (me : mutable; name : CString; val : Shape from TopoDS) is redefined;
|
||||
|
||||
GetShape (me; name : in out CString) returns Shape from TopoDS is redefined;
|
||||
|
||||
end Vars;
|
@@ -11,16 +11,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XSDRAW_Vars.ixx>
|
||||
#include <Geom_Geometry.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
|
||||
#include <DrawTrSurf.hxx>
|
||||
#include <DBRep.hxx>
|
||||
|
||||
#include <DrawTrSurf.hxx>
|
||||
#include <Geom2d_Curve.hxx>
|
||||
#include <Geom_Curve.hxx>
|
||||
#include <Geom_Geometry.hxx>
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <gp_Pnt2d.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <XSDRAW_Vars.hxx>
|
||||
|
||||
XSDRAW_Vars::XSDRAW_Vars () { }
|
||||
|
||||
|
93
src/XSDRAW/XSDRAW_Vars.hxx
Normal file
93
src/XSDRAW/XSDRAW_Vars.hxx
Normal file
@@ -0,0 +1,93 @@
|
||||
// Created on: 1998-07-22
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1998-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 _XSDRAW_Vars_HeaderFile
|
||||
#define _XSDRAW_Vars_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <XSControl_Vars.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_Transient;
|
||||
class Geom_Geometry;
|
||||
class Geom2d_Curve;
|
||||
class Geom_Curve;
|
||||
class Geom_Surface;
|
||||
class gp_Pnt;
|
||||
class gp_Pnt2d;
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class XSDRAW_Vars;
|
||||
DEFINE_STANDARD_HANDLE(XSDRAW_Vars, XSControl_Vars)
|
||||
|
||||
//! Vars for DRAW session (i.e. DBRep and DrawTrSurf)
|
||||
class XSDRAW_Vars : public XSControl_Vars
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XSDRAW_Vars();
|
||||
|
||||
Standard_EXPORT virtual void Set (const Standard_CString name, const Handle(Standard_Transient)& val) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_Geometry) GetGeom (Standard_CString& name) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom2d_Curve) GetCurve2d (Standard_CString& name) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_Curve) GetCurve (Standard_CString& name) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Geom_Surface) GetSurface (Standard_CString& name) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetPoint (const Standard_CString name, const gp_Pnt& val) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetPoint2d (const Standard_CString name, const gp_Pnt2d& val) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean GetPoint (Standard_CString& name, gp_Pnt& pnt) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean GetPoint2d (Standard_CString& name, gp_Pnt2d& pnt) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void SetShape (const Standard_CString name, const TopoDS_Shape& val) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual TopoDS_Shape GetShape (Standard_CString& name) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(XSDRAW_Vars,XSControl_Vars)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XSDRAW_Vars_HeaderFile
|
Reference in New Issue
Block a user