mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
Rebase of the "0023997" on the new master
This commit is contained in:
parent
c5d477170e
commit
f7baa387b6
@ -24,7 +24,7 @@ uses
|
|||||||
Shape from TopoDS,
|
Shape from TopoDS,
|
||||||
IGESEntity from IGESData,
|
IGESEntity from IGESData,
|
||||||
IGESModel from IGESData,
|
IGESModel from IGESData,
|
||||||
FinderProcess from Transfer
|
FinderProcess_Handle from Transfer
|
||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
@ -48,11 +48,11 @@ is
|
|||||||
---Purpose : Returns the value of the UnitFlag of the header of the model
|
---Purpose : Returns the value of the UnitFlag of the header of the model
|
||||||
-- in meters.
|
-- in meters.
|
||||||
|
|
||||||
SetTransferProcess(me : in out; TP : FinderProcess from Transfer);
|
SetTransferProcess(me : in out; TP : FinderProcess_Handle from Transfer);
|
||||||
---Purpose : Set the value of "TheMap"
|
---Purpose : Set the value of "TheMap"
|
||||||
|
|
||||||
GetTransferProcess(me)
|
GetTransferProcess(me)
|
||||||
returns FinderProcess from Transfer;
|
returns FinderProcess_Handle from Transfer;
|
||||||
---Purpose : Returns the value of "TheMap"
|
---Purpose : Returns the value of "TheMap"
|
||||||
|
|
||||||
TransferShape(me : in out; start : Shape from TopoDS)
|
TransferShape(me : in out; start : Shape from TopoDS)
|
||||||
@ -127,6 +127,6 @@ fields
|
|||||||
myConvSurface : Boolean;
|
myConvSurface : Boolean;
|
||||||
myPCurveMode : Boolean;
|
myPCurveMode : Boolean;
|
||||||
|
|
||||||
TheMap : FinderProcess from Transfer;
|
TheMap : FinderProcess_Handle from Transfer;
|
||||||
|
|
||||||
end BREntity;
|
end BREntity;
|
||||||
|
@ -51,7 +51,6 @@
|
|||||||
|
|
||||||
#include <Transfer_FinderProcess.hxx>
|
#include <Transfer_FinderProcess.hxx>
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
#include <TransferBRep_OrientedShapeMapper.hxx>
|
|
||||||
#include <Transfer_TransientMapper.hxx>
|
#include <Transfer_TransientMapper.hxx>
|
||||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ uses
|
|||||||
Shell from IGESSolid,
|
Shell from IGESSolid,
|
||||||
ManifoldSolid from IGESSolid,
|
ManifoldSolid from IGESSolid,
|
||||||
CString from Standard,
|
CString from Standard,
|
||||||
FinderProcess from Transfer
|
FinderProcess_Handle from Transfer
|
||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
|
@ -124,7 +124,6 @@
|
|||||||
|
|
||||||
#include <Transfer_FinderProcess.hxx>
|
#include <Transfer_FinderProcess.hxx>
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
#include <TransferBRep_OrientedShapeMapper.hxx>
|
|
||||||
#include <Transfer_TransientMapper.hxx>
|
#include <Transfer_TransientMapper.hxx>
|
||||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||||
#include <Interface_Static.hxx>
|
#include <Interface_Static.hxx>
|
||||||
|
2
src/HeaderSection/FILES
Normal file
2
src/HeaderSection/FILES
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
HeaderSection_HeaderRecognizer.hxx
|
||||||
|
HeaderSection_HeaderRecognizer.cxx
|
@ -32,7 +32,7 @@ class FileName;
|
|||||||
class FileDescription;
|
class FileDescription;
|
||||||
class FileSchema;
|
class FileSchema;
|
||||||
|
|
||||||
class HeaderRecognizer;
|
imported HeaderRecognizer;
|
||||||
|
|
||||||
--class Array1OfHAsciiString instantiates Array1(HAsciiString);
|
--class Array1OfHAsciiString instantiates Array1(HAsciiString);
|
||||||
--class HArray1OfHAsciiString instantiates HArray1(HAsciiString,Array1OfHAsciiString from HeaderSection);
|
--class HArray1OfHAsciiString instantiates HArray1(HAsciiString,Array1OfHAsciiString from HeaderSection);
|
||||||
|
@ -1,32 +0,0 @@
|
|||||||
-- Created on: 1994-06-27
|
|
||||||
-- Created by: Frederic MAUPAS
|
|
||||||
-- 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 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 HeaderRecognizer from HeaderSection
|
|
||||||
inherits FileRecognizer from StepData
|
|
||||||
|
|
||||||
---Purpose : Recognizes STEP Standard Header Entities
|
|
||||||
-- (FileName, FileDescription, FileSchema)
|
|
||||||
|
|
||||||
uses AsciiString from TCollection
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns mutable HeaderRecognizer ;
|
|
||||||
|
|
||||||
Eval (me : mutable ; key : AsciiString from TCollection) is protected;
|
|
||||||
---Purpose: Recognizes data types of Header STEP Standard
|
|
||||||
|
|
||||||
end HeaderRecognizer;
|
|
@ -14,36 +14,37 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <HeaderSection_HeaderRecognizer.ixx>
|
#include <HeaderSection_HeaderRecognizer.hxx>
|
||||||
|
|
||||||
#include <HeaderSection_FileName.hxx>
|
#include <HeaderSection_FileName.hxx>
|
||||||
#include <HeaderSection_FileSchema.hxx>
|
#include <HeaderSection_FileSchema.hxx>
|
||||||
#include <HeaderSection_FileDescription.hxx>
|
#include <HeaderSection_FileDescription.hxx>
|
||||||
|
|
||||||
|
static TCollection_AsciiString reco_FileName ("FILE_NAME");
|
||||||
|
static TCollection_AsciiString reco_FileSchema ("FILE_SCHEMA");
|
||||||
static TCollection_AsciiString reco_FileName ("FILE_NAME");
|
|
||||||
static TCollection_AsciiString reco_FileSchema ("FILE_SCHEMA");
|
|
||||||
static TCollection_AsciiString reco_FileDescription ("FILE_DESCRIPTION");
|
static TCollection_AsciiString reco_FileDescription ("FILE_DESCRIPTION");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
HeaderSection_HeaderRecognizer::HeaderSection_HeaderRecognizer ()
|
HeaderSection_HeaderRecognizer::HeaderSection_HeaderRecognizer ()
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
void HeaderSection_HeaderRecognizer::Eval
|
void HeaderSection_HeaderRecognizer::Eval (const TCollection_AsciiString& key)
|
||||||
(const TCollection_AsciiString& key)
|
|
||||||
{
|
{
|
||||||
if (key.IsEqual(reco_FileName)) {
|
if (key.IsEqual(reco_FileName))
|
||||||
|
{
|
||||||
SetOK(new HeaderSection_FileName);
|
SetOK(new HeaderSection_FileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key.IsEqual(reco_FileSchema)) {
|
if (key.IsEqual(reco_FileSchema))
|
||||||
|
{
|
||||||
SetOK(new HeaderSection_FileSchema);
|
SetOK(new HeaderSection_FileSchema);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key.IsEqual(reco_FileDescription)) {
|
if (key.IsEqual(reco_FileDescription))
|
||||||
|
{
|
||||||
SetOK(new HeaderSection_FileDescription);
|
SetOK(new HeaderSection_FileDescription);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(HeaderSection_HeaderRecognizer, StepData_FileRecognizer)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(HeaderSection_HeaderRecognizer, StepData_FileRecognizer)
|
||||||
|
43
src/HeaderSection/HeaderSection_HeaderRecognizer.hxx
Normal file
43
src/HeaderSection/HeaderSection_HeaderRecognizer.hxx
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
// 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 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 _HeaderSection_HeaderRecognizer_HeaderFile
|
||||||
|
#define _HeaderSection_HeaderRecognizer_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
#include <StepData_FileRecognizer.hxx>
|
||||||
|
|
||||||
|
class TCollection_AsciiString;
|
||||||
|
|
||||||
|
//! Recognizes STEP Standard Header Entities <br>
|
||||||
|
//! (FileName, FileDescription, FileSchema) <br>
|
||||||
|
class HeaderSection_HeaderRecognizer : public StepData_FileRecognizer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT HeaderSection_HeaderRecognizer();
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(HeaderSection_HeaderRecognizer)
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Recognizes data types of Header STEP Standard <br>
|
||||||
|
Standard_EXPORT void Eval(const TCollection_AsciiString& key);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(HeaderSection_HeaderRecognizer, StepData_FileRecognizer)
|
||||||
|
|
||||||
|
#endif
|
@ -75,7 +75,6 @@ is
|
|||||||
class SelectSharing; -- directly sharing entities
|
class SelectSharing; -- directly sharing entities
|
||||||
deferred class SelectAnyList; -- from a list in an entity
|
deferred class SelectAnyList; -- from a list in an entity
|
||||||
deferred class SelectInList; -- from a list of single entities
|
deferred class SelectInList; -- from a list of single entities
|
||||||
generic class SelectList; -- from an entity as a list
|
|
||||||
class SelectSuite; -- macro-select-deduct
|
class SelectSuite; -- macro-select-deduct
|
||||||
|
|
||||||
deferred class SelectExtract; -- sorted lists (can be inverted) :
|
deferred class SelectExtract; -- sorted lists (can be inverted) :
|
||||||
@ -122,8 +121,6 @@ is
|
|||||||
deferred class Modifier; -- defines modifying actions on transferred model
|
deferred class Modifier; -- defines modifying actions on transferred model
|
||||||
class ModifReorder; -- reorder whole model from roots
|
class ModifReorder; -- reorder whole model from roots
|
||||||
class ModifEditForm; -- applies an EditForm
|
class ModifEditForm; -- applies an EditForm
|
||||||
deferred generic class FileModifier; -- defines actions on file sending
|
|
||||||
deferred generic class ModelModifier; -- specific actions on model
|
|
||||||
|
|
||||||
-- -- Session Management -- --
|
-- -- Session Management -- --
|
||||||
|
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
-- Created on: 1994-03-21
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 generic class FileModifier from IFSelect
|
|
||||||
(Writer as any) -- according each Interface
|
|
||||||
inherits GeneralModifier
|
|
||||||
|
|
||||||
---Purpose : Allows to precise the frame work for File Modifiers able to
|
|
||||||
-- run with an Interface (such as STEP, VDA, IGES ...)
|
|
||||||
--
|
|
||||||
-- Remember that File Modifiers are activated by a WorkLibrary :
|
|
||||||
-- if they inherit from an instantiation of FileModifier with the
|
|
||||||
-- data from this Interface, this will be easier to do.
|
|
||||||
-- They are activated before sending the file, in the order
|
|
||||||
-- given by the ModielCopier.
|
|
||||||
--
|
|
||||||
-- For each Interface on which File Modifiers have to be defined,
|
|
||||||
-- The way to follow is firstly to instantiate FileModifier with
|
|
||||||
-- its specific data :
|
|
||||||
-- Model is the InterfaceModel specific to the considered norm
|
|
||||||
-- Writer is the Writer specific to the considered norm
|
|
||||||
-- Then to define the various classes which inherit from it and
|
|
||||||
-- define their method Perform
|
|
||||||
|
|
||||||
uses ContextWrite
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Initialize;
|
|
||||||
---Purpose : Sets a File Modifier to keep the graph of dependences
|
|
||||||
-- unchanges (because it works on the model already produced)
|
|
||||||
|
|
||||||
Perform (me; ctx : in out ContextWrite; writer : in out Writer)
|
|
||||||
is deferred;
|
|
||||||
---Purpose : Perform the action specific to each class of File Modifier
|
|
||||||
-- <ctx> is the ContextWrite, which brings : the model, the
|
|
||||||
-- protocol, the file name, plus the object AppliedModifiers
|
|
||||||
-- (not used here) and the CheckList
|
|
||||||
-- Remark that the model has to be casted for specific access
|
|
||||||
--
|
|
||||||
-- <writer> is the Writer and is specific to each norm, on which
|
|
||||||
-- to act
|
|
||||||
|
|
||||||
|
|
||||||
end FileModifier;
|
|
@ -1,72 +0,0 @@
|
|||||||
-- Created on: 1994-03-21
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 generic class ModelModifier from IFSelect
|
|
||||||
(Model as InterfaceModel; Proto as Protocol from Interface)
|
|
||||||
inherits Modifier
|
|
||||||
|
|
||||||
---Purpose : Allows to precise the frame work for Model Modifiers able to
|
|
||||||
-- run with an Interface (such as STEP, VDA, IGES ...)
|
|
||||||
--
|
|
||||||
-- Acts as a Modifier but properly casts Model and Protocol
|
|
||||||
-- according to each Interface, and refuses to work if cast
|
|
||||||
-- has failed (i.e. if it is not used in good context)
|
|
||||||
--
|
|
||||||
-- Then, it is finer to make specific Model Modifier inherit
|
|
||||||
-- from an instantiated ModelModifier, instead of Modifier itself
|
|
||||||
-- (though it is not mandatory)
|
|
||||||
--
|
|
||||||
-- For each Interface on which Model Modifiers have to be defined,
|
|
||||||
-- The way to follow is firstly to instantiate ModelModifier with
|
|
||||||
-- its specific data :
|
|
||||||
-- Model is the InterfaceModel specific to the considered norm
|
|
||||||
-- Then to define the various classes which inherit from it and
|
|
||||||
-- define their method Perform
|
|
||||||
|
|
||||||
uses CString, InterfaceModel, Protocol from Interface, CopyTool, ContextModif
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Initialize (maychangegraph : Boolean);
|
|
||||||
---Purpose : Calls inherited Initialize, transmits to it the information
|
|
||||||
-- <maychangegraph>
|
|
||||||
|
|
||||||
Perform (me; ctx : in out ContextModif;
|
|
||||||
target : mutable InterfaceModel;
|
|
||||||
protocol : Protocol from Interface;
|
|
||||||
TC : in out CopyTool);
|
|
||||||
---Purpose : The inherited Perform does the required cast (and refuses to
|
|
||||||
-- go further if cast has failed) then calls the instantiated
|
|
||||||
-- Performing
|
|
||||||
|
|
||||||
PerformProtocol (me; ctx : in out ContextModif;
|
|
||||||
target : mutable Model;
|
|
||||||
proto : Proto;
|
|
||||||
TC : in out CopyTool) is virtual;
|
|
||||||
---Purpose : Specific Perform with Protocol. It is defined to let the
|
|
||||||
-- Protocol unused and to call Performing without Protocol
|
|
||||||
-- (most current case). It can be redefined if specific action
|
|
||||||
-- requires Protocol.
|
|
||||||
|
|
||||||
Performing (me; ctx : in out ContextModif;
|
|
||||||
target : mutable Model;
|
|
||||||
TC : in out CopyTool) is deferred;
|
|
||||||
---Purpose : Specific Perform, without Protocol. If Performing with
|
|
||||||
-- Protocol is redefined, Performing without Protocol must
|
|
||||||
-- though be defined to do nothing (not called, but demanded
|
|
||||||
-- by the linker)
|
|
||||||
|
|
||||||
end ModelModifier;
|
|
@ -1,41 +0,0 @@
|
|||||||
// 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 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.
|
|
||||||
|
|
||||||
//#include <IFSelect_ModelModifier.ixx>
|
|
||||||
#include <Interface_Check.hxx>
|
|
||||||
|
|
||||||
IFSelect_ModelModifier::IFSelect_ModelModifier (const Standard_Boolean grf)
|
|
||||||
: IFSelect_Modifier (grf) { }
|
|
||||||
|
|
||||||
void IFSelect_ModelModifier::Perform
|
|
||||||
(IFSelect_ContextModif& ctx,
|
|
||||||
const Handle(Interface_InterfaceModel)& target,
|
|
||||||
const Handle(Interface_Protocol)& protocol,
|
|
||||||
Interface_CopyTool& TC) const
|
|
||||||
{
|
|
||||||
ctx.TraceModifier(this);
|
|
||||||
Handle(Model) targ = Handle(Model)::DownCast(target);
|
|
||||||
Handle(Proto) prot = Handle(Proto)::DownCast(protocol);
|
|
||||||
if (targ.IsNull()) {
|
|
||||||
ctx.CCheck()->AddFail("Model to Modify : unproper type");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PerformProtocol (ctx,targ,prot,TC);
|
|
||||||
}
|
|
||||||
|
|
||||||
void IFSelect_ModelModifier::PerformProtocol
|
|
||||||
(IFSelect_ContextModif& ctx,
|
|
||||||
const Handle(Model)& target,
|
|
||||||
const Handle(Proto)& protocol,
|
|
||||||
Interface_CopyTool& TC) const
|
|
||||||
{ ctx.SetProtocol(protocol); Performing (ctx,target,TC); }
|
|
@ -1,67 +0,0 @@
|
|||||||
-- Created on: 1992-11-18
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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.
|
|
||||||
|
|
||||||
generic class SelectList from IFSelect (Entity as Transient)
|
|
||||||
inherits SelectInList
|
|
||||||
|
|
||||||
|
|
||||||
---Purpose : A SelectList kind Selection selects a part of an Entity, as
|
|
||||||
-- well as this Entity can be described as an ordered List.
|
|
||||||
-- That is to say, it must have two methods :
|
|
||||||
--
|
|
||||||
-- NbEntities (me) returns Integer;
|
|
||||||
-- Entity (me; num : Integer) returns Transient;
|
|
||||||
--
|
|
||||||
-- For each class of Entity for which we want to define a
|
|
||||||
-- SelectList, we will instanciate this class with the
|
|
||||||
-- desired class of Entity as definition parameter : the deferred
|
|
||||||
-- methods NbEntities and ListedEntity are now defined to call
|
|
||||||
-- the required methods from <Entity>
|
|
||||||
--
|
|
||||||
-- SelectList works as SelectInList, beeing a sub-class of it
|
|
||||||
|
|
||||||
uses AsciiString from TCollection, Transient, EntityIterator, IntParam
|
|
||||||
|
|
||||||
raises OutOfRange
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns mutable SelectList;
|
|
||||||
---Purpose : Creates a SelectList (with no limit);
|
|
||||||
|
|
||||||
KeepInputEntity (me; iter : in out EntityIterator);
|
|
||||||
---Purpose : Keeps Input Entity, as having required type <Entity>
|
|
||||||
|
|
||||||
NbItems (me; ent : Transient) returns Integer;
|
|
||||||
---Purpose : Returns count of Entities in the list in the Entity <ent>
|
|
||||||
-- by calling method NbEntity from parameter class Entity
|
|
||||||
|
|
||||||
ListedEntity (me; num : Integer; ent : Transient)
|
|
||||||
returns Transient raises OutOfRange;
|
|
||||||
---Purpose : Returns an Entity of the list in the Entity <ent>, by calling
|
|
||||||
-- method Entity from parameter class Entity
|
|
||||||
-- Error if <ent> has not required type, or if <num> is not in
|
|
||||||
-- the right range (1,NbEntities),
|
|
||||||
|
|
||||||
ListLabel (me) returns AsciiString from TCollection;
|
|
||||||
---Purpose : Returns the specific label for the list
|
|
||||||
-- then, following cases :
|
|
||||||
-- " From .. Until .." or "From .." or "Until .." or "Rank no .."
|
|
||||||
-- Warning : it is not possible to give a character constant to instantiate
|
|
||||||
-- a generic class, thus "List From Entity" is not adapted :
|
|
||||||
-- redefine Label if judged necessary
|
|
||||||
|
|
||||||
end SelectList;
|
|
@ -1,44 +0,0 @@
|
|||||||
// 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 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.
|
|
||||||
|
|
||||||
//#include <IFSelect_SelectList.ixx>
|
|
||||||
|
|
||||||
// .... Instanciation avec "Handle(Entity)" qui offre ces deux methodes :
|
|
||||||
// nb = ent->NbEntities() et ent_i = ent->InterfaceEntity(i)
|
|
||||||
|
|
||||||
|
|
||||||
IFSelect_SelectList::IFSelect_SelectList () { }
|
|
||||||
|
|
||||||
void IFSelect_SelectType::KeepInputEntity (Interface_EntityIterator& iter)
|
|
||||||
{ iter.SelectType(STANDARD_TYPE(Entity)); }
|
|
||||||
|
|
||||||
Standard_Integer IFSelect_SelectList::NbItems
|
|
||||||
(const Handle(Standard_Transient)& ent)
|
|
||||||
{
|
|
||||||
Handle(Entity) anent = Handle(Entity)::DownCast(ent);
|
|
||||||
if (anent.IsNull()) return 0;
|
|
||||||
return anent->NbEntities();
|
|
||||||
}
|
|
||||||
|
|
||||||
Handle(Standard_Transient) IFSelect_SelectList::ListedEntity
|
|
||||||
(const Standard_Integer num, const Handle(Standard_Transient)& ent)
|
|
||||||
{
|
|
||||||
Handle(Entity) anent = Handle(Entity)::DownCast(ent);
|
|
||||||
if (anent.IsNull()) Standard_OutOfRange::Raise
|
|
||||||
("IFSelect SelectType : ListedEntity");
|
|
||||||
return anent->InterfacebEntity(num);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TCollection_AsciiString IFSelect_SelectList::ListLabel () const
|
|
||||||
{ return TCollection_AsciiString(STANDARD_TYPE(Entity)->Name()); }
|
|
@ -22,14 +22,14 @@ class ElementResults from IGESAppli inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
GeneralNote from IGESDimen,
|
GeneralNote from IGESDimen,
|
||||||
FiniteElement from IGESAppli,
|
FiniteElement from IGESAppli,
|
||||||
HAsciiString from TCollection,
|
HAsciiString from TCollection,
|
||||||
HArray1OfFiniteElement from IGESAppli,
|
HArray1OfFiniteElement from IGESAppli,
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfReal from TColStd,
|
HArray1OfReal from TColStd,
|
||||||
HArray1OfHArray1OfInteger from IGESBasic,
|
HArray1OfHArray1OfInteger_Handle from IGESBasic,
|
||||||
HArray1OfHArray1OfReal from IGESBasic
|
HArray1OfHArray1OfReal_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -51,8 +51,8 @@ is
|
|||||||
nbLayers : HArray1OfInteger;
|
nbLayers : HArray1OfInteger;
|
||||||
allDataLayerFlags : HArray1OfInteger;
|
allDataLayerFlags : HArray1OfInteger;
|
||||||
allnbResDataLocs : HArray1OfInteger;
|
allnbResDataLocs : HArray1OfInteger;
|
||||||
allResDataLocs : HArray1OfHArray1OfInteger;
|
allResDataLocs : HArray1OfHArray1OfInteger_Handle;
|
||||||
allResults : HArray1OfHArray1OfReal)
|
allResults : HArray1OfHArray1OfReal_Handle)
|
||||||
---Purpose : This method is used to set the fields of the class
|
---Purpose : This method is used to set the fields of the class
|
||||||
-- ElementResults
|
-- ElementResults
|
||||||
-- - aNote : GeneralNote Entity describing analysis
|
-- - aNote : GeneralNote Entity describing analysis
|
||||||
@ -196,7 +196,7 @@ fields
|
|||||||
theNbLayers : HArray1OfInteger;
|
theNbLayers : HArray1OfInteger;
|
||||||
theDataLayerFlags : HArray1OfInteger;
|
theDataLayerFlags : HArray1OfInteger;
|
||||||
theNbResultDataLocs : HArray1OfInteger;
|
theNbResultDataLocs : HArray1OfInteger;
|
||||||
theResultDataLocs : HArray1OfHArray1OfInteger;
|
theResultDataLocs : HArray1OfHArray1OfInteger_Handle;
|
||||||
theResultData : HArray1OfHArray1OfReal;
|
theResultData : HArray1OfHArray1OfReal_Handle;
|
||||||
|
|
||||||
end ElementResults;
|
end ElementResults;
|
||||||
|
@ -23,15 +23,15 @@ class NodalDisplAndRot from IGESAppli inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
GeneralNote from IGESDimen,
|
GeneralNote from IGESDimen,
|
||||||
Node from IGESAppli,
|
Node from IGESAppli,
|
||||||
HArray1OfGeneralNote from IGESDimen,
|
HArray1OfGeneralNote from IGESDimen,
|
||||||
HArray1OfNode from IGESAppli,
|
HArray1OfNode from IGESAppli,
|
||||||
HArray1OfReal from TColStd,
|
HArray1OfReal from TColStd,
|
||||||
XYZ from gp,
|
XYZ from gp,
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfXYZ from TColgp,
|
HArray1OfXYZ from TColgp,
|
||||||
HArray1OfHArray1OfXYZ from IGESBasic
|
HArray1OfHArray1OfXYZ_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ is
|
|||||||
allNotes : HArray1OfGeneralNote;
|
allNotes : HArray1OfGeneralNote;
|
||||||
allIdentifiers : HArray1OfInteger;
|
allIdentifiers : HArray1OfInteger;
|
||||||
allNodes : HArray1OfNode;
|
allNodes : HArray1OfNode;
|
||||||
allRotParams : HArray1OfHArray1OfXYZ;
|
allRotParams : HArray1OfHArray1OfXYZ_Handle;
|
||||||
allTransParams : HArray1OfHArray1OfXYZ)
|
allTransParams : HArray1OfHArray1OfXYZ_Handle)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
---Purpose : This method is used to set the fields of the class
|
---Purpose : This method is used to set the fields of the class
|
||||||
-- NodalDisplAndRot
|
-- NodalDisplAndRot
|
||||||
@ -113,7 +113,7 @@ fields
|
|||||||
theNotes : HArray1OfGeneralNote;
|
theNotes : HArray1OfGeneralNote;
|
||||||
theNodeIdentifiers : HArray1OfInteger;
|
theNodeIdentifiers : HArray1OfInteger;
|
||||||
theNodes : HArray1OfNode;
|
theNodes : HArray1OfNode;
|
||||||
theTransParam : HArray1OfHArray1OfXYZ;
|
theTransParam : HArray1OfHArray1OfXYZ_Handle;
|
||||||
theRotParam : HArray1OfHArray1OfXYZ;
|
theRotParam : HArray1OfHArray1OfXYZ_Handle;
|
||||||
|
|
||||||
end NodalDisplAndRot;
|
end NodalDisplAndRot;
|
||||||
|
12
src/IGESBasic/FILES
Normal file
12
src/IGESBasic/FILES
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
IGESBasic_HArray1OfHArray1OfIGESEntity.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfIGESEntity.cxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfInteger.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfInteger.cxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfReal.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfReal.cxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfXYZ.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfXYZ.cxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfIGESEntity_Handle.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfInteger_Handle.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfReal_Handle.hxx
|
||||||
|
IGESBasic_HArray1OfHArray1OfXYZ_Handle.hxx
|
@ -160,26 +160,20 @@ is
|
|||||||
class Array1OfLineFontEntity instantiates
|
class Array1OfLineFontEntity instantiates
|
||||||
Array1 from TCollection (LineFontEntity from IGESData);
|
Array1 from TCollection (LineFontEntity from IGESData);
|
||||||
|
|
||||||
class HArray1OfHArray1OfInteger instantiates
|
-- Instantiation of template class Interface_JaggedArray
|
||||||
-- HArray1 from TCollection (HArray1OfInteger from TColStd,Array1OfHArray1OfInteger);
|
imported HArray1OfHArray1OfIGESEntity;
|
||||||
JaggedArray from Interface (HArray1OfInteger from TColStd);
|
imported HArray1OfHArray1OfInteger;
|
||||||
class HArray1OfHArray1OfReal instantiates
|
imported HArray1OfHArray1OfReal;
|
||||||
-- HArray1 from TCollection (HArray1OfReal from TColStd,Array1OfHArray1OfReal);
|
imported HArray1OfHArray1OfXYZ;
|
||||||
JaggedArray from Interface (HArray1OfReal from TColStd);
|
|
||||||
class HArray1OfHArray1OfXY instantiates
|
--Workaround to use in cdl classes handles of none-cdl classes
|
||||||
-- HArray1 from TCollection (HArray1OfXY from TColgp, Array1OfHArray1OfXY);
|
imported HArray1OfHArray1OfIGESEntity_Handle;
|
||||||
JaggedArray from Interface (HArray1OfXY from TColgp);
|
imported HArray1OfHArray1OfInteger_Handle;
|
||||||
class HArray1OfHArray1OfXYZ instantiates
|
imported HArray1OfHArray1OfReal_Handle;
|
||||||
-- HArray1 from TCollection (HArray1OfXYZ from TColgp, Array1OfHArray1OfXYZ);
|
imported HArray1OfHArray1OfXYZ_Handle;
|
||||||
JaggedArray from Interface (HArray1OfXYZ from TColgp);
|
|
||||||
|
|
||||||
class HArray2OfHArray1OfReal instantiates HArray2 from TCollection
|
class HArray2OfHArray1OfReal instantiates HArray2 from TCollection
|
||||||
(HArray1OfReal from TColStd,Array2OfHArray1OfReal);
|
(HArray1OfReal from TColStd,Array2OfHArray1OfReal);
|
||||||
|
|
||||||
class HArray1OfHArray1OfIGESEntity instantiates
|
|
||||||
-- HArray1 from TCollection (HArray1OfIGESEntity from IGESData,Array1OfHArray1OfIGESEntity);
|
|
||||||
JaggedArray from Interface (HArray1OfIGESEntity from IGESData);
|
|
||||||
|
|
||||||
class HArray1OfLineFontEntity instantiates HArray1 from TCollection
|
class HArray1OfLineFontEntity instantiates HArray1 from TCollection
|
||||||
(LineFontEntity from IGESData,Array1OfLineFontEntity);
|
(LineFontEntity from IGESData,Array1OfLineFontEntity);
|
||||||
|
|
||||||
|
@ -11,9 +11,11 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
//#include <IFSelect_FileModifier.ixx>
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfIGESEntity.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfIGESEntity, MMgt_TShared)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_HArray1OfHArray1OfIGESEntity, MMgt_TShared)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IFSelect_FileModifier::IFSelect_FileModifier ()
|
|
||||||
: IFSelect_GeneralModifier (Standard_False) { }
|
|
40
src/IGESBasic/IGESBasic_HArray1OfHArray1OfIGESEntity.hxx
Normal file
40
src/IGESBasic/IGESBasic_HArray1OfHArray1OfIGESEntity.hxx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1OfIGESEntity_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1OfIGESEntity_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Interface_JaggedArray.hxx>
|
||||||
|
#include <Handle_IGESData_HArray1OfIGESEntity.hxx>
|
||||||
|
|
||||||
|
class IGESData_HArray1OfIGESEntity;
|
||||||
|
|
||||||
|
class IGESBasic_HArray1OfHArray1OfIGESEntity : public Interface_JaggedArray <Handle(IGESData_HArray1OfIGESEntity)>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT IGESBasic_HArray1OfHArray1OfIGESEntity
|
||||||
|
(const Standard_Integer theLowerIndex,
|
||||||
|
const Standard_Integer theUpperIndex)
|
||||||
|
:Interface_JaggedArray<Handle(IGESData_HArray1OfIGESEntity)>(theLowerIndex, theUpperIndex)
|
||||||
|
{}
|
||||||
|
DEFINE_STANDARD_RTTI(IGESBasic_HArray1OfHArray1OfIGESEntity );
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfIGESEntity, MMgt_TShared)
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
// Workaround: Handles for none-cdl classes.
|
||||||
|
// Delete this file after transformation all classes to none-cdl ones.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1IGESEntity_Handle_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1IGESEntity_Handle_HeaderFile
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfIGESEntity.hxx>
|
||||||
|
|
||||||
|
typedef Handle(IGESBasic_HArray1OfHArray1OfIGESEntity) IGESBasic_HArray1OfHArray1OfIGESEntity_Handle;
|
||||||
|
|
||||||
|
#endif
|
22
src/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger.cxx
Normal file
22
src/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger.cxx
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfInteger.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfInteger, MMgt_TShared)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_HArray1OfHArray1OfInteger, MMgt_TShared)
|
||||||
|
|
40
src/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger.hxx
Normal file
40
src/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger.hxx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1OfInteger_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1OfInteger_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Interface_JaggedArray.hxx>
|
||||||
|
#include <Handle_TColStd_HArray1OfInteger.hxx>
|
||||||
|
|
||||||
|
class TColStd_HArray1OfInteger;
|
||||||
|
|
||||||
|
class IGESBasic_HArray1OfHArray1OfInteger : public Interface_JaggedArray <Handle(TColStd_HArray1OfInteger)>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT IGESBasic_HArray1OfHArray1OfInteger
|
||||||
|
(const Standard_Integer theLowerIndex,
|
||||||
|
const Standard_Integer theUpperIndex)
|
||||||
|
:Interface_JaggedArray<Handle(TColStd_HArray1OfInteger)>(theLowerIndex, theUpperIndex)
|
||||||
|
{}
|
||||||
|
DEFINE_STANDARD_RTTI(IGESBasic_HArray1OfHArray1OfInteger);
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfInteger, MMgt_TShared)
|
||||||
|
|
||||||
|
#endif
|
29
src/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger_Handle.hxx
Normal file
29
src/IGESBasic/IGESBasic_HArray1OfHArray1OfInteger_Handle.hxx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
// Workaround: Handles for none-cdl classes.
|
||||||
|
// Delete this file after transformation all classes to none-cdl ones.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1Integer_Handle_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1Integer_Handle_HeaderFile
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfInteger.hxx>
|
||||||
|
|
||||||
|
typedef Handle(IGESBasic_HArray1OfHArray1OfInteger) IGESBasic_HArray1OfHArray1OfInteger_Handle;
|
||||||
|
|
||||||
|
#endif
|
21
src/IGESBasic/IGESBasic_HArray1OfHArray1OfReal.cxx
Normal file
21
src/IGESBasic/IGESBasic_HArray1OfHArray1OfReal.cxx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfReal.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfReal, MMgt_TShared)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_HArray1OfHArray1OfReal, MMgt_TShared)
|
39
src/IGESBasic/IGESBasic_HArray1OfHArray1OfReal.hxx
Normal file
39
src/IGESBasic/IGESBasic_HArray1OfHArray1OfReal.hxx
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1OfReal_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1OfReal_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Interface_JaggedArray.hxx>
|
||||||
|
#include <Handle_TColStd_HArray1OfReal.hxx>
|
||||||
|
class TColStd_HArray1OfReal;
|
||||||
|
|
||||||
|
class IGESBasic_HArray1OfHArray1OfReal : public Interface_JaggedArray <Handle(TColStd_HArray1OfReal)>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT IGESBasic_HArray1OfHArray1OfReal
|
||||||
|
(const Standard_Integer theLowerIndex,
|
||||||
|
const Standard_Integer theUpperIndex)
|
||||||
|
:Interface_JaggedArray <Handle(TColStd_HArray1OfReal)>(theLowerIndex, theUpperIndex)
|
||||||
|
{}
|
||||||
|
DEFINE_STANDARD_RTTI(IGESBasic_HArray1OfHArray1OfReal);
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfReal, MMgt_TShared)
|
||||||
|
|
||||||
|
#endif
|
29
src/IGESBasic/IGESBasic_HArray1OfHArray1OfReal_Handle.hxx
Normal file
29
src/IGESBasic/IGESBasic_HArray1OfHArray1OfReal_Handle.hxx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
// Workaround: Handles for none-cdl classes.
|
||||||
|
// Delete this file after transformation all classes to none-cdl ones.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1Real_Handle_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1Real_Handle_HeaderFile
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfReal.hxx>
|
||||||
|
|
||||||
|
typedef Handle(IGESBasic_HArray1OfHArray1OfReal) IGESBasic_HArray1OfHArray1OfReal_Handle;
|
||||||
|
|
||||||
|
#endif
|
21
src/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ.cxx
Normal file
21
src/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ.cxx
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfXYZ.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfXYZ, MMgt_TShared)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESBasic_HArray1OfHArray1OfXYZ, MMgt_TShared)
|
40
src/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ.hxx
Normal file
40
src/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ.hxx
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1OfXYZ_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1OfXYZ_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Interface_JaggedArray.hxx>
|
||||||
|
#include <Handle_TColgp_HArray1OfXYZ.hxx>
|
||||||
|
|
||||||
|
class TColgp_HArray1OfXYZ;
|
||||||
|
|
||||||
|
class IGESBasic_HArray1OfHArray1OfXYZ : public Interface_JaggedArray <Handle(TColgp_HArray1OfXYZ)>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT IGESBasic_HArray1OfHArray1OfXYZ
|
||||||
|
(const Standard_Integer theLowerIndex,
|
||||||
|
const Standard_Integer theUpperIndex)
|
||||||
|
:Interface_JaggedArray <Handle(TColgp_HArray1OfXYZ)>(theLowerIndex, theUpperIndex)
|
||||||
|
{}
|
||||||
|
DEFINE_STANDARD_RTTI(IGESBasic_HArray1OfHArray1OfXYZ);
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESBasic_HArray1OfHArray1OfXYZ,MMgt_TShared)
|
||||||
|
|
||||||
|
#endif
|
29
src/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ_Handle.hxx
Normal file
29
src/IGESBasic/IGESBasic_HArray1OfHArray1OfXYZ_Handle.hxx
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
|
// Workaround: Handles for none-cdl classes.
|
||||||
|
// Delete this file after transformation all classes to none-cdl ones.
|
||||||
|
|
||||||
|
#ifndef _IGESBasic_HArray1OfHArray1XYZ_Handle_HeaderFile
|
||||||
|
#define _IGESBasic_HArray1OfHArray1XYZ_Handle_HeaderFile
|
||||||
|
|
||||||
|
#include <IGESBasic_HArray1OfHArray1OfXYZ.hxx>
|
||||||
|
|
||||||
|
typedef Handle(IGESBasic_HArray1OfHArray1OfXYZ) IGESBasic_HArray1OfHArray1OfXYZ_Handle;
|
||||||
|
|
||||||
|
#endif
|
4
src/IGESCAFControl/FILES
Normal file
4
src/IGESCAFControl/FILES
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
IGESCAFControl_Reader.hxx
|
||||||
|
IGESCAFControl_Reader.cxx
|
||||||
|
IGESCAFControl_Writer.hxx
|
||||||
|
IGESCAFControl_Writer.cxx
|
@ -32,10 +32,10 @@ uses
|
|||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
class Reader;
|
imported Reader;
|
||||||
---Purpose: Provides a tool for reading IGES file
|
---Purpose: Provides a tool for reading IGES file
|
||||||
|
|
||||||
class Writer;
|
imported Writer;
|
||||||
---Purpose: Provides a tool for writing IGES file
|
---Purpose: Provides a tool for writing IGES file
|
||||||
|
|
||||||
DecodeColor (col: Integer) returns Color from Quantity;
|
DecodeColor (col: Integer) returns Color from Quantity;
|
||||||
|
@ -1,107 +0,0 @@
|
|||||||
-- Created on: 2000-08-15
|
|
||||||
-- Created by: Andrey BETENEV
|
|
||||||
-- Copyright (c) 2000-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 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 Reader from IGESCAFControl inherits Reader from IGESControl
|
|
||||||
|
|
||||||
---Purpose: Provides a tool to read IGES file and put it into
|
|
||||||
-- DECAF document. Besides transfer of shapes (including
|
|
||||||
-- assemblies) provided by IGESControl, supports also
|
|
||||||
-- colors and part names
|
|
||||||
-- IGESCAFControl_Reader reader; Methods for translation of an IGES file:
|
|
||||||
-- reader.ReadFile("filename");
|
|
||||||
-- reader.Transfer(Document); or
|
|
||||||
-- reader.Perform("filename",doc);
|
|
||||||
-- Methods for managing reading attributes.
|
|
||||||
-- Colors
|
|
||||||
-- reader.SetColorMode(colormode);
|
|
||||||
-- Standard_Boolean colormode = reader.GetColorMode();
|
|
||||||
-- Layers
|
|
||||||
-- reader.SetLayerMode(layermode);
|
|
||||||
-- Standard_Boolean layermode = reader.GetLayerMode();
|
|
||||||
-- Names
|
|
||||||
-- reader.SetNameMode(namemode);
|
|
||||||
-- Standard_Boolean namemode = reader.GetNameMode();
|
|
||||||
|
|
||||||
uses
|
|
||||||
AsciiString from TCollection,
|
|
||||||
WorkSession from XSControl,
|
|
||||||
Document from TDocStd
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns Reader;
|
|
||||||
---Purpose: Creates a reader with an empty
|
|
||||||
-- IGES model and sets ColorMode, LayerMode and NameMode to Standard_True.
|
|
||||||
|
|
||||||
Create (WS : mutable WorkSession from XSControl;
|
|
||||||
scratch : Boolean = Standard_True) returns Reader;
|
|
||||||
---Purpose: Creates a reader tool and attaches it to an already existing Session
|
|
||||||
-- Clears the session if it was not yet set for IGES
|
|
||||||
|
|
||||||
Transfer (me: in out; doc: in out Document from TDocStd)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose: Translates currently loaded IGES file into the document
|
|
||||||
-- Returns True if succeeded, and False in case of fail
|
|
||||||
|
|
||||||
Perform (me: in out; filename: AsciiString from TCollection;
|
|
||||||
doc: in out Document from TDocStd) returns Boolean;
|
|
||||||
|
|
||||||
Perform (me: in out; filename: CString; doc: in out Document from TDocStd)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose: Translate IGES file given by filename into the document
|
|
||||||
-- Return True if succeeded, and False in case of fail
|
|
||||||
|
|
||||||
---Scope: protected methods
|
|
||||||
|
|
||||||
ReadColors (me; doc: in out Document from TDocStd)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Reads colors of IGES entities and sets
|
|
||||||
-- corresponding color assignments in the DECAF document
|
|
||||||
|
|
||||||
ReadNames (me; doc: in out Document from TDocStd)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Reads Names of IGES entities and sets
|
|
||||||
-- corresponding name to label with shape in the DECAF document
|
|
||||||
|
|
||||||
ReadLayers (me; doc: in out Document from TDocStd)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Reads layers of parts defined in the IGES model and
|
|
||||||
-- set reference between shape and layers in the DECAF document
|
|
||||||
|
|
||||||
--- Work with fileds for different mode of reading IGES file.
|
|
||||||
|
|
||||||
SetColorMode(me: in out; colormode: Boolean from Standard);
|
|
||||||
---Purpose: Set ColorMode for indicate read Colors or not.
|
|
||||||
|
|
||||||
GetColorMode(me) returns Boolean;
|
|
||||||
|
|
||||||
SetNameMode(me: in out; namemode: Boolean from Standard);
|
|
||||||
---Purpose: Set NameMode for indicate read Name or not.
|
|
||||||
|
|
||||||
GetNameMode(me) returns Boolean;
|
|
||||||
|
|
||||||
SetLayerMode(me: in out; layermode: Boolean from Standard);
|
|
||||||
---Purpose: Set LayerMode for indicate read Layers or not.
|
|
||||||
|
|
||||||
GetLayerMode(me) returns Boolean;
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
myColorMode: Boolean;
|
|
||||||
myNameMode: Boolean;
|
|
||||||
myLayerMode: Boolean;
|
|
||||||
|
|
||||||
end Reader;
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <TDF_Label.hxx>
|
#include <TDF_Label.hxx>
|
||||||
#include <IGESCAFControl_Reader.ixx>
|
#include <IGESCAFControl_Reader.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <XCAFDoc_ShapeTool.hxx>
|
#include <XCAFDoc_ShapeTool.hxx>
|
||||||
#include <XSControl_TransferReader.hxx>
|
#include <XSControl_TransferReader.hxx>
|
||||||
@ -37,9 +37,14 @@
|
|||||||
#include <TCollection_HAsciiString.hxx>
|
#include <TCollection_HAsciiString.hxx>
|
||||||
#include <XCAFDoc_ShapeMapTool.hxx>
|
#include <XCAFDoc_ShapeMapTool.hxx>
|
||||||
#include <IGESBasic_SubfigureDef.hxx>
|
#include <IGESBasic_SubfigureDef.hxx>
|
||||||
|
|
||||||
#include <TopoDS_Compound.hxx>
|
#include <TopoDS_Compound.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <TDocStd_Document.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IGESCAFControl_Reader
|
//function : IGESCAFControl_Reader
|
||||||
//purpose :
|
//purpose :
|
||||||
|
102
src/IGESCAFControl/IGESCAFControl_Reader.hxx
Normal file
102
src/IGESCAFControl/IGESCAFControl_Reader.hxx
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESCAFControl_Reader_HeaderFile
|
||||||
|
#define _IGESCAFControl_Reader_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <IGESControl_Reader.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <Handle_TDocStd_Document.hxx>
|
||||||
|
#include <Standard_CString.hxx>
|
||||||
|
|
||||||
|
class XSControl_WorkSession;
|
||||||
|
class TDocStd_Document;
|
||||||
|
class TCollection_AsciiString;
|
||||||
|
|
||||||
|
//! Provides a tool to read IGES file and put it into <br>
|
||||||
|
//! DECAF document. Besides transfer of shapes (including <br>
|
||||||
|
//! assemblies) provided by IGESControl, supports also <br>
|
||||||
|
//! colors and part names <br>
|
||||||
|
//! IGESCAFControl_Reader reader; Methods for translation of an IGES file: <br>
|
||||||
|
//! reader.ReadFile("filename"); <br>
|
||||||
|
//! reader.Transfer(Document); or <br>
|
||||||
|
//! reader.Perform("filename",doc); <br>
|
||||||
|
//! Methods for managing reading attributes. <br>
|
||||||
|
//! Colors <br>
|
||||||
|
//! reader.SetColorMode(colormode); <br>
|
||||||
|
//! Standard_Boolean colormode = reader.GetColorMode(); <br>
|
||||||
|
//! Layers <br>
|
||||||
|
//! reader.SetLayerMode(layermode); <br>
|
||||||
|
//! Standard_Boolean layermode = reader.GetLayerMode(); <br>
|
||||||
|
//! Names <br>
|
||||||
|
//! reader.SetNameMode(namemode); <br>
|
||||||
|
//! Standard_Boolean namemode = reader.GetNameMode(); <br>
|
||||||
|
class IGESCAFControl_Reader : public IGESControl_Reader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Creates a reader with an empty <br>
|
||||||
|
//! IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. <br>
|
||||||
|
Standard_EXPORT IGESCAFControl_Reader();
|
||||||
|
//! Creates a reader tool and attaches it to an already existing Session <br>
|
||||||
|
//! Clears the session if it was not yet set for IGES <br>
|
||||||
|
Standard_EXPORT IGESCAFControl_Reader(const Handle(XSControl_WorkSession)& WS,const Standard_Boolean scratch = Standard_True);
|
||||||
|
//! Translates currently loaded IGES file into the document <br>
|
||||||
|
//! Returns True if succeeded, and False in case of fail <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Transfer(Handle(TDocStd_Document)& doc) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean Perform(const TCollection_AsciiString& filename,Handle(TDocStd_Document)& doc) ;
|
||||||
|
//! Translate IGES file given by filename into the document <br>
|
||||||
|
//! Return True if succeeded, and False in case of fail <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Perform(const Standard_CString filename,Handle(TDocStd_Document)& doc) ;
|
||||||
|
//! Set ColorMode for indicate read Colors or not. <br>
|
||||||
|
Standard_EXPORT void SetColorMode(const Standard_Boolean colormode) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean GetColorMode() const;
|
||||||
|
//! Set NameMode for indicate read Name or not. <br>
|
||||||
|
Standard_EXPORT void SetNameMode(const Standard_Boolean namemode) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean GetNameMode() const;
|
||||||
|
//! Set LayerMode for indicate read Layers or not. <br>
|
||||||
|
Standard_EXPORT void SetLayerMode(const Standard_Boolean layermode) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean GetLayerMode() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
//! Reads colors of IGES entities and sets <br>
|
||||||
|
//! corresponding color assignments in the DECAF document <br>
|
||||||
|
Standard_EXPORT Standard_Boolean ReadColors(Handle(TDocStd_Document)& doc) const;
|
||||||
|
//! Reads Names of IGES entities and sets <br>
|
||||||
|
//! corresponding name to label with shape in the DECAF document <br>
|
||||||
|
Standard_EXPORT Standard_Boolean ReadNames(Handle(TDocStd_Document)& doc) const;
|
||||||
|
//! Reads layers of parts defined in the IGES model and <br>
|
||||||
|
//! set reference between shape and layers in the DECAF document <br>
|
||||||
|
Standard_EXPORT Standard_Boolean ReadLayers(Handle(TDocStd_Document)& doc) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Standard_Boolean myColorMode;
|
||||||
|
Standard_Boolean myNameMode;
|
||||||
|
Standard_Boolean myLayerMode;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
@ -1,125 +0,0 @@
|
|||||||
-- Created on: 2000-08-17
|
|
||||||
-- Created by: Andrey BETENEV
|
|
||||||
-- Copyright (c) 2000-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 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 Writer from IGESCAFControl inherits Writer from IGESControl
|
|
||||||
|
|
||||||
---Purpose: Provides a tool to write DECAF document to the
|
|
||||||
-- IGES file. Besides transfer of shapes (including
|
|
||||||
-- assemblies) provided by IGESControl, supports also
|
|
||||||
-- colors and part names
|
|
||||||
-- IGESCAFControl_Writer writer();
|
|
||||||
-- Methods for writing IGES file:
|
|
||||||
-- writer.Transfer (Document);
|
|
||||||
-- writer.Write("filename") or writer.Write(OStream) or
|
|
||||||
-- writer.Perform(Document,"filename");
|
|
||||||
-- Methods for managing the writing of attributes.
|
|
||||||
-- Colors
|
|
||||||
-- writer.SetColorMode(colormode);
|
|
||||||
-- Standard_Boolean colormode = writer.GetColorMode();
|
|
||||||
-- Layers
|
|
||||||
-- writer.SetLayerMode(layermode);
|
|
||||||
-- Standard_Boolean layermode = writer.GetLayerMode();
|
|
||||||
-- Names
|
|
||||||
-- writer.SetNameMode(namemode);
|
|
||||||
-- Standard_Boolean namemode = writer.GetNameMode();
|
|
||||||
|
|
||||||
uses
|
|
||||||
AsciiString from TCollection,
|
|
||||||
Shape from TopoDS,
|
|
||||||
MapOfShape from TopTools,
|
|
||||||
WorkSession from XSControl,
|
|
||||||
Document from TDocStd,
|
|
||||||
LabelSequence from TDF,
|
|
||||||
Style from XCAFPrs,
|
|
||||||
DataMapOfShapeStyle from XCAFPrs,
|
|
||||||
DataMapOfStyleTransient from XCAFPrs
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns Writer;
|
|
||||||
---Purpose: Creates a writer with an empty
|
|
||||||
-- IGES model and sets ColorMode, LayerMode and NameMode to Standard_True.
|
|
||||||
|
|
||||||
Create (WS : mutable WorkSession from XSControl;
|
|
||||||
scratch : Boolean = Standard_True) returns Writer;
|
|
||||||
---Purpose: Creates a reader tool and attaches it to an already existing Session
|
|
||||||
-- Clears the session if it was not yet set for IGES
|
|
||||||
|
|
||||||
Transfer (me : in out; doc : Document from TDocStd)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose: Transfers a document to a IGES model
|
|
||||||
-- Returns True if translation is OK
|
|
||||||
|
|
||||||
Perform (me : in out; doc : Document from TDocStd;
|
|
||||||
filename: AsciiString from TCollection)
|
|
||||||
returns Boolean;
|
|
||||||
|
|
||||||
Perform (me : in out; doc : Document from TDocStd; filename: CString)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose : Transfers a document and writes it to a IGES file
|
|
||||||
-- Returns True if translation is OK
|
|
||||||
|
|
||||||
---Scope: Internal methods
|
|
||||||
|
|
||||||
Transfer (me : in out; labels: LabelSequence from TDF)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Transfers labels to a IGES model
|
|
||||||
-- Returns True if translation is OK
|
|
||||||
|
|
||||||
WriteAttributes (me: in out; labels: LabelSequence from TDF)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Reads colors from DECAF document and assigns them
|
|
||||||
-- to corresponding IGES entities
|
|
||||||
|
|
||||||
MakeColors (me: in out; S: Shape from TopoDS; settings: DataMapOfShapeStyle from XCAFPrs;
|
|
||||||
colors: in out DataMapOfStyleTransient from XCAFPrs;
|
|
||||||
Map: in out MapOfShape from TopTools;
|
|
||||||
inherit: Style from XCAFPrs) is private;
|
|
||||||
---Purpose: Recursively iterates on subshapes and assigns colors
|
|
||||||
-- to faces and edges (if set)
|
|
||||||
|
|
||||||
WriteLayers (me: in out; labels: LabelSequence from TDF)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Reads layers from DECAF document and assigns them
|
|
||||||
-- to corresponding IGES entities
|
|
||||||
|
|
||||||
WriteNames (me: in out; labels: LabelSequence from TDF)
|
|
||||||
returns Boolean is protected;
|
|
||||||
---Purpose: Recursivile iterates on subshapes and assign names
|
|
||||||
-- to IGES entity
|
|
||||||
|
|
||||||
--- Work with fileds for different mode of writing IGES file.
|
|
||||||
|
|
||||||
SetColorMode(me: in out; colormode: Boolean from Standard);
|
|
||||||
---Purpose: Set ColorMode for indicate write Colors or not.
|
|
||||||
|
|
||||||
GetColorMode(me) returns Boolean;
|
|
||||||
|
|
||||||
SetNameMode(me: in out; namemode: Boolean from Standard);
|
|
||||||
---Purpose: Set NameMode for indicate write Name or not.
|
|
||||||
|
|
||||||
GetNameMode(me) returns Boolean;
|
|
||||||
|
|
||||||
SetLayerMode(me: in out; layermode: Boolean from Standard);
|
|
||||||
---Purpose: Set LayerMode for indicate write Layers or not.
|
|
||||||
|
|
||||||
GetLayerMode(me) returns Boolean;
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
myColorMode: Boolean;
|
|
||||||
myNameMode: Boolean;
|
|
||||||
myLayerMode: Boolean;
|
|
||||||
|
|
||||||
end Writer;
|
|
@ -13,7 +13,7 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <IGESCAFControl_Writer.ixx>
|
#include <IGESCAFControl_Writer.hxx>
|
||||||
#include <XCAFDoc_ShapeTool.hxx>
|
#include <XCAFDoc_ShapeTool.hxx>
|
||||||
#include <TDF_LabelSequence.hxx>
|
#include <TDF_LabelSequence.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
@ -43,6 +43,16 @@
|
|||||||
#include <IGESData_NameEntity.hxx>
|
#include <IGESData_NameEntity.hxx>
|
||||||
#include <TopTools_SequenceOfShape.hxx>
|
#include <TopTools_SequenceOfShape.hxx>
|
||||||
#include <TColStd_HSequenceOfExtendedString.hxx>
|
#include <TColStd_HSequenceOfExtendedString.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <TDocStd_Document.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
#include <TDF_LabelSequence.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <XCAFPrs_DataMapOfShapeStyle.hxx>
|
||||||
|
#include <XCAFPrs_DataMapOfStyleTransient.hxx>
|
||||||
|
#include <TopTools_MapOfShape.hxx>
|
||||||
|
#include <XCAFPrs_Style.hxx>
|
||||||
|
#include <IGESCAFControl_Writer.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IGESCAFControl_Writer
|
//function : IGESCAFControl_Writer
|
||||||
|
118
src/IGESCAFControl/IGESCAFControl_Writer.hxx
Normal file
118
src/IGESCAFControl/IGESCAFControl_Writer.hxx
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESCAFControl_Writer_HeaderFile
|
||||||
|
#define _IGESCAFControl_Writer_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <IGESControl_Writer.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <Handle_TDocStd_Document.hxx>
|
||||||
|
#include <Standard_CString.hxx>
|
||||||
|
|
||||||
|
class XSControl_WorkSession;
|
||||||
|
class TDocStd_Document;
|
||||||
|
class TCollection_AsciiString;
|
||||||
|
class TDF_LabelSequence;
|
||||||
|
class TopoDS_Shape;
|
||||||
|
class XCAFPrs_DataMapOfShapeStyle;
|
||||||
|
class XCAFPrs_DataMapOfStyleTransient;
|
||||||
|
class TopTools_MapOfShape;
|
||||||
|
class XCAFPrs_Style;
|
||||||
|
|
||||||
|
|
||||||
|
//! Provides a tool to write DECAF document to the <br>
|
||||||
|
//! IGES file. Besides transfer of shapes (including <br>
|
||||||
|
//! assemblies) provided by IGESControl, supports also <br>
|
||||||
|
//! colors and part names <br>
|
||||||
|
//! IGESCAFControl_Writer writer(); <br>
|
||||||
|
//! Methods for writing IGES file: <br>
|
||||||
|
//! writer.Transfer (Document); <br>
|
||||||
|
//! writer.Write("filename") or writer.Write(OStream) or <br>
|
||||||
|
//! writer.Perform(Document,"filename"); <br>
|
||||||
|
//! Methods for managing the writing of attributes. <br>
|
||||||
|
//! Colors <br>
|
||||||
|
//! writer.SetColorMode(colormode); <br>
|
||||||
|
//! Standard_Boolean colormode = writer.GetColorMode(); <br>
|
||||||
|
//! Layers <br>
|
||||||
|
//! writer.SetLayerMode(layermode); <br>
|
||||||
|
//! Standard_Boolean layermode = writer.GetLayerMode(); <br>
|
||||||
|
//! Names <br>
|
||||||
|
//! writer.SetNameMode(namemode); <br>
|
||||||
|
//! Standard_Boolean namemode = writer.GetNameMode(); <br>
|
||||||
|
class IGESCAFControl_Writer : public IGESControl_Writer {
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Creates a writer with an empty <br>
|
||||||
|
//! IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. <br>
|
||||||
|
Standard_EXPORT IGESCAFControl_Writer();
|
||||||
|
//! Creates a reader tool and attaches it to an already existing Session <br>
|
||||||
|
//! Clears the session if it was not yet set for IGES <br>
|
||||||
|
Standard_EXPORT IGESCAFControl_Writer(const Handle(XSControl_WorkSession)& WS,const Standard_Boolean scratch = Standard_True);
|
||||||
|
//! Transfers a document to a IGES model <br>
|
||||||
|
//! Returns True if translation is OK <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Transfer(const Handle(TDocStd_Document)& doc) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& doc,const TCollection_AsciiString& filename) ;
|
||||||
|
//! Transfers a document and writes it to a IGES file <br>
|
||||||
|
//! Returns True if translation is OK <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& doc,const Standard_CString filename) ;
|
||||||
|
//! Set ColorMode for indicate write Colors or not. <br>
|
||||||
|
Standard_EXPORT void SetColorMode(const Standard_Boolean colormode) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean GetColorMode() const;
|
||||||
|
//! Set NameMode for indicate write Name or not. <br>
|
||||||
|
Standard_EXPORT void SetNameMode(const Standard_Boolean namemode) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean GetNameMode() const;
|
||||||
|
//! Set LayerMode for indicate write Layers or not. <br>
|
||||||
|
Standard_EXPORT void SetLayerMode(const Standard_Boolean layermode) ;
|
||||||
|
|
||||||
|
Standard_EXPORT Standard_Boolean GetLayerMode() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
//! Transfers labels to a IGES model <br>
|
||||||
|
//! Returns True if translation is OK <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Transfer(const TDF_LabelSequence& labels) ;
|
||||||
|
//! Reads colors from DECAF document and assigns them <br>
|
||||||
|
//! to corresponding IGES entities <br>
|
||||||
|
Standard_EXPORT Standard_Boolean WriteAttributes(const TDF_LabelSequence& labels) ;
|
||||||
|
//! Reads layers from DECAF document and assigns them <br>
|
||||||
|
//! to corresponding IGES entities <br>
|
||||||
|
Standard_EXPORT Standard_Boolean WriteLayers(const TDF_LabelSequence& labels) ;
|
||||||
|
//! Recursivile iterates on subshapes and assign names <br>
|
||||||
|
//! to IGES entity <br>
|
||||||
|
Standard_EXPORT Standard_Boolean WriteNames(const TDF_LabelSequence& labels) ;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
//! Recursively iterates on subshapes and assigns colors <br>
|
||||||
|
//! to faces and edges (if set) <br>
|
||||||
|
Standard_EXPORT void MakeColors(const TopoDS_Shape& S,const XCAFPrs_DataMapOfShapeStyle& settings,XCAFPrs_DataMapOfStyleTransient& colors,TopTools_MapOfShape& Map,const XCAFPrs_Style& inherit) ;
|
||||||
|
|
||||||
|
Standard_Boolean myColorMode;
|
||||||
|
Standard_Boolean myNameMode;
|
||||||
|
Standard_Boolean myLayerMode;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
9
src/IGESControl/FILES
Normal file
9
src/IGESControl/FILES
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
IGESControl_ActorWrite.hxx
|
||||||
|
IGESControl_ActorWrite.cxx
|
||||||
|
IGESControl_Controller.hxx
|
||||||
|
IGESControl_Controller.cxx
|
||||||
|
IGESControl_Reader.hxx
|
||||||
|
IGESControl_Reader.lxx
|
||||||
|
IGESControl_Reader.cxx
|
||||||
|
IGESControl_Writer.hxx
|
||||||
|
IGESControl_Writer.cxx
|
@ -34,12 +34,13 @@ uses
|
|||||||
|
|
||||||
is
|
is
|
||||||
|
|
||||||
class Controller;
|
imported Controller;
|
||||||
class Writer;
|
imported Writer;
|
||||||
class Reader;
|
imported Reader;
|
||||||
class ActorWrite;
|
|
||||||
class IGESBoundary;
|
class IGESBoundary;
|
||||||
class AlgoContainer;
|
class AlgoContainer;
|
||||||
class ToolContainer;
|
class ToolContainer;
|
||||||
|
|
||||||
|
imported ActorWrite;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
@ -1,43 +0,0 @@
|
|||||||
-- Created on: 1998-09-07
|
|
||||||
-- 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 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 ActorWrite from IGESControl
|
|
||||||
inherits ActorOfFinderProcess from Transfer
|
|
||||||
|
|
||||||
---Purpose : Actor to write Shape to IGES
|
|
||||||
|
|
||||||
uses
|
|
||||||
|
|
||||||
Finder from Transfer,
|
|
||||||
FinderProcess from Transfer,
|
|
||||||
Binder from Transfer
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns ActorWrite;
|
|
||||||
|
|
||||||
Recognize (me : mutable; start : Finder from Transfer) returns Boolean
|
|
||||||
is redefined;
|
|
||||||
---Purpose : Recognizes a ShapeMapper
|
|
||||||
|
|
||||||
Transfer (me : mutable; start : Finder from Transfer;
|
|
||||||
FP : mutable FinderProcess) returns Binder is redefined;
|
|
||||||
---Purpose : Transfers Shape to IGES Entities
|
|
||||||
--
|
|
||||||
-- ModeTrans may be : 0 -> groups of Faces
|
|
||||||
-- or 1 -> BRep
|
|
||||||
|
|
||||||
end ActorWrite;
|
|
@ -11,11 +11,11 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <IGESControl_ActorWrite.ixx>
|
|
||||||
#include <TransferBRep_ShapeMapper.hxx>
|
#include <TransferBRep_ShapeMapper.hxx>
|
||||||
#include <Interface_Macros.hxx>
|
#include <Interface_Macros.hxx>
|
||||||
#include <IGESData_IGESModel.hxx>
|
#include <IGESData_IGESModel.hxx>
|
||||||
|
#include <IGESControl_ActorWrite.hxx>
|
||||||
#include <BRepToIGES_BREntity.hxx>
|
#include <BRepToIGES_BREntity.hxx>
|
||||||
#include <BRepToIGESBRep_Entity.hxx>
|
#include <BRepToIGESBRep_Entity.hxx>
|
||||||
|
|
||||||
@ -28,6 +28,19 @@
|
|||||||
#include <XSAlgo_AlgoContainer.hxx>
|
#include <XSAlgo_AlgoContainer.hxx>
|
||||||
#include <Interface_Static.hxx>
|
#include <Interface_Static.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_TYPE(IGESControl_ActorWrite)
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||||
|
STANDARD_TYPE(Transfer_ActorOfFinderProcess),
|
||||||
|
STANDARD_TYPE(MMgt_TShared),
|
||||||
|
STANDARD_TYPE(Standard_Transient),
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||||
|
IMPLEMENT_STANDARD_TYPE_END(IGESControl_ActorWrite)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_DOWNCAST(IGESControl_ActorWrite,Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTI(IGESControl_ActorWrite)
|
||||||
|
|
||||||
IGESControl_ActorWrite::IGESControl_ActorWrite () { ModeTrans() = 0; }
|
IGESControl_ActorWrite::IGESControl_ActorWrite () { ModeTrans() = 0; }
|
||||||
|
|
||||||
Standard_Boolean IGESControl_ActorWrite::Recognize
|
Standard_Boolean IGESControl_ActorWrite::Recognize
|
||||||
@ -53,7 +66,7 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transfer
|
|||||||
|
|
||||||
DeclareAndCast(IGESData_IGESModel,modl,FP->Model());
|
DeclareAndCast(IGESData_IGESModel,modl,FP->Model());
|
||||||
if (modl.IsNull()) return NullResult();
|
if (modl.IsNull()) return NullResult();
|
||||||
if (themodetrans < 0 || themodetrans > 1) return NullResult();
|
if (myModeTrans < 0 || myModeTrans > 1) return NullResult();
|
||||||
Handle(Standard_Transient) ent;
|
Handle(Standard_Transient) ent;
|
||||||
|
|
||||||
DeclareAndCast(TransferBRep_ShapeMapper,shmap,start);
|
DeclareAndCast(TransferBRep_ShapeMapper,shmap,start);
|
||||||
@ -73,8 +86,8 @@ Handle(Transfer_Binder) IGESControl_ActorWrite::Transfer
|
|||||||
BRepToIGES_BREntity BR0; BR0.SetModel(modl); BR0.SetTransferProcess(FP);
|
BRepToIGES_BREntity BR0; BR0.SetModel(modl); BR0.SetTransferProcess(FP);
|
||||||
BRepToIGESBRep_Entity BR1; BR1.SetModel(modl); BR1.SetTransferProcess(FP);
|
BRepToIGESBRep_Entity BR1; BR1.SetModel(modl); BR1.SetTransferProcess(FP);
|
||||||
|
|
||||||
if (themodetrans == 0) ent = BR0.TransferShape(shape);
|
if (myModeTrans == 0) ent = BR0.TransferShape(shape);
|
||||||
if (themodetrans == 1) ent = BR1.TransferShape(shape);
|
if (myModeTrans == 1) ent = BR1.TransferShape(shape);
|
||||||
// modified by NIZHNY-EAP Tue Aug 29 11:37:18 2000 ___BEGIN___
|
// modified by NIZHNY-EAP Tue Aug 29 11:37:18 2000 ___BEGIN___
|
||||||
XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info);
|
XSAlgo::AlgoContainer()->MergeTransferInfo(FP, info);
|
||||||
// modified by NIZHNY-EAP Tue Aug 29 11:37:25 2000 ___END___
|
// modified by NIZHNY-EAP Tue Aug 29 11:37:25 2000 ___END___
|
||||||
|
60
src/IGESControl/IGESControl_ActorWrite.hxx
Normal file
60
src/IGESControl/IGESControl_ActorWrite.hxx
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESControl_ActorWrite_HeaderFile
|
||||||
|
#define _IGESControl_ActorWrite_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Transfer_ActorOfFinderProcess.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Handle_Transfer_Finder.hxx>
|
||||||
|
#include <Handle_Transfer_Binder.hxx>
|
||||||
|
#include <Transfer_FinderProcess.hxx>
|
||||||
|
|
||||||
|
class Transfer_Finder;
|
||||||
|
class Transfer_Binder;
|
||||||
|
class Transfer_FinderProcess;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle(Standard_Type);
|
||||||
|
class Handle(Transfer_ActorOfFinderProcess);
|
||||||
|
class IGESControl_ActorWrite;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESControl_ActorWrite,Transfer_ActorOfFinderProcess)
|
||||||
|
|
||||||
|
//! Actor to write Shape to IGES <br>
|
||||||
|
class IGESControl_ActorWrite : public Transfer_ActorOfFinderProcess {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Standard_EXPORT IGESControl_ActorWrite();
|
||||||
|
|
||||||
|
//! Recognizes a ShapeMapper <br>
|
||||||
|
Standard_EXPORT virtual Standard_Boolean Recognize(const Handle(Transfer_Finder)& start);
|
||||||
|
|
||||||
|
//! Transfers Shape to IGES Entities <br>
|
||||||
|
//! <br>
|
||||||
|
//! ModeTrans may be : 0 -> groups of Faces <br>
|
||||||
|
//! or 1 -> BRep <br>
|
||||||
|
Standard_EXPORT virtual Handle_Transfer_Binder Transfer(const Handle(Transfer_Finder)& start,
|
||||||
|
const Handle(Transfer_FinderProcess)& FP);
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESControl_ActorWrite)
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
@ -1,75 +0,0 @@
|
|||||||
-- Created on: 1995-03-15
|
|
||||||
-- 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 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 Controller from IGESControl inherits Controller from XSControl
|
|
||||||
|
|
||||||
---Purpose : Controller for IGES-5.1
|
|
||||||
|
|
||||||
uses
|
|
||||||
|
|
||||||
CString,
|
|
||||||
Protocol from Interface,
|
|
||||||
InterfaceModel from Interface,
|
|
||||||
WorkLibrary from IFSelect,
|
|
||||||
ReturnStatus from IFSelect,
|
|
||||||
ActorOfTransientProcess from Transfer,
|
|
||||||
FinderProcess from Transfer,
|
|
||||||
ActorOfFinderProcess from Transfer,
|
|
||||||
WorkSession from XSControl,
|
|
||||||
Shape from TopoDS
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create (modefnes : Boolean = Standard_False)
|
|
||||||
returns mutable Controller from IGESControl;
|
|
||||||
---Purpose : Initializes the use of IGES Norm (the first time) and returns
|
|
||||||
-- a Controller for IGES-5.1
|
|
||||||
-- If <modefnes> is True, sets it to internal FNES format
|
|
||||||
|
|
||||||
NewModel (me) returns mutable InterfaceModel from Interface;
|
|
||||||
---Purpose : Creates a new empty Model ready to receive data of the Norm.
|
|
||||||
-- It is taken from IGES Template Model
|
|
||||||
|
|
||||||
ActorRead (me; model : InterfaceModel)
|
|
||||||
returns mutable ActorOfTransientProcess from Transfer;
|
|
||||||
---Purpose : Returns the Actor for Read attached to the pair (norm,appli)
|
|
||||||
-- It is an Actor from IGESToBRep, adapted from an IGESModel :
|
|
||||||
-- Unit, tolerances
|
|
||||||
|
|
||||||
TransferWriteShape (me; shape : Shape from TopoDS;
|
|
||||||
FP : mutable FinderProcess from Transfer;
|
|
||||||
model : mutable InterfaceModel from Interface;
|
|
||||||
modetrans : Integer = 0)
|
|
||||||
returns ReturnStatus is redefined;
|
|
||||||
---Purpose : Takes one Shape and transfers it to the InterfaceModel
|
|
||||||
-- (already created by NewModel for instance)
|
|
||||||
-- <modetrans> is to be interpreted by each kind of XstepAdaptor
|
|
||||||
-- Returns a status : 0 OK 1 No result 2 Fail -1 bad modeshape
|
|
||||||
-- -2 bad model (requires an IGESModel)
|
|
||||||
-- modeshape : 0 groupe of face (version < 5.1)
|
|
||||||
-- 1 BREP-version 5.1 of IGES
|
|
||||||
|
|
||||||
Init (myclass) returns Boolean;
|
|
||||||
---Purpose : Standard Initialisation. It creates a Controller for IGES and
|
|
||||||
-- records it to various names, available to select it later
|
|
||||||
-- Returns True when done, False if could not be done
|
|
||||||
-- Also, it creates and records an Adaptor for FNES
|
|
||||||
Customise (me: mutable; WS : in out WorkSession from XSControl) is redefined;
|
|
||||||
fields
|
|
||||||
|
|
||||||
themode : Boolean;
|
|
||||||
|
|
||||||
end Controller;
|
|
@ -14,7 +14,7 @@
|
|||||||
//#58 rln 28.12.98 changing default values for Global Section
|
//#58 rln 28.12.98 changing default values for Global Section
|
||||||
//sln 14.01.2002 OCC51 : verifying whether entry model of method ActorRead is IGESDatat_IGESModel
|
//sln 14.01.2002 OCC51 : verifying whether entry model of method ActorRead is IGESDatat_IGESModel
|
||||||
|
|
||||||
#include <IGESControl_Controller.ixx>
|
#include <IGESControl_Controller.hxx>
|
||||||
#include <IGESSelect_WorkLibrary.hxx>
|
#include <IGESSelect_WorkLibrary.hxx>
|
||||||
#include <IGESToBRep_Actor.hxx>
|
#include <IGESToBRep_Actor.hxx>
|
||||||
#include <IGESData_IGESModel.hxx>
|
#include <IGESData_IGESModel.hxx>
|
||||||
@ -43,6 +43,8 @@
|
|||||||
#include <IGESSelect_IGESName.hxx>
|
#include <IGESSelect_IGESName.hxx>
|
||||||
#include <IFSelect_SignType.hxx>
|
#include <IFSelect_SignType.hxx>
|
||||||
#include <IFSelect_SignMultiple.hxx>
|
#include <IFSelect_SignMultiple.hxx>
|
||||||
|
#include <IFSelect_SelectModelEntities.hxx>
|
||||||
|
#include <IFSelect_SelectModelRoots.hxx>
|
||||||
#include <IGESSelect_CounterOfLevelNumber.hxx>
|
#include <IGESSelect_CounterOfLevelNumber.hxx>
|
||||||
#include <IFSelect_SignCounter.hxx>
|
#include <IFSelect_SignCounter.hxx>
|
||||||
#include <IGESSelect_EditHeader.hxx>
|
#include <IGESSelect_EditHeader.hxx>
|
||||||
@ -59,10 +61,28 @@
|
|||||||
#include <XSAlgo.hxx>
|
#include <XSAlgo.hxx>
|
||||||
#include <Interface_Macros.hxx>
|
#include <Interface_Macros.hxx>
|
||||||
#include <IGESToBRep.hxx>
|
#include <IGESToBRep.hxx>
|
||||||
#include <IFSelect_SelectModelEntities.hxx>
|
|
||||||
#include <IFSelect_SelectModelEntities.hxx>
|
|
||||||
#include <IFSelect_SelectModelRoots.hxx>
|
|
||||||
#include <XSControl_SelectForTransfer.hxx>
|
#include <XSControl_SelectForTransfer.hxx>
|
||||||
|
#include <Interface_InterfaceModel.hxx>
|
||||||
|
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <Transfer_FinderProcess.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <IGESControl_Controller.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_TYPE(IGESControl_Controller)
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||||
|
STANDARD_TYPE(XSControl_Controller),
|
||||||
|
STANDARD_TYPE(MMgt_TShared),
|
||||||
|
STANDARD_TYPE(Standard_Transient),
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||||
|
IMPLEMENT_STANDARD_TYPE_END(IGESControl_Controller)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_DOWNCAST(IGESControl_Controller,Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTI(IGESControl_Controller)
|
||||||
|
|
||||||
//szv#4:S4163:12Mar99 never referenced
|
//szv#4:S4163:12Mar99 never referenced
|
||||||
//static const Standard_CString thelong = "IGES";
|
//static const Standard_CString thelong = "IGES";
|
||||||
@ -77,7 +97,7 @@ IGESControl_Controller::IGESControl_Controller (const Standard_Boolean mod)
|
|||||||
//JR/Hp
|
//JR/Hp
|
||||||
: XSControl_Controller ((Standard_CString ) (mod ? "FNES" : "IGES") , (Standard_CString ) (mod ? "fnes" : "iges") ) ,
|
: XSControl_Controller ((Standard_CString ) (mod ? "FNES" : "IGES") , (Standard_CString ) (mod ? "fnes" : "iges") ) ,
|
||||||
// : XSControl_Controller ( (mod ? "FNES" : "iges") , (mod ? "fnes" : "iges") ) ,
|
// : XSControl_Controller ( (mod ? "FNES" : "iges") , (mod ? "fnes" : "iges") ) ,
|
||||||
themode (mod)
|
myMode (mod)
|
||||||
{
|
{
|
||||||
static Standard_Boolean init = Standard_False;
|
static Standard_Boolean init = Standard_False;
|
||||||
if (!init) {
|
if (!init) {
|
||||||
@ -144,7 +164,7 @@ IGESControl_Controller::IGESControl_Controller (const Standard_Boolean mod)
|
|||||||
TraceStatic ("write.iges.unit",6);
|
TraceStatic ("write.iges.unit",6);
|
||||||
TraceStatic ("write.iges.brep.mode",6);
|
TraceStatic ("write.iges.brep.mode",6);
|
||||||
|
|
||||||
theAdaptorLibrary = new IGESSelect_WorkLibrary(themode);
|
theAdaptorLibrary = new IGESSelect_WorkLibrary(myMode);
|
||||||
theAdaptorProtocol = IGESSelect_WorkLibrary::DefineProtocol();
|
theAdaptorProtocol = IGESSelect_WorkLibrary::DefineProtocol();
|
||||||
|
|
||||||
Handle(IGESToBRep_Actor) anactiges = new IGESToBRep_Actor;
|
Handle(IGESToBRep_Actor) anactiges = new IGESToBRep_Actor;
|
||||||
|
84
src/IGESControl/IGESControl_Controller.hxx
Normal file
84
src/IGESControl/IGESControl_Controller.hxx
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESControl_Controller_HeaderFile
|
||||||
|
#define _IGESControl_Controller_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <XSControl_Controller.hxx>
|
||||||
|
#include <Handle_Interface_InterfaceModel.hxx>
|
||||||
|
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||||
|
#include <IFSelect_ReturnStatus.hxx>
|
||||||
|
#include <Transfer_FinderProcess.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
|
||||||
|
class Interface_InterfaceModel;
|
||||||
|
class Transfer_ActorOfTransientProcess;
|
||||||
|
class TopoDS_Shape;
|
||||||
|
class Transfer_FinderProcess;
|
||||||
|
class XSControl_WorkSession;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle(Standard_Type);
|
||||||
|
class Handle(XSControl_Controller);
|
||||||
|
class IGESControl_Controller;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESControl_Controller,XSControl_Controller)
|
||||||
|
|
||||||
|
//! Controller for IGES-5.1 <br>
|
||||||
|
class IGESControl_Controller : public XSControl_Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Initializes the use of IGES Norm (the first time) and returns <br>
|
||||||
|
//! a Controller for IGES-5.1 <br>
|
||||||
|
//! If <modefnes> is True, sets it to internal FNES format <br>
|
||||||
|
Standard_EXPORT IGESControl_Controller(const Standard_Boolean modefnes = Standard_False);
|
||||||
|
//! Creates a new empty Model ready to receive data of the Norm. <br>
|
||||||
|
//! It is taken from IGES Template Model <br>
|
||||||
|
Standard_EXPORT Handle_Interface_InterfaceModel NewModel() const;
|
||||||
|
//! Returns the Actor for Read attached to the pair (norm,appli) <br>
|
||||||
|
//! It is an Actor from IGESToBRep, adapted from an IGESModel : <br>
|
||||||
|
//! Unit, tolerances <br>
|
||||||
|
Standard_EXPORT Handle_Transfer_ActorOfTransientProcess ActorRead(const Handle(Interface_InterfaceModel)& model) const;
|
||||||
|
//! Takes one Shape and transfers it to the InterfaceModel <br>
|
||||||
|
//! (already created by NewModel for instance) <br>
|
||||||
|
//! <modetrans> is to be interpreted by each kind of XstepAdaptor <br>
|
||||||
|
//! Returns a status : 0 OK 1 No result 2 Fail -1 bad modeshape <br>
|
||||||
|
//! -2 bad model (requires an IGESModel) <br>
|
||||||
|
//! modeshape : 0 groupe of face (version < 5.1) <br>
|
||||||
|
//! 1 BREP-version 5.1 of IGES <br>
|
||||||
|
Standard_EXPORT virtual IFSelect_ReturnStatus TransferWriteShape(const TopoDS_Shape& shape,const Handle(Transfer_FinderProcess)& FP,const Handle(Interface_InterfaceModel)& model,const Standard_Integer modetrans = 0) const;
|
||||||
|
//! Standard Initialisation. It creates a Controller for IGES and <br>
|
||||||
|
//! records it to various names, available to select it later <br>
|
||||||
|
//! Returns True when done, False if could not be done <br>
|
||||||
|
//! Also, it creates and records an Adaptor for FNES <br>
|
||||||
|
Standard_EXPORT static Standard_Boolean Init() ;
|
||||||
|
|
||||||
|
Standard_EXPORT virtual void Customise(Handle(XSControl_WorkSession)& WS) ;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESControl_Controller)
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Standard_Boolean myMode;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
@ -1,101 +0,0 @@
|
|||||||
-- Created on: 1996-09-06
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 Reader from IGESControl inherits Reader from XSControl
|
|
||||||
|
|
||||||
---Purpose :
|
|
||||||
-- Reads IGES files, checks them and translates their contents into Open CASCADE models.
|
|
||||||
-- The IGES data can be that of a whole model or that of a specific list of entities in the model.
|
|
||||||
-- As in XSControl_Reader, you specify the list using a selection.
|
|
||||||
-- For translation of iges files it is possible to use the following sequence:
|
|
||||||
-- To change parameters of translation
|
|
||||||
-- class Interface_Static should be used before the beginning of translation
|
|
||||||
-- (see IGES Parameters and General Parameters)
|
|
||||||
-- Creation of reader
|
|
||||||
-- IGESControl_Reader reader;
|
|
||||||
-- To load a file in a model use method:
|
|
||||||
-- reader.ReadFile("filename.igs")
|
|
||||||
-- To check a loading file use method Check:
|
|
||||||
-- reader.Check(failsonly); where failsonly is equal to Standard_True or
|
|
||||||
-- Standard_False;
|
|
||||||
-- To print the results of load:
|
|
||||||
-- reader.PrintCheckLoad(failsonly,mode) where mode is equal to the value of
|
|
||||||
-- enumeration IFSelect_PrintCount
|
|
||||||
-- To transfer entities from a model the following methods can be used:
|
|
||||||
-- for the whole model
|
|
||||||
-- reader.TransferRoots(onlyvisible); where onlyvisible is equal to
|
|
||||||
-- Standard_True or Standard_False;
|
|
||||||
-- To transfer a list of entities:
|
|
||||||
-- reader.TransferList(list);
|
|
||||||
-- To transfer one entity
|
|
||||||
-- reader.TransferEntity(ent) or reader.Transfer(num);
|
|
||||||
-- To obtain a result the following method can be used:
|
|
||||||
-- reader.IsDone()
|
|
||||||
-- reader.NbShapes() and reader.Shape(num); or reader.OneShape();
|
|
||||||
-- To print the results of transfer use method:
|
|
||||||
-- reader.PrintTransferInfo(failwarn,mode); where printfail is equal to the
|
|
||||||
-- value of enumeration IFSelect_PrintFail, mode see above.
|
|
||||||
-- Gets correspondence between an IGES entity and a result shape obtained therefrom.
|
|
||||||
-- reader.TransientProcess();
|
|
||||||
-- TopoDS_Shape shape =
|
|
||||||
-- TransferBRep::ShapeResult(reader.TransientProcess(),ent);
|
|
||||||
|
|
||||||
|
|
||||||
uses CString, HSequenceOfTransient from TColStd,
|
|
||||||
IGESModel from IGESData,
|
|
||||||
PrintFail from IFSelect,
|
|
||||||
PrintCount from IFSelect,
|
|
||||||
ReturnStatus from IFSelect,
|
|
||||||
WorkSession from XSControl
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns Reader from IGESControl;
|
|
||||||
---Purpose : Creates a Reader from scratch
|
|
||||||
|
|
||||||
Create (WS : mutable WorkSession from XSControl;
|
|
||||||
scratch : Boolean = Standard_True)
|
|
||||||
returns Reader from IGESControl;
|
|
||||||
---Purpose : Creates a Reader from an already existing Session
|
|
||||||
|
|
||||||
SetReadVisible(me: in out; ReadRoot: Boolean from Standard);
|
|
||||||
---Purpose : Set the transion of ALL Roots (if theReadOnlyVisible is False)
|
|
||||||
-- or of Visible Roots (if theReadOnlyVisible is True)
|
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
GetReadVisible(me) returns Boolean;
|
|
||||||
---C++: inline
|
|
||||||
|
|
||||||
IGESModel (me) returns IGESModel;
|
|
||||||
---Purpose : Returns the model as a IGESModel.
|
|
||||||
-- It can then be consulted (header, product)
|
|
||||||
|
|
||||||
|
|
||||||
NbRootsForTransfer (me : in out) returns Integer is redefined;
|
|
||||||
---Purpose : Determines the list of root entities from Model which are candidate for
|
|
||||||
-- a transfer to a Shape (type of entities is PRODUCT)
|
|
||||||
-- <theReadOnlyVisible> is taken into account to define roots
|
|
||||||
|
|
||||||
PrintTransferInfo(me; failwarn: PrintFail from IFSelect; mode: PrintCount from IFSelect);
|
|
||||||
---Purpose : Prints Statistics and check list for Transfer
|
|
||||||
|
|
||||||
-- other methods are inherited from Reader in IGESToBRep
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
theReadOnlyVisible : Boolean from Standard;
|
|
||||||
|
|
||||||
end Reader;
|
|
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
//gka 06.01.99 S3767
|
//gka 06.01.99 S3767
|
||||||
//abv 10.04.99 S4136: eliminate using BRepAPI::Precision()
|
//abv 10.04.99 S4136: eliminate using BRepAPI::Precision()
|
||||||
#include <IGESControl_Reader.ixx>
|
#include <IGESControl_Reader.hxx>
|
||||||
#include <IGESControl_Controller.hxx>
|
#include <IGESControl_Controller.hxx>
|
||||||
#include <XSControl_Controller.hxx>
|
#include <XSControl_Controller.hxx>
|
||||||
#include <XSControl_TransferReader.hxx>
|
#include <XSControl_TransferReader.hxx>
|
||||||
@ -52,6 +52,8 @@
|
|||||||
#include <TransferBRep.hxx>
|
#include <TransferBRep.hxx>
|
||||||
#include <ShapeFix_ShapeTolerance.hxx>
|
#include <ShapeFix_ShapeTolerance.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <IGESData_IGESModel.hxx>
|
||||||
// add of stdio.h for NT compilation
|
// add of stdio.h for NT compilation
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
@ -66,7 +68,7 @@ IGESControl_Reader::IGESControl_Reader ()
|
|||||||
IGESControl_Controller::Init();
|
IGESControl_Controller::Init();
|
||||||
SetWS (new XSControl_WorkSession);
|
SetWS (new XSControl_WorkSession);
|
||||||
SetNorm("IGES");
|
SetNorm("IGES");
|
||||||
theReadOnlyVisible = Standard_False;
|
myReadOnlyVisible = Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -81,7 +83,7 @@ IGESControl_Reader::IGESControl_Reader
|
|||||||
IGESControl_Controller::Init();
|
IGESControl_Controller::Init();
|
||||||
SetWS (WS,scratch);
|
SetWS (WS,scratch);
|
||||||
SetNorm ("IGES");
|
SetNorm ("IGES");
|
||||||
theReadOnlyVisible = Standard_False;
|
myReadOnlyVisible = Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -118,14 +120,14 @@ Standard_Integer IGESControl_Reader::NbRootsForTransfer()
|
|||||||
Interface_ShareFlags SH (model,protocol);
|
Interface_ShareFlags SH (model,protocol);
|
||||||
|
|
||||||
// sln 11.06.2002 OCC448
|
// sln 11.06.2002 OCC448
|
||||||
Interface_Static::SetIVal("read.iges.onlyvisible",theReadOnlyVisible);
|
Interface_Static::SetIVal("read.iges.onlyvisible",myReadOnlyVisible);
|
||||||
|
|
||||||
Standard_Integer nb = model->NbEntities();
|
Standard_Integer nb = model->NbEntities();
|
||||||
for (Standard_Integer i = 1; i <= nb; i ++) {
|
for (Standard_Integer i = 1; i <= nb; i ++) {
|
||||||
Handle(IGESData_IGESEntity) ent = model->Entity(i);
|
Handle(IGESData_IGESEntity) ent = model->Entity(i);
|
||||||
if ( SH.IsShared(ent) || ! actor->Recognize (ent) ) continue;
|
if ( SH.IsShared(ent) || ! actor->Recognize (ent) ) continue;
|
||||||
// on ajoute un traitement pour ne prendre que les entites visibles
|
// on ajoute un traitement pour ne prendre que les entites visibles
|
||||||
if ( ! theReadOnlyVisible || ent->BlankStatus() == 0 ) {
|
if ( ! myReadOnlyVisible || ent->BlankStatus() == 0 ) {
|
||||||
theroots.Append(ent);
|
theroots.Append(ent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
111
src/IGESControl/IGESControl_Reader.hxx
Normal file
111
src/IGESControl/IGESControl_Reader.hxx
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESControl_Reader_HeaderFile
|
||||||
|
#define _IGESControl_Reader_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <XSControl_Reader.hxx>
|
||||||
|
#include <XSControl_WorkSession.hxx>
|
||||||
|
#include <Handle_IGESData_IGESModel.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <IFSelect_PrintFail.hxx>
|
||||||
|
#include <IFSelect_PrintCount.hxx>
|
||||||
|
|
||||||
|
class XSControl_WorkSession;
|
||||||
|
class IGESData_IGESModel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//! Reads IGES files, checks them and translates their contents into Open CASCADE models. <br>
|
||||||
|
//! The IGES data can be that of a whole model or that of a specific list of entities in the model. <br>
|
||||||
|
//! As in XSControl_Reader, you specify the list using a selection. <br>
|
||||||
|
//! For translation of iges files it is possible to use the following sequence: <br>
|
||||||
|
//! To change parameters of translation <br>
|
||||||
|
//! class Interface_Static should be used before the beginning of translation <br>
|
||||||
|
//! (see IGES Parameters and General Parameters) <br>
|
||||||
|
//! Creation of reader <br>
|
||||||
|
//! IGESControl_Reader reader; <br>
|
||||||
|
//! To load a file in a model use method: <br>
|
||||||
|
//! reader.ReadFile("filename.igs") <br>
|
||||||
|
//! To check a loading file use method Check: <br>
|
||||||
|
//! reader.Check(failsonly); where failsonly is equal to Standard_True or <br>
|
||||||
|
//! Standard_False; <br>
|
||||||
|
//! To print the results of load: <br>
|
||||||
|
//! reader.PrintCheckLoad(failsonly,mode) where mode is equal to the value of <br>
|
||||||
|
//! enumeration IFSelect_PrintCount <br>
|
||||||
|
//! To transfer entities from a model the following methods can be used: <br>
|
||||||
|
//! for the whole model <br>
|
||||||
|
//! reader.TransferRoots(onlyvisible); where onlyvisible is equal to <br>
|
||||||
|
//! Standard_True or Standard_False; <br>
|
||||||
|
//! To transfer a list of entities: <br>
|
||||||
|
//! reader.TransferList(list); <br>
|
||||||
|
//! To transfer one entity <br>
|
||||||
|
//! reader.TransferEntity(ent) or reader.Transfer(num); <br>
|
||||||
|
//! To obtain a result the following method can be used: <br>
|
||||||
|
//! reader.IsDone() <br>
|
||||||
|
//! reader.NbShapes() and reader.Shape(num); or reader.OneShape(); <br>
|
||||||
|
//! To print the results of transfer use method: <br>
|
||||||
|
//! reader.PrintTransferInfo(failwarn,mode); where printfail is equal to the <br>
|
||||||
|
//! value of enumeration IFSelect_PrintFail, mode see above. <br>
|
||||||
|
//! Gets correspondence between an IGES entity and a result shape obtained therefrom. <br>
|
||||||
|
//! reader.TransientProcess(); <br>
|
||||||
|
//! TopoDS_Shape shape = <br>
|
||||||
|
//! TransferBRep::ShapeResult(reader.TransientProcess(),ent); <br>
|
||||||
|
class IGESControl_Reader : public XSControl_Reader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Creates a Reader from scratch <br>
|
||||||
|
Standard_EXPORT IGESControl_Reader();
|
||||||
|
|
||||||
|
//! Creates a Reader from an already existing Session <br>
|
||||||
|
Standard_EXPORT IGESControl_Reader(const Handle(XSControl_WorkSession)& WS,
|
||||||
|
const Standard_Boolean scratch = Standard_True);
|
||||||
|
|
||||||
|
//! Set the transion of ALL Roots (if myReadOnlyVisible is False) <br>
|
||||||
|
//! or of Visible Roots (if myReadOnlyVisible is True) <br>
|
||||||
|
void SetReadVisible(const Standard_Boolean ReadRoot) ;
|
||||||
|
|
||||||
|
Standard_Boolean GetReadVisible() const;
|
||||||
|
|
||||||
|
//! Returns the model as a IGESModel. <br>
|
||||||
|
//! It can then be consulted (header, product) <br>
|
||||||
|
Standard_EXPORT Handle_IGESData_IGESModel IGESModel() const;
|
||||||
|
|
||||||
|
//! Determines the list of root entities from Model which are candidate for <br>
|
||||||
|
//! a transfer to a Shape (type of entities is PRODUCT) <br>
|
||||||
|
//! <myReadOnlyVisible> is taken into account to define roots <br>
|
||||||
|
Standard_EXPORT virtual Standard_Integer NbRootsForTransfer();
|
||||||
|
|
||||||
|
//! Prints Statistics and check list for Transfer <br>
|
||||||
|
Standard_EXPORT void PrintTransferInfo (const IFSelect_PrintFail failwarn,
|
||||||
|
const IFSelect_PrintCount mode) const;
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
Standard_Boolean myReadOnlyVisible;
|
||||||
|
};
|
||||||
|
|
||||||
|
#include <IGESControl_Reader.lxx>
|
||||||
|
|
||||||
|
#endif
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
inline void IGESControl_Reader::SetReadVisible (const Standard_Boolean ReadRoot)
|
inline void IGESControl_Reader::SetReadVisible (const Standard_Boolean ReadRoot)
|
||||||
{
|
{
|
||||||
theReadOnlyVisible = ReadRoot;
|
myReadOnlyVisible = ReadRoot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -29,5 +29,5 @@ inline void IGESControl_Reader::SetReadVisible (const Standard_Boolean ReadRoot)
|
|||||||
|
|
||||||
inline Standard_Boolean IGESControl_Reader::GetReadVisible ()const
|
inline Standard_Boolean IGESControl_Reader::GetReadVisible ()const
|
||||||
{
|
{
|
||||||
return theReadOnlyVisible;
|
return myReadOnlyVisible;
|
||||||
}
|
}
|
||||||
|
@ -1,107 +0,0 @@
|
|||||||
-- Created on: 1996-01-30
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 Writer from IGESControl
|
|
||||||
|
|
||||||
---Purpose : This class creates and writes
|
|
||||||
-- IGES files from CAS.CADE models. An IGES file can be written to
|
|
||||||
-- an existing IGES file or to a new one.
|
|
||||||
-- The translation can be performed in one or several
|
|
||||||
-- operations. Each translation operation
|
|
||||||
-- outputs a distinct root entity in the IGES file.
|
|
||||||
-- To write an IGES file it is possible to use the following sequence:
|
|
||||||
-- To modify the IGES file header or to change translation
|
|
||||||
-- parameters it is necessary to use class Interface_Static (see
|
|
||||||
-- IGESParameters and GeneralParameters).
|
|
||||||
|
|
||||||
uses CString, OStream, Transient, Shape from TopoDS,
|
|
||||||
FinderProcess, BasicEditor from IGESData, IGESModel, IGESEntity
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns Writer;
|
|
||||||
---Purpose : Creates a writer object with the
|
|
||||||
-- default unit (millimeters) and write mode (Face).
|
|
||||||
-- IGESControl_Writer (const Standard_CString unit,
|
|
||||||
-- const Standard_Integer modecr = 0);
|
|
||||||
|
|
||||||
Create (unit : CString; modecr : Integer = 0) returns Writer;
|
|
||||||
---Purpose : Creates a writer with given
|
|
||||||
-- values for units and for write mode.
|
|
||||||
-- unit may be any unit that is accepted by the IGES standard.
|
|
||||||
-- By default, it is the millimeter.
|
|
||||||
-- modecr defines the write mode and may be:
|
|
||||||
-- - 0: Faces (default)
|
|
||||||
-- - 1: BRep.
|
|
||||||
|
|
||||||
Create (model : mutable IGESModel; modecr : Integer = 0) returns Writer;
|
|
||||||
---Purpose : Creates a writer object with the
|
|
||||||
-- prepared IGES model model in write mode.
|
|
||||||
-- modecr defines the write mode and may be:
|
|
||||||
-- - 0: Faces (default)
|
|
||||||
-- - 1: BRep.
|
|
||||||
|
|
||||||
Model (me) returns IGESModel;
|
|
||||||
---Purpose : Returns the IGES model to be written in output.
|
|
||||||
|
|
||||||
TransferProcess (me) returns mutable FinderProcess;
|
|
||||||
SetTransferProcess (me : in out; TP : mutable FinderProcess);
|
|
||||||
---Purpose : Returns/Sets the TransferProcess : it contains final results
|
|
||||||
-- and if some, check messages
|
|
||||||
|
|
||||||
AddShape (me : in out; sh : Shape) returns Boolean;
|
|
||||||
---Purpose : Translates a Shape to IGES Entities and adds them to the model
|
|
||||||
-- Returns True if done, False if Shape not suitable for IGES or null
|
|
||||||
|
|
||||||
AddGeom (me : in out; geom : Transient) returns Boolean;
|
|
||||||
---Purpose : Translates a Geometry (Surface or Curve) to IGES Entities and
|
|
||||||
-- adds them to the model
|
|
||||||
-- Returns True if done, False if geom is neither a Surface or
|
|
||||||
-- a Curve suitable for IGES or is null
|
|
||||||
|
|
||||||
AddEntity (me : in out; ent : IGESEntity) returns Boolean;
|
|
||||||
---Purpose : Adds an IGES entity (and the ones it references) to the model
|
|
||||||
|
|
||||||
ComputeModel (me : in out);
|
|
||||||
---Purpose : Computes the entities found in
|
|
||||||
-- the model, which is ready to be written.
|
|
||||||
-- This contrasts with the default computation of headers only.
|
|
||||||
|
|
||||||
Write (me : in out; S : in out OStream; fnes : Boolean = Standard_False)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose : Computes then writes the model to an OStream
|
|
||||||
-- Returns True when done, false in case of error
|
|
||||||
|
|
||||||
Write (me : in out; file : CString; fnes : Boolean = Standard_False)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose : Prepares and writes an IGES model
|
|
||||||
-- either to an OStream, S or to a file name,CString.
|
|
||||||
-- Returns True if the operation was performed correctly and
|
|
||||||
-- False if an error occurred (for instance,
|
|
||||||
-- if the processor could not create the file).
|
|
||||||
|
|
||||||
PrintStatsTransfer (me; what : Integer; mode : Integer = 0);
|
|
||||||
---Purpose : Prints Statistics about Transfer
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
theTP : FinderProcess;
|
|
||||||
themod : IGESModel;
|
|
||||||
thedit : BasicEditor from IGESData;
|
|
||||||
thecr : Integer; -- mode ecr
|
|
||||||
thest : Boolean; -- computed ?
|
|
||||||
|
|
||||||
end Writer;
|
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <Standard_Stream.hxx>
|
#include <Standard_Stream.hxx>
|
||||||
|
|
||||||
#include <IGESControl_Writer.ixx>
|
#include <IGESControl_Writer.hxx>
|
||||||
#include <IGESControl_Controller.hxx>
|
#include <IGESControl_Controller.hxx>
|
||||||
#include <IGESSelect_WorkLibrary.hxx>
|
#include <IGESSelect_WorkLibrary.hxx>
|
||||||
#include <BRepToIGES_BREntity.hxx>
|
#include <BRepToIGES_BREntity.hxx>
|
||||||
@ -43,6 +43,11 @@
|
|||||||
#include <XSAlgo_AlgoContainer.hxx>
|
#include <XSAlgo_AlgoContainer.hxx>
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <Message_ProgressIndicator.hxx>
|
#include <Message_ProgressIndicator.hxx>
|
||||||
|
#include <Transfer_FinderProcess.hxx>
|
||||||
|
#include <IGESData_IGESModel.hxx>
|
||||||
|
#include <TopoDS_Shape.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <IGESData_IGESEntity.hxx>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
IGESControl_Writer::IGESControl_Writer ()
|
IGESControl_Writer::IGESControl_Writer ()
|
||||||
|
116
src/IGESControl/IGESControl_Writer.hxx
Normal file
116
src/IGESControl/IGESControl_Writer.hxx
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESControl_Writer_HeaderFile
|
||||||
|
#define _IGESControl_Writer_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Transfer_FinderProcess.hxx>
|
||||||
|
#include <Handle_IGESData_IGESModel.hxx>
|
||||||
|
#include <IGESData_BasicEditor.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Standard_CString.hxx>
|
||||||
|
#include <Handle_Standard_Transient.hxx>
|
||||||
|
#include <Handle_IGESData_IGESEntity.hxx>
|
||||||
|
#include <Standard_OStream.hxx>
|
||||||
|
|
||||||
|
class Transfer_FinderProcess;
|
||||||
|
class IGESData_IGESModel;
|
||||||
|
class TopoDS_Shape;
|
||||||
|
class Standard_Transient;
|
||||||
|
class IGESData_IGESEntity;
|
||||||
|
|
||||||
|
|
||||||
|
//! This class creates and writes <br>
|
||||||
|
//! IGES files from CAS.CADE models. An IGES file can be written to <br>
|
||||||
|
//! an existing IGES file or to a new one. <br>
|
||||||
|
//! The translation can be performed in one or several <br>
|
||||||
|
//! operations. Each translation operation <br>
|
||||||
|
//! outputs a distinct root entity in the IGES file. <br>
|
||||||
|
//! To write an IGES file it is possible to use the following sequence: <br>
|
||||||
|
//! To modify the IGES file header or to change translation <br>
|
||||||
|
//! parameters it is necessary to use class Interface_Static (see <br>
|
||||||
|
//! IGESParameters and GeneralParameters). <br>
|
||||||
|
class IGESControl_Writer {
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Creates a writer object with the <br>
|
||||||
|
//! default unit (millimeters) and write mode (Face). <br>
|
||||||
|
//! IGESControl_Writer (const Standard_CString unit, <br>
|
||||||
|
//! const Standard_Integer modecr = 0); <br>
|
||||||
|
Standard_EXPORT IGESControl_Writer();
|
||||||
|
//! Creates a writer with given <br>
|
||||||
|
//! values for units and for write mode. <br>
|
||||||
|
//! unit may be any unit that is accepted by the IGES standard. <br>
|
||||||
|
//! By default, it is the millimeter. <br>
|
||||||
|
//! modecr defines the write mode and may be: <br>
|
||||||
|
//! - 0: Faces (default) <br>
|
||||||
|
//! - 1: BRep. <br>
|
||||||
|
Standard_EXPORT IGESControl_Writer(const Standard_CString unit,const Standard_Integer modecr = 0);
|
||||||
|
//! Creates a writer object with the <br>
|
||||||
|
//! prepared IGES model model in write mode. <br>
|
||||||
|
//! modecr defines the write mode and may be: <br>
|
||||||
|
//! - 0: Faces (default) <br>
|
||||||
|
//! - 1: BRep. <br>
|
||||||
|
Standard_EXPORT IGESControl_Writer(const Handle(IGESData_IGESModel)& model,const Standard_Integer modecr = 0);
|
||||||
|
//! Returns the IGES model to be written in output. <br>
|
||||||
|
Standard_EXPORT Handle_IGESData_IGESModel Model() const;
|
||||||
|
|
||||||
|
Standard_EXPORT Handle_Transfer_FinderProcess TransferProcess() const;
|
||||||
|
//! Returns/Sets the TransferProcess : it contains final results <br>
|
||||||
|
//! and if some, check messages <br>
|
||||||
|
Standard_EXPORT void SetTransferProcess(const Handle(Transfer_FinderProcess)& TP) ;
|
||||||
|
//! Translates a Shape to IGES Entities and adds them to the model <br>
|
||||||
|
//! Returns True if done, False if Shape not suitable for IGES or null <br>
|
||||||
|
Standard_EXPORT Standard_Boolean AddShape(const TopoDS_Shape& sh) ;
|
||||||
|
//! Translates a Geometry (Surface or Curve) to IGES Entities and <br>
|
||||||
|
//! adds them to the model <br>
|
||||||
|
//! Returns True if done, False if geom is neither a Surface or <br>
|
||||||
|
//! a Curve suitable for IGES or is null <br>
|
||||||
|
Standard_EXPORT Standard_Boolean AddGeom(const Handle(Standard_Transient)& geom) ;
|
||||||
|
//! Adds an IGES entity (and the ones it references) to the model <br>
|
||||||
|
Standard_EXPORT Standard_Boolean AddEntity(const Handle(IGESData_IGESEntity)& ent) ;
|
||||||
|
//! Computes the entities found in <br>
|
||||||
|
//! the model, which is ready to be written. <br>
|
||||||
|
//! This contrasts with the default computation of headers only. <br>
|
||||||
|
Standard_EXPORT void ComputeModel() ;
|
||||||
|
//! Computes then writes the model to an OStream <br>
|
||||||
|
//! Returns True when done, false in case of error <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Write(Standard_OStream& S,const Standard_Boolean fnes = Standard_False) ;
|
||||||
|
//! Prepares and writes an IGES model <br>
|
||||||
|
//! either to an OStream, S or to a file name,CString. <br>
|
||||||
|
//! Returns True if the operation was performed correctly and <br>
|
||||||
|
//! False if an error occurred (for instance, <br>
|
||||||
|
//! if the processor could not create the file). <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Write(const Standard_CString file,const Standard_Boolean fnes = Standard_False) ;
|
||||||
|
//! Prints Statistics about Transfer <br>
|
||||||
|
Standard_EXPORT void PrintStatsTransfer(const Standard_Integer what,const Standard_Integer mode = 0) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Handle_Transfer_FinderProcess theTP;
|
||||||
|
Handle_IGESData_IGESModel themod;
|
||||||
|
IGESData_BasicEditor thedit;
|
||||||
|
Standard_Integer thecr;
|
||||||
|
Standard_Boolean thest;
|
||||||
|
};
|
||||||
|
#endif
|
@ -1 +1,9 @@
|
|||||||
IGESData_Dump.hxx
|
IGESData_Dump.hxx
|
||||||
|
IGESData_FileRecognizer.hxx
|
||||||
|
IGESData_FileRecognizer.cxx
|
||||||
|
IGESData_IGESReaderTool.hxx
|
||||||
|
IGESData_IGESReaderTool.cxx
|
||||||
|
IGESData_SpecificLib.hxx
|
||||||
|
IGESData_SpecificLib.cxx
|
||||||
|
IGESData_WriterLib.hxx
|
||||||
|
IGESData_WriterLib.cxx
|
@ -50,14 +50,13 @@ is
|
|||||||
class DirChecker;
|
class DirChecker;
|
||||||
|
|
||||||
class IGESReaderData;
|
class IGESReaderData;
|
||||||
class IGESReaderTool;
|
imported IGESReaderTool;
|
||||||
class ParamReader;
|
class ParamReader;
|
||||||
class ParamCursor;
|
class ParamCursor;
|
||||||
class DirPart; -- litteral description
|
class DirPart; -- litteral description
|
||||||
class IGESType;
|
class IGESType;
|
||||||
|
|
||||||
deferred class FileRecognizer instantiates
|
imported FileRecognizer;
|
||||||
Recognizer from Interface (IGESType, IGESEntity);
|
|
||||||
|
|
||||||
class IGESWriter;
|
class IGESWriter;
|
||||||
class IGESDumper;
|
class IGESDumper;
|
||||||
@ -72,10 +71,8 @@ is
|
|||||||
class DefaultSpecific;
|
class DefaultSpecific;
|
||||||
class FileProtocol;
|
class FileProtocol;
|
||||||
|
|
||||||
class WriterLib instantiates Library from LibCtl
|
imported WriterLib;
|
||||||
(IGESEntity, ReadWriteModule, Protocol from IGESData);
|
imported SpecificLib;
|
||||||
class SpecificLib instantiates Library from LibCtl
|
|
||||||
(IGESEntity, SpecificModule, Protocol from IGESData);
|
|
||||||
|
|
||||||
-- -- Enumerations -- --
|
-- -- Enumerations -- --
|
||||||
enumeration Status is
|
enumeration Status is
|
||||||
|
@ -9,5 +9,10 @@
|
|||||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
// 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.
|
// 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.
|
#include <IGESData_FileRecognizer.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESData_FileRecognizer, Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESData_FileRecognizer, Standard_Transient)
|
||||||
|
|
||||||
|
|
46
src/IGESData/IGESData_FileRecognizer.hxx
Normal file
46
src/IGESData/IGESData_FileRecognizer.hxx
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESData_FileRecognizer_HeaderFile
|
||||||
|
#define _IGESData_FileRecognizer_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <Interface_Recognizer.hxx>
|
||||||
|
#include <Handle_IGESData_IGESEntity.hxx>
|
||||||
|
|
||||||
|
class IGESData_IGESEntity;
|
||||||
|
class Standard_NoSuchObject;
|
||||||
|
class IGESData_IGESType;
|
||||||
|
class Standard_Transient;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESData_FileRecognizer, Standard_Transient)
|
||||||
|
|
||||||
|
class IGESData_FileRecognizer : public Interface_Recognizer <IGESData_IGESType, Handle(IGESData_IGESEntity), Handle(IGESData_FileRecognizer)>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT IGESData_FileRecognizer():
|
||||||
|
Interface_Recognizer <IGESData_IGESType, Handle(IGESData_IGESEntity),Handle(IGESData_FileRecognizer)>()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESData_FileRecognizer);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -1,109 +0,0 @@
|
|||||||
-- Created on: 1992-04-06
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 IGESReaderTool from IGESData inherits FileReaderTool
|
|
||||||
|
|
||||||
---Purpose : specific FileReaderTool for IGES
|
|
||||||
-- Parameters are accessed through specific objects, ParamReaders
|
|
||||||
|
|
||||||
uses Integer, Boolean, Transient,
|
|
||||||
Check, InterfaceModel, GeneralLib, ReaderLib, ParamList,
|
|
||||||
IGESReaderData, Protocol from IGESData, FileRecognizer,
|
|
||||||
IGESType, IGESEntity, DirPart, ReadStage, ParamReader
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create (reader : mutable IGESReaderData; protocol : Protocol from IGESData)
|
|
||||||
returns IGESReaderTool;
|
|
||||||
---Purpose : creates IGESReaderTool to work with an IGESReaderData and an
|
|
||||||
-- IGES Protocol.
|
|
||||||
-- Actually, no Lib is used
|
|
||||||
|
|
||||||
-- -- General -- --
|
|
||||||
|
|
||||||
Prepare (me : in out; reco : mutable FileRecognizer);
|
|
||||||
---Purpose : binds empty entities to records, works with the Protocol
|
|
||||||
-- (from IGESData) stored and later used
|
|
||||||
-- RQ : Actually, sets DNum into IGES Entities
|
|
||||||
-- Also loads the list of parameters for ParamReader
|
|
||||||
|
|
||||||
Recognize (me : in out; num : Integer;
|
|
||||||
ach : in out Check; ent : out mutable Transient)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose : recognizes records by asking Protocol (on data of DirType)
|
|
||||||
|
|
||||||
-- Loading the IGESModel --
|
|
||||||
|
|
||||||
BeginRead (me : in out; amodel : mutable InterfaceModel);
|
|
||||||
---Purpose : fills model's header, that is, its GlobalSection
|
|
||||||
|
|
||||||
AnalyseRecord (me : in out;
|
|
||||||
num : Integer; anent : mutable Transient; acheck : in out Check)
|
|
||||||
returns Boolean;
|
|
||||||
---Purpose : fills an entity, given record no; works by calling ReadDirPart
|
|
||||||
-- then ReadParams (with help of a ParamReader), then if required
|
|
||||||
-- ReadProps and ReadAssocs, from IGESEntity
|
|
||||||
-- Returns True if no fail has been recorded
|
|
||||||
|
|
||||||
EndRead (me : in out; amodel : mutable InterfaceModel) is redefined;
|
|
||||||
---Purpose : after reading entities, true line weights can be computed
|
|
||||||
|
|
||||||
-- For each IGESEntity --
|
|
||||||
|
|
||||||
ReadDir (me; ent : mutable IGESEntity; IR : IGESReaderData;
|
|
||||||
DP : DirPart; ach : in out Check);
|
|
||||||
---Purpose : Reads directory part componants from file; DP is the litteral
|
|
||||||
-- directory part, IR detains entities referenced by DP
|
|
||||||
|
|
||||||
ReadOwnParams (me; ent : mutable IGESEntity;
|
|
||||||
IR : IGESReaderData; PR : in out ParamReader);
|
|
||||||
---Purpose : Performs Reading of own Parameters for each IGESEntity
|
|
||||||
-- Works with the ReaderLib loaded with ReadWriteModules for IGES
|
|
||||||
-- In case of failure, tries UndefinedEntity from IGES
|
|
||||||
|
|
||||||
ReadProps (me; ent : mutable IGESEntity; IR : IGESReaderData;
|
|
||||||
PR : in out ParamReader);
|
|
||||||
---Purpose : Reads Property List, if there is (if not, does nothing)
|
|
||||||
-- criterium is : current parameter of PR remains inside params
|
|
||||||
-- list, and Stage is "Own"
|
|
||||||
-- Current parameter must be a positive integer, which value
|
|
||||||
-- gives the length of the list; else, a Fail is produced (into
|
|
||||||
-- Check of PR) and reading process is stopped
|
|
||||||
|
|
||||||
ReadAssocs (me; ent : mutable IGESEntity; IR : IGESReaderData;
|
|
||||||
PR : in out ParamReader);
|
|
||||||
---Purpose : Reads Associativity List, if there is (if not, does nothing)
|
|
||||||
-- criterium is : current parameter of PR remains inside params
|
|
||||||
-- list, and Stage is "Own"
|
|
||||||
-- Same conditions as above; in addition, no parameter must be
|
|
||||||
-- let after the list once read
|
|
||||||
-- Note that "Associated" entities are not declared "Shared"
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
thelist : ParamList; -- (loaded once, allows optimization)
|
|
||||||
thereco : FileRecognizer;
|
|
||||||
theglib : GeneralLib;
|
|
||||||
therlib : ReaderLib;
|
|
||||||
thecnum : Integer; -- current entity number for recognize
|
|
||||||
thectyp : IGESType; -- its IGESType (for purpose of optimization)
|
|
||||||
thestep : ReadStage; -- to continue an interrupted party
|
|
||||||
thechk : Check; -- check on header (kept by IGESModel)
|
|
||||||
thegradweight : Integer;
|
|
||||||
themaxweight : Real;
|
|
||||||
thedefweight : Real;
|
|
||||||
|
|
||||||
end IGESReaderTool;
|
|
@ -11,7 +11,16 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <IGESData_IGESReaderTool.ixx>
|
#include <Interface_ParamList.hxx>
|
||||||
|
#include <Interface_Check.hxx>
|
||||||
|
#include <IGESData_IGESReaderData.hxx>
|
||||||
|
#include <IGESData_Protocol.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <Interface_InterfaceModel.hxx>
|
||||||
|
#include <IGESData_IGESEntity.hxx>
|
||||||
|
#include <IGESData_DirPart.hxx>
|
||||||
|
#include <IGESData_ParamReader.hxx>
|
||||||
|
#include <IGESData_IGESReaderTool.hxx>
|
||||||
#include <IGESData_IGESReaderData.hxx>
|
#include <IGESData_IGESReaderData.hxx>
|
||||||
#include <IGESData_ParamCursor.hxx>
|
#include <IGESData_ParamCursor.hxx>
|
||||||
#include <Interface_ReaderModule.hxx>
|
#include <Interface_ReaderModule.hxx>
|
||||||
|
139
src/IGESData/IGESData_IGESReaderTool.hxx
Normal file
139
src/IGESData/IGESData_IGESReaderTool.hxx
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESData_IGESReaderTool_HeaderFile
|
||||||
|
#define _IGESData_IGESReaderTool_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Handle_Interface_ParamList.hxx>
|
||||||
|
#include <IGESData_FileRecognizer.hxx>
|
||||||
|
#include <Interface_GeneralLib.hxx>
|
||||||
|
#include <Interface_ReaderLib.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <IGESData_IGESType.hxx>
|
||||||
|
#include <IGESData_ReadStage.hxx>
|
||||||
|
#include <Handle_Interface_Check.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#include <Interface_FileReaderTool.hxx>
|
||||||
|
#include <Handle_IGESData_IGESReaderData.hxx>
|
||||||
|
#include <Handle_IGESData_Protocol.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Handle_Standard_Transient.hxx>
|
||||||
|
#include <Handle_Interface_InterfaceModel.hxx>
|
||||||
|
#include <Handle_IGESData_IGESEntity.hxx>
|
||||||
|
|
||||||
|
class Interface_ParamList;
|
||||||
|
class IGESData_FileRecognizer;
|
||||||
|
class Interface_Check;
|
||||||
|
class IGESData_IGESReaderData;
|
||||||
|
class IGESData_Protocol;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Interface_InterfaceModel;
|
||||||
|
class IGESData_IGESEntity;
|
||||||
|
class IGESData_DirPart;
|
||||||
|
class IGESData_ParamReader;
|
||||||
|
|
||||||
|
|
||||||
|
//! specific FileReaderTool for IGES <br>
|
||||||
|
//! Parameters are accessed through specific objects, ParamReaders <br>
|
||||||
|
class IGESData_IGESReaderTool : public Interface_FileReaderTool
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! creates IGESReaderTool to work with an IGESReaderData and an <br>
|
||||||
|
//! IGES Protocol. <br>
|
||||||
|
//! Actually, no Lib is used <br>
|
||||||
|
Standard_EXPORT IGESData_IGESReaderTool(const Handle(IGESData_IGESReaderData)& reader,const Handle(IGESData_Protocol)& protocol);
|
||||||
|
//! binds empty entities to records, works with the Protocol <br>
|
||||||
|
//! (from IGESData) stored and later used <br>
|
||||||
|
//! RQ : Actually, sets DNum into IGES Entities <br>
|
||||||
|
//! Also loads the list of parameters for ParamReader <br>
|
||||||
|
Standard_EXPORT void Prepare(const Handle(IGESData_FileRecognizer)& reco) ;
|
||||||
|
//! recognizes records by asking Protocol (on data of DirType) <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Recognize(const Standard_Integer num,Handle(Interface_Check)& ach,Handle(Standard_Transient)& ent) ;
|
||||||
|
//! fills model's header, that is, its GlobalSection <br>
|
||||||
|
Standard_EXPORT void BeginRead(const Handle(Interface_InterfaceModel)& amodel) ;
|
||||||
|
//! fills an entity, given record no; works by calling ReadDirPart <br>
|
||||||
|
//! then ReadParams (with help of a ParamReader), then if required <br>
|
||||||
|
//! ReadProps and ReadAssocs, from IGESEntity <br>
|
||||||
|
//! Returns True if no fail has been recorded <br>
|
||||||
|
Standard_EXPORT Standard_Boolean AnalyseRecord(const Standard_Integer num,const Handle(Standard_Transient)& anent,Handle(Interface_Check)& acheck) ;
|
||||||
|
//! after reading entities, true line weights can be computed <br>
|
||||||
|
Standard_EXPORT virtual void EndRead(const Handle(Interface_InterfaceModel)& amodel) ;
|
||||||
|
//! Reads directory part componants from file; DP is the litteral <br>
|
||||||
|
//! directory part, IR detains entities referenced by DP <br>
|
||||||
|
Standard_EXPORT void ReadDir(const Handle(IGESData_IGESEntity)& ent,const Handle(IGESData_IGESReaderData)& IR,const IGESData_DirPart& DP,Handle(Interface_Check)& ach) const;
|
||||||
|
//! Performs Reading of own Parameters for each IGESEntity <br>
|
||||||
|
//! Works with the ReaderLib loaded with ReadWriteModules for IGES <br>
|
||||||
|
//! In case of failure, tries UndefinedEntity from IGES <br>
|
||||||
|
Standard_EXPORT void ReadOwnParams(const Handle(IGESData_IGESEntity)& ent,const Handle(IGESData_IGESReaderData)& IR,IGESData_ParamReader& PR) const;
|
||||||
|
//! Reads Property List, if there is (if not, does nothing) <br>
|
||||||
|
//! criterium is : current parameter of PR remains inside params <br>
|
||||||
|
//! list, and Stage is "Own" <br>
|
||||||
|
//! Current parameter must be a positive integer, which value <br>
|
||||||
|
//! gives the length of the list; else, a Fail is produced (into <br>
|
||||||
|
//! Check of PR) and reading process is stopped <br>
|
||||||
|
Standard_EXPORT void ReadProps(const Handle(IGESData_IGESEntity)& ent,const Handle(IGESData_IGESReaderData)& IR,IGESData_ParamReader& PR) const;
|
||||||
|
//! Reads Associativity List, if there is (if not, does nothing) <br>
|
||||||
|
//! criterium is : current parameter of PR remains inside params <br>
|
||||||
|
//! list, and Stage is "Own" <br>
|
||||||
|
//! Same conditions as above; in addition, no parameter must be <br>
|
||||||
|
//! let after the list once read <br>
|
||||||
|
//! Note that "Associated" entities are not declared "Shared" <br>
|
||||||
|
Standard_EXPORT void ReadAssocs(const Handle(IGESData_IGESEntity)& ent,const Handle(IGESData_IGESReaderData)& IR,IGESData_ParamReader& PR) const;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Handle_Interface_ParamList thelist;
|
||||||
|
Handle_IGESData_FileRecognizer thereco;
|
||||||
|
Interface_GeneralLib theglib;
|
||||||
|
Interface_ReaderLib therlib;
|
||||||
|
Standard_Integer thecnum;
|
||||||
|
IGESData_IGESType thectyp;
|
||||||
|
IGESData_ReadStage thestep;
|
||||||
|
Handle_Interface_Check thechk;
|
||||||
|
Standard_Integer thegradweight;
|
||||||
|
Standard_Real themaxweight;
|
||||||
|
Standard_Real thedefweight;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// other Inline functions and methods (like "C++: function call" methods)
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
30
src/IGESData/IGESData_SpecificLib.cxx
Normal file
30
src/IGESData/IGESData_SpecificLib.cxx
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESData_SpecificLib.hxx>
|
||||||
|
|
||||||
|
typedef LibCtl_GlobalNode <Handle(IGESData_SpecificModule),
|
||||||
|
Handle(IGESData_Protocol)>
|
||||||
|
IGESData_GlobalNodeOfSpecificLib;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Standard_EXPORT NCollection_Handle< IGESData_GlobalNodeOfSpecificLib >&
|
||||||
|
IGESData_SpecificLib::GetGlobal()
|
||||||
|
{
|
||||||
|
static NCollection_Handle< IGESData_GlobalNodeOfSpecificLib > aGlobal;
|
||||||
|
return aGlobal;
|
||||||
|
}
|
45
src/IGESData/IGESData_SpecificLib.hxx
Normal file
45
src/IGESData/IGESData_SpecificLib.hxx
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESData_SpecificLib_HeaderFile
|
||||||
|
#define _IGESData_SpecificLib_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <LibCtl_Library.hxx>
|
||||||
|
#include <Handle_IGESData_IGESEntity.hxx>
|
||||||
|
#include <Handle_IGESData_SpecificModule.hxx>
|
||||||
|
#include <IGESData_Protocol.hxx>
|
||||||
|
#include <Handle_Standard_Transient.hxx>
|
||||||
|
#include <MMgt_TShared.hxx>
|
||||||
|
|
||||||
|
class Standard_NoSuchObject;
|
||||||
|
class Standard_Transient;
|
||||||
|
class IGESData_IGESEntity;
|
||||||
|
class IGESData_IGESEntity;
|
||||||
|
class IGESData_SpecificModule;
|
||||||
|
class IGESData_Protocol;
|
||||||
|
|
||||||
|
typedef LibCtl_Library<Handle(IGESData_IGESEntity),
|
||||||
|
Handle(IGESData_SpecificModule),
|
||||||
|
Handle(IGESData_Protocol)>
|
||||||
|
IGESData_SpecificLib;
|
||||||
|
|
||||||
|
#endif
|
30
src/IGESData/IGESData_WriterLib.cxx
Normal file
30
src/IGESData/IGESData_WriterLib.cxx
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESData_WriterLib.hxx>
|
||||||
|
|
||||||
|
typedef LibCtl_GlobalNode <Handle(IGESData_ReadWriteModule),
|
||||||
|
Handle(IGESData_Protocol)>
|
||||||
|
IGESData_GlobalNodeOfWriterLib;
|
||||||
|
|
||||||
|
template<>
|
||||||
|
Standard_EXPORT NCollection_Handle< IGESData_GlobalNodeOfWriterLib >&
|
||||||
|
IGESData_WriterLib::GetGlobal()
|
||||||
|
{
|
||||||
|
static NCollection_Handle< IGESData_GlobalNodeOfWriterLib > aGlobal;
|
||||||
|
return aGlobal;
|
||||||
|
}
|
47
src/IGESData/IGESData_WriterLib.hxx
Normal file
47
src/IGESData/IGESData_WriterLib.hxx
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESData_WriterLib_HeaderFile
|
||||||
|
#define _IGESData_WriterLib_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <LibCtl_Library.hxx>
|
||||||
|
#include <Handle_IGESData_IGESEntity.hxx>
|
||||||
|
#include <Handle_IGESData_ReadWriteModule.hxx>
|
||||||
|
#include <Handle_IGESData_Protocol.hxx>
|
||||||
|
#include <Handle_Standard_Transient.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
|
#include <IGESData_Protocol.hxx>
|
||||||
|
#include <MMgt_TShared.hxx>
|
||||||
|
|
||||||
|
class Standard_NoSuchObject;
|
||||||
|
class IGESData_IGESEntity;
|
||||||
|
class IGESData_ReadWriteModule;
|
||||||
|
class IGESData_Protocol;
|
||||||
|
class Standard_Transient;
|
||||||
|
|
||||||
|
|
||||||
|
typedef LibCtl_Library<Handle(IGESData_IGESEntity),
|
||||||
|
Handle(IGESData_ReadWriteModule),
|
||||||
|
Handle(IGESData_Protocol)>
|
||||||
|
IGESData_WriterLib;
|
||||||
|
|
||||||
|
#endif
|
4
src/IGESDefs/FILES
Normal file
4
src/IGESDefs/FILES
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
IGESDefs_HArray1OfHArray1OfTextDisplayTemplate.hxx
|
||||||
|
IGESDefs_HArray1OfHArray1OfTextDisplayTemplate.cxx
|
||||||
|
IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_Handle.hxx
|
||||||
|
|
@ -98,9 +98,9 @@ is
|
|||||||
|
|
||||||
class HArray1OfTabularData instantiates HArray1 from TCollection
|
class HArray1OfTabularData instantiates HArray1 from TCollection
|
||||||
(TabularData,Array1OfTabularData);
|
(TabularData,Array1OfTabularData);
|
||||||
class HArray1OfHArray1OfTextDisplayTemplate instantiates
|
|
||||||
-- HArray1 (HArray1OfTextDisplayTemplate,Array1OfHArray1OfTextDisplayTemplate);
|
imported HArray1OfHArray1OfTextDisplayTemplate;
|
||||||
JaggedArray from Interface (HArray1OfTextDisplayTemplate from IGESGraph);
|
imported HArray1OfHArray1OfTextDisplayTemplate_Handle;
|
||||||
|
|
||||||
-- Package Methods
|
-- Package Methods
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ class AssociativityDef from IGESDefs inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfHArray1OfInteger from IGESBasic
|
HArray1OfHArray1OfInteger_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ is
|
|||||||
requirements : HArray1OfInteger;
|
requirements : HArray1OfInteger;
|
||||||
orders : HArray1OfInteger;
|
orders : HArray1OfInteger;
|
||||||
numItems : HArray1OfInteger;
|
numItems : HArray1OfInteger;
|
||||||
items : HArray1OfHArray1OfInteger)
|
items : HArray1OfHArray1OfInteger_Handle)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
---Purpose : This method is used to set the fields of the class
|
---Purpose : This method is used to set the fields of the class
|
||||||
-- AssociativityDef
|
-- AssociativityDef
|
||||||
@ -106,6 +106,6 @@ fields
|
|||||||
theBackPointerReqs : HArray1OfInteger;
|
theBackPointerReqs : HArray1OfInteger;
|
||||||
theClassOrders : HArray1OfInteger;
|
theClassOrders : HArray1OfInteger;
|
||||||
theNbItemsPerClass : HArray1OfInteger;
|
theNbItemsPerClass : HArray1OfInteger;
|
||||||
theItems : HArray1OfHArray1OfInteger;
|
theItems : HArray1OfHArray1OfInteger_Handle;
|
||||||
|
|
||||||
end AssociativityDef;
|
end AssociativityDef;
|
||||||
|
@ -32,7 +32,7 @@ uses
|
|||||||
HArray1OfIGESEntity from IGESData,
|
HArray1OfIGESEntity from IGESData,
|
||||||
TextDisplayTemplate from IGESGraph,
|
TextDisplayTemplate from IGESGraph,
|
||||||
HArray1OfTextDisplayTemplate from IGESGraph,
|
HArray1OfTextDisplayTemplate from IGESGraph,
|
||||||
HArray1OfHArray1OfTextDisplayTemplate from IGESDefs
|
HArray1OfHArray1OfTextDisplayTemplate_Handle from IGESDefs
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange, NullObject
|
raises DimensionMismatch, OutOfRange, NullObject
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ is
|
|||||||
attrValueDataTypes : HArray1OfInteger;
|
attrValueDataTypes : HArray1OfInteger;
|
||||||
attrValueCounts : HArray1OfInteger;
|
attrValueCounts : HArray1OfInteger;
|
||||||
attrValues : HArray1OfTransient from TColStd;
|
attrValues : HArray1OfTransient from TColStd;
|
||||||
attrValuePointers : HArray1OfHArray1OfTextDisplayTemplate)
|
attrValuePointers : HArray1OfHArray1OfTextDisplayTemplate_Handle)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
-- This method is used to set the fields of the
|
-- This method is used to set the fields of the
|
||||||
-- class AttributeDef
|
-- class AttributeDef
|
||||||
@ -163,6 +163,6 @@ fields
|
|||||||
theAttrValueDataTypes : HArray1OfInteger;
|
theAttrValueDataTypes : HArray1OfInteger;
|
||||||
theAttrValueCounts : HArray1OfInteger;
|
theAttrValueCounts : HArray1OfInteger;
|
||||||
theAttrValues : HArray1OfTransient from TColStd;
|
theAttrValues : HArray1OfTransient from TColStd;
|
||||||
theAttrValuePointers : HArray1OfHArray1OfTextDisplayTemplate;
|
theAttrValuePointers : HArray1OfHArray1OfTextDisplayTemplate_Handle;
|
||||||
|
|
||||||
end AttributeDef;
|
end AttributeDef;
|
||||||
|
@ -0,0 +1,21 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESDefs_HArray1OfHArray1OfTextDisplayTemplate.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate, MMgt_TShared)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate, MMgt_TShared)
|
@ -0,0 +1,40 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_H__
|
||||||
|
#define _IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_H__
|
||||||
|
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Interface_JaggedArray.hxx>
|
||||||
|
#include <Handle_IGESGraph_HArray1OfTextDisplayTemplate.hxx>
|
||||||
|
|
||||||
|
class IGESGraph_HArray1OfTextDisplayTemplate;
|
||||||
|
|
||||||
|
class IGESDefs_HArray1OfHArray1OfTextDisplayTemplate : public Interface_JaggedArray <Handle(IGESGraph_HArray1OfTextDisplayTemplate)>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Standard_EXPORT IGESDefs_HArray1OfHArray1OfTextDisplayTemplate
|
||||||
|
(const Standard_Integer theLowerIndex,
|
||||||
|
const Standard_Integer theUpperIndex)
|
||||||
|
:Interface_JaggedArray <Handle(IGESGraph_HArray1OfTextDisplayTemplate)> (theLowerIndex, theUpperIndex)
|
||||||
|
{}
|
||||||
|
DEFINE_STANDARD_RTTI(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate);
|
||||||
|
};
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate, MMgt_TShared)
|
||||||
|
|
||||||
|
#endif
|
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_Handle_H__
|
||||||
|
#define _IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_Handle_H__
|
||||||
|
|
||||||
|
#include <IGESDefs_HArray1OfHArray1OfTextDisplayTemplate.hxx>
|
||||||
|
|
||||||
|
typedef Handle(IGESDefs_HArray1OfHArray1OfTextDisplayTemplate)
|
||||||
|
IGESDefs_HArray1OfHArray1OfTextDisplayTemplate_Handle;
|
||||||
|
|
||||||
|
#endif
|
@ -23,9 +23,9 @@ class TabularData from IGESDefs inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfReal from TColStd,
|
HArray1OfReal from TColStd,
|
||||||
HArray1OfHArray1OfReal from IGESBasic
|
HArray1OfHArray1OfReal_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ is
|
|||||||
propType : Integer;
|
propType : Integer;
|
||||||
typesInd : HArray1OfInteger;
|
typesInd : HArray1OfInteger;
|
||||||
nbValuesInd : HArray1OfInteger;
|
nbValuesInd : HArray1OfInteger;
|
||||||
valuesInd : HArray1OfHArray1OfReal;
|
valuesInd : HArray1OfHArray1OfReal_Handle;
|
||||||
valuesDep : HArray1OfHArray1OfReal)
|
valuesDep : HArray1OfHArray1OfReal_Handle)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
---Purpose : This method is used to set the fields of the class
|
---Purpose : This method is used to set the fields of the class
|
||||||
-- TabularData
|
-- TabularData
|
||||||
@ -127,7 +127,7 @@ fields
|
|||||||
thePropertyType : Integer;
|
thePropertyType : Integer;
|
||||||
theTypeOfIndependentVariables : HArray1OfInteger;
|
theTypeOfIndependentVariables : HArray1OfInteger;
|
||||||
theNbValues : HArray1OfInteger;
|
theNbValues : HArray1OfInteger;
|
||||||
theIndependentValues : HArray1OfHArray1OfReal;
|
theIndependentValues : HArray1OfHArray1OfReal_Handle;
|
||||||
theDependentValues : HArray1OfHArray1OfReal;
|
theDependentValues : HArray1OfHArray1OfReal_Handle;
|
||||||
|
|
||||||
end TabularData;
|
end TabularData;
|
||||||
|
@ -23,9 +23,9 @@ class Boundary from IGESGeom inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfIGESEntity from IGESData,
|
HArray1OfIGESEntity from IGESData,
|
||||||
HArray1OfHArray1OfIGESEntity from IGESBasic
|
HArray1OfHArray1OfIGESEntity_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ is
|
|||||||
aSurface : IGESEntity;
|
aSurface : IGESEntity;
|
||||||
allModelCurves : HArray1OfIGESEntity;
|
allModelCurves : HArray1OfIGESEntity;
|
||||||
allSenses : HArray1OfInteger;
|
allSenses : HArray1OfInteger;
|
||||||
allParameterCurves : HArray1OfHArray1OfIGESEntity)
|
allParameterCurves : HArray1OfHArray1OfIGESEntity_Handle)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
---Purpose : This method is used to set the fields of the class
|
---Purpose : This method is used to set the fields of the class
|
||||||
-- Boundary
|
-- Boundary
|
||||||
@ -123,6 +123,6 @@ fields
|
|||||||
theSurface : IGESEntity;
|
theSurface : IGESEntity;
|
||||||
theModelCurves : HArray1OfIGESEntity;
|
theModelCurves : HArray1OfIGESEntity;
|
||||||
theSenses : HArray1OfInteger;
|
theSenses : HArray1OfInteger;
|
||||||
theParameterCurves : HArray1OfHArray1OfIGESEntity;
|
theParameterCurves : HArray1OfHArray1OfIGESEntity_Handle;
|
||||||
|
|
||||||
end Boundary;
|
end Boundary;
|
||||||
|
@ -25,9 +25,9 @@ class TextFontDef from IGESGraph inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
HAsciiString from TCollection,
|
HAsciiString from TCollection,
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfHArray1OfInteger from IGESBasic
|
HArray1OfHArray1OfInteger_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -47,9 +47,9 @@ is
|
|||||||
allNextCharX : HArray1OfInteger;
|
allNextCharX : HArray1OfInteger;
|
||||||
allNextCharY : HArray1OfInteger;
|
allNextCharY : HArray1OfInteger;
|
||||||
allPenMotions : HArray1OfInteger;
|
allPenMotions : HArray1OfInteger;
|
||||||
allPenFlags : HArray1OfHArray1OfInteger;
|
allPenFlags : HArray1OfHArray1OfInteger_Handle;
|
||||||
allMovePenToX : HArray1OfHArray1OfInteger;
|
allMovePenToX : HArray1OfHArray1OfInteger_Handle;
|
||||||
allMovePenToY : HArray1OfHArray1OfInteger)
|
allMovePenToY : HArray1OfHArray1OfInteger_Handle)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
---Purpose : This method is used to set the fields of the class
|
---Purpose : This method is used to set the fields of the class
|
||||||
-- TextFontDef
|
-- TextFontDef
|
||||||
@ -164,14 +164,14 @@ fields
|
|||||||
-- Number of pen motions for each character(Length = NbCharacters)
|
-- Number of pen motions for each character(Length = NbCharacters)
|
||||||
-- is (NM1 ,NM2 ....... NMn)
|
-- is (NM1 ,NM2 ....... NMn)
|
||||||
|
|
||||||
thePenMotions : HArray1OfHArray1OfInteger;
|
thePenMotions : HArray1OfHArray1OfInteger_Handle;
|
||||||
-- Status of Pen up/down flag for each character
|
-- Status of Pen up/down flag for each character
|
||||||
-- flag : 0 = Down(Default)
|
-- flag : 0 = Down(Default)
|
||||||
-- 1 = Up
|
-- 1 = Up
|
||||||
-- Note : Inner HArray1 are of lengths NM1, NM2... NMn respectively
|
-- Note : Inner HArray1 are of lengths NM1, NM2... NMn respectively
|
||||||
|
|
||||||
thePenMovesToX : HArray1OfHArray1OfInteger;
|
thePenMovesToX : HArray1OfHArray1OfInteger_Handle;
|
||||||
thePenMovesToY : HArray1OfHArray1OfInteger;
|
thePenMovesToY : HArray1OfHArray1OfInteger_Handle;
|
||||||
-- For each character, Grid location to which the pen is to move
|
-- For each character, Grid location to which the pen is to move
|
||||||
-- Note : Inner HArray1 are of lengths NM1, NM2... NMn respectively
|
-- Note : Inner HArray1 are of lengths NM1, NM2... NMn respectively
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <TColgp_HArray1OfXY.hxx>
|
#include <TColgp_HArray1OfXY.hxx>
|
||||||
#include <TColStd_HArray1OfInteger.hxx>
|
#include <TColStd_HArray1OfInteger.hxx>
|
||||||
#include <IGESBasic_HArray1OfHArray1OfInteger.hxx>
|
#include <IGESBasic_HArray1OfHArray1OfInteger.hxx>
|
||||||
#include <IGESBasic_HArray1OfHArray1OfXY.hxx>
|
|
||||||
#include <IGESData_Dump.hxx>
|
#include <IGESData_Dump.hxx>
|
||||||
#include <Interface_Macros.hxx>
|
#include <Interface_Macros.hxx>
|
||||||
|
|
||||||
|
6
src/IGESSelect/FILES
Normal file
6
src/IGESSelect/FILES
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
IGESSelect_FileModifier.hxx
|
||||||
|
IGESSelect_FileModifier.cxx
|
||||||
|
IGESSelect_AddFileComment.hxx
|
||||||
|
IGESSelect_AddFileComment.cxx
|
||||||
|
IGESSelect_FloatFormat.hxx
|
||||||
|
IGESSelect_FloatFormat.cxx
|
@ -56,14 +56,12 @@ is
|
|||||||
class SelectFaces; -- Select some geometries : Faces
|
class SelectFaces; -- Select some geometries : Faces
|
||||||
class SelectPCurves; -- Select PCurves of Faces
|
class SelectPCurves; -- Select PCurves of Faces
|
||||||
|
|
||||||
|
imported FileModifier;
|
||||||
|
|
||||||
|
deferred class ModelModifier;
|
||||||
|
|
||||||
deferred class ModelModifier instantiates
|
imported FloatFormat; -- File Modifier to control Float Format
|
||||||
ModelModifier from IFSelect (IGESModel from IGESData, Protocol from IGESData);
|
imported AddFileComment; -- " " to add comment start lines
|
||||||
deferred class FileModifier instantiates
|
|
||||||
FileModifier from IFSelect (IGESWriter from IGESData);
|
|
||||||
|
|
||||||
class FloatFormat; -- File Modifier to control Float Format
|
|
||||||
class AddFileComment; -- " " to add comment start lines
|
|
||||||
|
|
||||||
class UpdateFileName; -- Set new file name
|
class UpdateFileName; -- Set new file name
|
||||||
class UpdateCreationDate; -- Set new creation date
|
class UpdateCreationDate; -- Set new creation date
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
-- Created on: 1994-08-26
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 AddFileComment from IGESSelect inherits FileModifier from IGESSelect
|
|
||||||
|
|
||||||
---Purpose : This class allows to add comment lines on writing an IGES File
|
|
||||||
-- These lines are added to Start Section, instead of the only
|
|
||||||
-- one blank line written by default.
|
|
||||||
|
|
||||||
uses CString, AsciiString from TCollection,
|
|
||||||
HSequenceOfHAsciiString from TColStd,
|
|
||||||
IGESWriter , ContextWrite
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns mutable AddFileComment;
|
|
||||||
---Purpose : Creates a new emoty AddFileComment. Use AddLine to complete it
|
|
||||||
|
|
||||||
Clear (me : mutable);
|
|
||||||
---Purpose : Clears the list of file comment lines already stored
|
|
||||||
|
|
||||||
AddLine (me : mutable; line : CString);
|
|
||||||
---Purpose : Adds a line for file comment
|
|
||||||
-- Remark : Lines are limited to 72 useful char.s . A line of more than
|
|
||||||
-- 72 char.s will be splited into several ones of 72 max each.
|
|
||||||
|
|
||||||
AddLines (me : mutable; lines : HSequenceOfHAsciiString from TColStd);
|
|
||||||
---Purpose : Adds a list of lines for file comment
|
|
||||||
-- Each of them must comply with demand of AddLine
|
|
||||||
|
|
||||||
NbLines (me) returns Integer;
|
|
||||||
---Purpose : Returns the count of stored lines
|
|
||||||
|
|
||||||
Line (me; num : Integer) returns CString;
|
|
||||||
---Purpose : Returns a stored line given its rank
|
|
||||||
|
|
||||||
Lines (me) returns HSequenceOfHAsciiString from TColStd;
|
|
||||||
---Purpose : Returns the complete list of lines in once
|
|
||||||
|
|
||||||
Perform (me; ctx : in out ContextWrite;
|
|
||||||
writer : in out IGESWriter);
|
|
||||||
---Purpose : Sends the comment lines to the file (Start Section)
|
|
||||||
|
|
||||||
Label (me) returns AsciiString from TCollection;
|
|
||||||
---Purpose : Returns specific Label, which is
|
|
||||||
-- "Add <nn> Comment Lines (Start Section)"
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
thelist : HSequenceOfHAsciiString from TColStd;
|
|
||||||
|
|
||||||
end AddFileComment;
|
|
@ -14,11 +14,30 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <IGESSelect_AddFileComment.ixx>
|
#include <IGESSelect_AddFileComment.hxx>
|
||||||
#include <TCollection_HAsciiString.hxx>
|
#include <TCollection_HAsciiString.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
#include <TColStd_HSequenceOfHAsciiString.hxx>
|
||||||
|
#include <IFSelect_ContextWrite.hxx>
|
||||||
|
#include <IGESData_IGESWriter.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_TYPE(IGESSelect_AddFileComment)
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||||
|
STANDARD_TYPE(IGESSelect_FileModifier),
|
||||||
|
STANDARD_TYPE(IFSelect_GeneralModifier),
|
||||||
|
STANDARD_TYPE(MMgt_TShared),
|
||||||
|
STANDARD_TYPE(Standard_Transient),
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||||
|
IMPLEMENT_STANDARD_TYPE_END(IGESSelect_AddFileComment)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_DOWNCAST(IGESSelect_AddFileComment,Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTI(IGESSelect_AddFileComment)
|
||||||
|
|
||||||
IGESSelect_AddFileComment::IGESSelect_AddFileComment ()
|
IGESSelect_AddFileComment::IGESSelect_AddFileComment ()
|
||||||
{ thelist = new TColStd_HSequenceOfHAsciiString(); }
|
{ thelist = new TColStd_HSequenceOfHAsciiString(); }
|
||||||
|
|
||||||
|
76
src/IGESSelect/IGESSelect_AddFileComment.hxx
Normal file
76
src/IGESSelect/IGESSelect_AddFileComment.hxx
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
// Copyright (c) 1999-2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESSelect_AddFileComment_HeaderFile
|
||||||
|
#define _IGESSelect_AddFileComment_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Handle_TColStd_HSequenceOfHAsciiString.hxx>
|
||||||
|
#include <IGESSelect_FileModifier.hxx>
|
||||||
|
#include <Standard_CString.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
|
||||||
|
class TColStd_HSequenceOfHAsciiString;
|
||||||
|
class IFSelect_ContextWrite;
|
||||||
|
class IGESData_IGESWriter;
|
||||||
|
class TCollection_AsciiString;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle(Standard_Type);
|
||||||
|
class Handle(IGESSelect_FileModifier);
|
||||||
|
class IGESSelect_AddFileComment;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESSelect_AddFileComment,IGESSelect_FileModifier)
|
||||||
|
|
||||||
|
//! This class allows to add comment lines on writing an IGES File <br>
|
||||||
|
//! These lines are added to Start Section, instead of the only <br>
|
||||||
|
//! one blank line written by default. <br>
|
||||||
|
class IGESSelect_AddFileComment : public IGESSelect_FileModifier
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Creates a new emoty AddFileComment. Use AddLine to complete it <br>
|
||||||
|
Standard_EXPORT IGESSelect_AddFileComment();
|
||||||
|
//! Clears the list of file comment lines already stored <br>
|
||||||
|
Standard_EXPORT void Clear() ;
|
||||||
|
//! Adds a line for file comment <br>
|
||||||
|
//! Remark : Lines are limited to 72 useful char.s . A line of more than <br>
|
||||||
|
//! 72 char.s will be splited into several ones of 72 max each. <br>
|
||||||
|
Standard_EXPORT void AddLine(const Standard_CString line) ;
|
||||||
|
//! Adds a list of lines for file comment <br>
|
||||||
|
//! Each of them must comply with demand of AddLine <br>
|
||||||
|
Standard_EXPORT void AddLines(const Handle(TColStd_HSequenceOfHAsciiString)& lines) ;
|
||||||
|
//! Returns the count of stored lines <br>
|
||||||
|
Standard_EXPORT Standard_Integer NbLines() const;
|
||||||
|
//! Returns a stored line given its rank <br>
|
||||||
|
Standard_EXPORT Standard_CString Line(const Standard_Integer num) const;
|
||||||
|
//! Returns the complete list of lines in once <br>
|
||||||
|
Standard_EXPORT Handle_TColStd_HSequenceOfHAsciiString Lines() const;
|
||||||
|
//! Sends the comment lines to the file (Start Section) <br>
|
||||||
|
Standard_EXPORT void Perform(IFSelect_ContextWrite& ctx,IGESData_IGESWriter& writer) const;
|
||||||
|
//! Returns specific Label, which is <br>
|
||||||
|
//! "Add <nn> Comment Lines (Start Section)" <br>
|
||||||
|
Standard_EXPORT TCollection_AsciiString Label() const;
|
||||||
|
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESSelect_AddFileComment)
|
||||||
|
|
||||||
|
private:
|
||||||
|
Handle_TColStd_HSequenceOfHAsciiString thelist;
|
||||||
|
};
|
||||||
|
#endif
|
34
src/IGESSelect/IGESSelect_FileModifier.cxx
Normal file
34
src/IGESSelect/IGESSelect_FileModifier.cxx
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
// Copyright (c) 1999-2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IGESSelect_FileModifier.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
|
#include <IGESData_IGESWriter.hxx>
|
||||||
|
#include <IFSelect_ContextWrite.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_TYPE(IGESSelect_FileModifier)
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||||
|
STANDARD_TYPE(IFSelect_GeneralModifier),
|
||||||
|
STANDARD_TYPE(MMgt_TShared),
|
||||||
|
STANDARD_TYPE(Standard_Transient),
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||||
|
IMPLEMENT_STANDARD_TYPE_END(IGESSelect_FileModifier)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_DOWNCAST(IGESSelect_FileModifier,Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTI(IGESSelect_FileModifier)
|
48
src/IGESSelect/IGESSelect_FileModifier.hxx
Normal file
48
src/IGESSelect/IGESSelect_FileModifier.hxx
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
// Copyright (c) 1999-2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESSelect_FileModifier_HeaderFile
|
||||||
|
#define _IGESSelect_FileModifier_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <IFSelect_GeneralModifier.hxx>
|
||||||
|
|
||||||
|
class IGESData_IGESWriter;
|
||||||
|
class IFSelect_ContextWrite;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle(Standard_Type);
|
||||||
|
class Handle(IFSelect_GeneralModifier);
|
||||||
|
class IGESSelect_FileModifier;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESSelect_FileModifier,IFSelect_GeneralModifier)
|
||||||
|
|
||||||
|
class IGESSelect_FileModifier : public IFSelect_GeneralModifier
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
Standard_EXPORT virtual void Perform(IFSelect_ContextWrite& ctx,IGESData_IGESWriter& writer) const = 0;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESSelect_FileModifier)
|
||||||
|
protected:
|
||||||
|
|
||||||
|
Standard_EXPORT IGESSelect_FileModifier ()
|
||||||
|
: IFSelect_GeneralModifier (Standard_False)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
@ -1,92 +0,0 @@
|
|||||||
-- Created on: 1994-06-01
|
|
||||||
-- Created by: Christian CAILLET
|
|
||||||
-- 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 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 FloatFormat from IGESSelect inherits FileModifier from IGESSelect
|
|
||||||
|
|
||||||
---Purpose : This class gives control out format for floatting values :
|
|
||||||
-- ZeroSuppress or no, Main Format, Format in Range (for values
|
|
||||||
-- around 1.), as IGESWriter allows to manage it.
|
|
||||||
-- Formats are given under C-printf form
|
|
||||||
|
|
||||||
uses CString, AsciiString from TCollection,
|
|
||||||
IGESWriter , ContextWrite
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns mutable FloatFormat;
|
|
||||||
---Purpose : Creates a new FloatFormat, with standard options :
|
|
||||||
-- ZeroSuppress, Main Format = %E,
|
|
||||||
-- Format between 0.001 and 1000. = %f
|
|
||||||
|
|
||||||
SetDefault (me : mutable; digits : Integer = 0);
|
|
||||||
---Purpose : Sets FloatFormat to default value (see Create) but if <digits>
|
|
||||||
-- is given positive, it commands Formats (main and range) to
|
|
||||||
-- ensure <digits> significant digits to be displayed
|
|
||||||
|
|
||||||
SetZeroSuppress (me : mutable; mode : Boolean);
|
|
||||||
---Purpose : Sets ZeroSuppress mode to a new value
|
|
||||||
|
|
||||||
SetFormat (me : mutable; format : CString = "%E");
|
|
||||||
---Purpose : Sets Main Format to a new value
|
|
||||||
-- Remark : SetFormat, SetZeroSuppress and SetFormatForRange are
|
|
||||||
-- independant
|
|
||||||
|
|
||||||
SetFormatForRange (me : mutable; format : CString = "%f";
|
|
||||||
Rmin : Real = 0.1; Rmax : Real = 1000.0);
|
|
||||||
---Purpose : Sets Format for Range to a new value with its range of
|
|
||||||
-- application.
|
|
||||||
-- To cancel it, give format as "" (empty string)
|
|
||||||
-- Remark that if the condition (0. < Rmin < Rmax) is not
|
|
||||||
-- verified, this secondary format will be ignored.
|
|
||||||
-- Moreover, this secondary format is intended to be used in a
|
|
||||||
-- range around 1.
|
|
||||||
|
|
||||||
|
|
||||||
Format (me; zerosup : out Boolean;
|
|
||||||
mainform : out AsciiString from TCollection;
|
|
||||||
hasrange : out Boolean;
|
|
||||||
forminrange : out AsciiString from TCollection;
|
|
||||||
rangemin, rangemax : out Real);
|
|
||||||
---Purpose : Returns all recorded parameters :
|
|
||||||
-- zerosup : ZeroSuppress status
|
|
||||||
-- mainform : Main Format (which applies out of the range, or
|
|
||||||
-- for every real if no range is set)
|
|
||||||
-- hasrange : True if a FormatInRange is set, False else
|
|
||||||
-- (following parameters do not apply if it is False)
|
|
||||||
-- forminrange : Secondary Format (it applies inside the range)
|
|
||||||
-- rangemin, rangemax : the range in which the secondary format
|
|
||||||
-- applies
|
|
||||||
|
|
||||||
|
|
||||||
Perform (me; ctx : in out ContextWrite;
|
|
||||||
writer : in out IGESWriter);
|
|
||||||
---Purpose : Sets the Floatting Formats of IGESWriter to the recorded
|
|
||||||
-- parameters
|
|
||||||
|
|
||||||
Label (me) returns AsciiString from TCollection;
|
|
||||||
---Purpose : Returns specific Label : for instance,
|
|
||||||
-- "Float Format [ZeroSuppress] %E [, in range R1-R2 %f]"
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
thezerosup : Boolean;
|
|
||||||
themainform : AsciiString from TCollection;
|
|
||||||
theformrange : AsciiString from TCollection;
|
|
||||||
therangemin : Real;
|
|
||||||
therangemax : Real;
|
|
||||||
|
|
||||||
end FloatFormat;
|
|
||||||
|
|
@ -11,11 +11,27 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <IGESSelect_FloatFormat.ixx>
|
#include <IGESSelect_FloatFormat.hxx>
|
||||||
#include <Interface_FloatWriter.hxx>
|
#include <Interface_FloatWriter.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
#include <IFSelect_ContextWrite.hxx>
|
||||||
|
#include <IGESData_IGESWriter.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_TYPE(IGESSelect_FloatFormat)
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||||
|
STANDARD_TYPE(IGESSelect_FileModifier),
|
||||||
|
STANDARD_TYPE(IFSelect_GeneralModifier),
|
||||||
|
STANDARD_TYPE(MMgt_TShared),
|
||||||
|
STANDARD_TYPE(Standard_Transient),
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||||
|
IMPLEMENT_STANDARD_TYPE_END(IGESSelect_FloatFormat)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_DOWNCAST(IGESSelect_FloatFormat,Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTI(IGESSelect_FloatFormat)
|
||||||
|
|
||||||
IGESSelect_FloatFormat::IGESSelect_FloatFormat ()
|
IGESSelect_FloatFormat::IGESSelect_FloatFormat ()
|
||||||
: thezerosup (Standard_True) , themainform ("%E") ,
|
: thezerosup (Standard_True) , themainform ("%E") ,
|
||||||
|
98
src/IGESSelect/IGESSelect_FloatFormat.hxx
Normal file
98
src/IGESSelect/IGESSelect_FloatFormat.hxx
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
// Copyright (c) 1999-2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESSelect_FloatFormat_HeaderFile
|
||||||
|
#define _IGESSelect_FloatFormat_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#include <IGESSelect_FileModifier.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_CString.hxx>
|
||||||
|
|
||||||
|
class TCollection_AsciiString;
|
||||||
|
class IFSelect_ContextWrite;
|
||||||
|
class IGESData_IGESWriter;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle(Standard_Type);
|
||||||
|
class Handle(IGESSelect_FileModifier);
|
||||||
|
class IGESSelect_FloatFormat;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESSelect_FloatFormat,IGESSelect_FileModifier)
|
||||||
|
|
||||||
|
//! This class gives control out format for floatting values : <br>
|
||||||
|
//! ZeroSuppress or no, Main Format, Format in Range (for values <br>
|
||||||
|
//! around 1.), as IGESWriter allows to manage it. <br>
|
||||||
|
//! Formats are given under C-printf form <br>
|
||||||
|
class IGESSelect_FloatFormat : public IGESSelect_FileModifier
|
||||||
|
{
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//! Creates a new FloatFormat, with standard options : <br>
|
||||||
|
//! ZeroSuppress, Main Format = %E, <br>
|
||||||
|
//! Format between 0.001 and 1000. = %f <br>
|
||||||
|
Standard_EXPORT IGESSelect_FloatFormat();
|
||||||
|
//! Sets FloatFormat to default value (see Create) but if <digits> <br>
|
||||||
|
//! is given positive, it commands Formats (main and range) to <br>
|
||||||
|
//! ensure <digits> significant digits to be displayed <br>
|
||||||
|
Standard_EXPORT void SetDefault(const Standard_Integer digits = 0) ;
|
||||||
|
//! Sets ZeroSuppress mode to a new value <br>
|
||||||
|
Standard_EXPORT void SetZeroSuppress(const Standard_Boolean mode) ;
|
||||||
|
//! Sets Main Format to a new value <br>
|
||||||
|
//! Remark : SetFormat, SetZeroSuppress and SetFormatForRange are <br>
|
||||||
|
//! independant <br>
|
||||||
|
Standard_EXPORT void SetFormat(const Standard_CString format = "%E") ;
|
||||||
|
//! Sets Format for Range to a new value with its range of <br>
|
||||||
|
//! application. <br>
|
||||||
|
//! To cancel it, give format as "" (empty string) <br>
|
||||||
|
//! Remark that if the condition (0. < Rmin < Rmax) is not <br>
|
||||||
|
//! verified, this secondary format will be ignored. <br>
|
||||||
|
//! Moreover, this secondary format is intended to be used in a <br>
|
||||||
|
//! range around 1. <br>
|
||||||
|
Standard_EXPORT void SetFormatForRange(const Standard_CString format = "%f",const Standard_Real Rmin = 0.1,const Standard_Real Rmax = 1000.0) ;
|
||||||
|
//! Returns all recorded parameters : <br>
|
||||||
|
//! zerosup : ZeroSuppress status <br>
|
||||||
|
//! mainform : Main Format (which applies out of the range, or <br>
|
||||||
|
//! for every real if no range is set) <br>
|
||||||
|
//! hasrange : True if a FormatInRange is set, False else <br>
|
||||||
|
//! (following parameters do not apply if it is False) <br>
|
||||||
|
//! forminrange : Secondary Format (it applies inside the range) <br>
|
||||||
|
//! rangemin, rangemax : the range in which the secondary format <br>
|
||||||
|
//! applies <br>
|
||||||
|
Standard_EXPORT void Format(Standard_Boolean& zerosup,TCollection_AsciiString& mainform,Standard_Boolean& hasrange,TCollection_AsciiString& forminrange,Standard_Real& rangemin,Standard_Real& rangemax) const;
|
||||||
|
//! Sets the Floatting Formats of IGESWriter to the recorded <br>
|
||||||
|
//! parameters <br>
|
||||||
|
Standard_EXPORT void Perform(IFSelect_ContextWrite& ctx,IGESData_IGESWriter& writer) const;
|
||||||
|
//! Returns specific Label : for instance, <br>
|
||||||
|
//! "Float Format [ZeroSuppress] %E [, in range R1-R2 %f]" <br>
|
||||||
|
Standard_EXPORT TCollection_AsciiString Label() const;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESSelect_FloatFormat)
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Standard_Boolean thezerosup;
|
||||||
|
TCollection_AsciiString themainform;
|
||||||
|
TCollection_AsciiString theformrange;
|
||||||
|
Standard_Real therangemin;
|
||||||
|
Standard_Real therangemax;
|
||||||
|
};
|
||||||
|
#endif
|
57
src/IGESSelect/IGESSelect_ModelModifier.cdl
Normal file
57
src/IGESSelect/IGESSelect_ModelModifier.cdl
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
-- Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||||
|
--
|
||||||
|
-- The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
-- License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
-- except in compliance with the License. Please obtain a copy of the License
|
||||||
|
-- at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
--
|
||||||
|
-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
--
|
||||||
|
-- The Original Code and all software distributed under the License is
|
||||||
|
-- distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
-- Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
-- limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
-- purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
-- and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
deferred class ModelModifier from IGESSelect inherits Modifier from IFSelect
|
||||||
|
uses CString,
|
||||||
|
InterfaceModel,
|
||||||
|
Protocol from Interface,
|
||||||
|
Protocol from IGESData,
|
||||||
|
IGESModel from IGESData,
|
||||||
|
CopyTool from Interface,
|
||||||
|
ContextModif
|
||||||
|
|
||||||
|
is
|
||||||
|
Initialize(mayChangeGraph : Boolean);
|
||||||
|
---Purpose : Calls inherited Initialize, transmits to it the information
|
||||||
|
-- <mayChangeGraph>
|
||||||
|
|
||||||
|
Perform (me; theContext : in out ContextModif from IFSelect;
|
||||||
|
theTarget : mutable InterfaceModel from Interface;
|
||||||
|
theProtocol : Protocol from Interface;
|
||||||
|
theCopyTool : in out CopyTool from Interface);
|
||||||
|
---Purpose : The inherited Perform does the required cast (and refuses to
|
||||||
|
-- go further if cast has failed) then calls the instantiated
|
||||||
|
-- Performing
|
||||||
|
|
||||||
|
PerformProtocol (me; theContext : in out ContextModif from IFSelect;
|
||||||
|
theTarget : mutable IGESModel from IGESData;
|
||||||
|
theProtocol : Protocol from IGESData;
|
||||||
|
theCopyTool : in out CopyTool from Interface) is virtual;
|
||||||
|
---Purpose : Specific Perform with Protocol. It is defined to let the
|
||||||
|
-- Protocol unused and to call Performing without Protocol
|
||||||
|
-- (most current case). It can be redefined if specific action
|
||||||
|
-- requires Protocol.
|
||||||
|
|
||||||
|
Performing (me; theContext : in out ContextModif from IFSelect;
|
||||||
|
theTarget : mutable IGESModel from IGESData;
|
||||||
|
theCopyTool : in out CopyTool from Interface) is deferred;
|
||||||
|
---Purpose : Specific Perform, without Protocol. If Performing with
|
||||||
|
-- Protocol is redefined, Performing without Protocol must
|
||||||
|
-- though be defined to do nothing (not called, but demanded
|
||||||
|
-- by the linker)
|
||||||
|
|
||||||
|
end ModelModifier;
|
56
src/IGESSelect/IGESSelect_ModelModifier.cxx
Normal file
56
src/IGESSelect/IGESSelect_ModelModifier.cxx
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#include <IFSelect_ContextModif.hxx>
|
||||||
|
#include <Interface_Check.hxx>
|
||||||
|
#include <IGESSelect_ModelModifier.hxx>
|
||||||
|
#include <IGESData_IGESModel.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_HANDLE(IGESSelect_ModelModifier, IFSelect_Modifier)
|
||||||
|
IMPLEMENT_STANDARD_RTTIEXT(IGESSelect_ModelModifier, IFSelect_Modifier)
|
||||||
|
|
||||||
|
IGESSelect_ModelModifier::IGESSelect_ModelModifier (const Standard_Boolean mayChangeGraph)
|
||||||
|
: IFSelect_Modifier (mayChangeGraph)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void IGESSelect_ModelModifier::Perform
|
||||||
|
(IFSelect_ContextModif& theContext,
|
||||||
|
const Handle(Interface_InterfaceModel)& theTarget,
|
||||||
|
const Handle(Interface_Protocol)& theProtocol,
|
||||||
|
Interface_CopyTool& theCopyTool) const
|
||||||
|
{
|
||||||
|
theContext.TraceModifier(this);
|
||||||
|
Handle(IGESData_IGESModel) aTarget = Handle(IGESData_IGESModel)::DownCast(theTarget);
|
||||||
|
Handle(IGESData_Protocol) aProtocol
|
||||||
|
= Handle(IGESData_Protocol)::DownCast(theProtocol);
|
||||||
|
if (aTarget.IsNull())
|
||||||
|
{
|
||||||
|
theContext.CCheck()->AddFail("Model to Modify : unproper type");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
PerformProtocol (theContext,aTarget,aProtocol,theCopyTool);
|
||||||
|
}
|
||||||
|
|
||||||
|
void IGESSelect_ModelModifier::PerformProtocol
|
||||||
|
(IFSelect_ContextModif& theContext,
|
||||||
|
const Handle(IGESData_IGESModel)& theTarget,
|
||||||
|
const Handle(IGESData_Protocol)& theProtocol,
|
||||||
|
Interface_CopyTool& theCopyTool) const
|
||||||
|
{
|
||||||
|
theContext.SetProtocol(theProtocol);
|
||||||
|
Performing (theContext,theTarget,theCopyTool);
|
||||||
|
}
|
@ -23,10 +23,10 @@ uses
|
|||||||
|
|
||||||
Standard,
|
Standard,
|
||||||
TCollection,
|
TCollection,
|
||||||
TColStd,
|
TColStd,
|
||||||
TColgp,
|
TColgp,
|
||||||
gp,
|
gp,
|
||||||
Message,
|
Message,
|
||||||
Interface,
|
Interface,
|
||||||
IGESData,
|
IGESData,
|
||||||
IGESBasic,
|
IGESBasic,
|
||||||
|
@ -27,10 +27,11 @@ class Loop from IGESSolid inherits IGESEntity
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
|
|
||||||
HArray1OfIGESEntity from IGESData,
|
HArray1OfIGESEntity from IGESData,
|
||||||
HArray1OfInteger from TColStd,
|
HArray1OfInteger from TColStd,
|
||||||
HArray1OfHArray1OfInteger from IGESBasic,
|
HArray1OfHArray1OfInteger from IGESBasic,
|
||||||
HArray1OfHArray1OfIGESEntity from IGESBasic
|
HArray1OfHArray1OfInteger_Handle from IGESBasic,
|
||||||
|
HArray1OfHArray1OfIGESEntity_Handle from IGESBasic
|
||||||
|
|
||||||
raises DimensionMismatch, OutOfRange
|
raises DimensionMismatch, OutOfRange
|
||||||
|
|
||||||
@ -46,8 +47,8 @@ is
|
|||||||
index : HArray1OfInteger;
|
index : HArray1OfInteger;
|
||||||
orient : HArray1OfInteger;
|
orient : HArray1OfInteger;
|
||||||
nbParameterCurves : HArray1OfInteger;
|
nbParameterCurves : HArray1OfInteger;
|
||||||
isoparametricFlags : HArray1OfHArray1OfInteger;
|
isoparametricFlags : HArray1OfHArray1OfInteger_Handle;
|
||||||
curves : HArray1OfHArray1OfIGESEntity from
|
curves : HArray1OfHArray1OfIGESEntity_Handle from
|
||||||
IGESBasic)
|
IGESBasic)
|
||||||
raises DimensionMismatch;
|
raises DimensionMismatch;
|
||||||
---Purpose : This method is used to set the fields of the class Loop
|
---Purpose : This method is used to set the fields of the class Loop
|
||||||
@ -143,10 +144,10 @@ fields
|
|||||||
theNbParameterCurves : HArray1OfInteger;
|
theNbParameterCurves : HArray1OfInteger;
|
||||||
-- no. of underlying parameter space curves
|
-- no. of underlying parameter space curves
|
||||||
|
|
||||||
theIsoparametricFlags : HArray1OfHArray1OfInteger;
|
theIsoparametricFlags : HArray1OfHArray1OfInteger_Handle;
|
||||||
-- Isoparametric flags of the space curves
|
-- Isoparametric flags of the space curves
|
||||||
|
|
||||||
theCurves : HArray1OfHArray1OfIGESEntity
|
theCurves : HArray1OfHArray1OfIGESEntity_Handle
|
||||||
from IGESBasic;
|
from IGESBasic;
|
||||||
-- parameter space curves corresponding to the edges
|
-- parameter space curves corresponding to the edges
|
||||||
|
|
||||||
|
@ -1 +1,5 @@
|
|||||||
|
IGESToBRep_Actor.hxx
|
||||||
|
IGESToBRep_Actor.cxx
|
||||||
|
IGESToBRep_Reader.hxx
|
||||||
|
IGESToBRep_Reader.cxx
|
||||||
project.pxx
|
project.pxx
|
||||||
|
@ -50,8 +50,8 @@ is
|
|||||||
class BRepEntity;
|
class BRepEntity;
|
||||||
|
|
||||||
class IGESBoundary;
|
class IGESBoundary;
|
||||||
class Reader;
|
imported Reader;
|
||||||
class Actor;
|
imported Actor;
|
||||||
class AlgoContainer;
|
class AlgoContainer;
|
||||||
class ToolContainer;
|
class ToolContainer;
|
||||||
|
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
-- Created on: 1994-11-03
|
|
||||||
-- Created by: Marie Jose MARTZ
|
|
||||||
-- 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 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 Actor from IGESToBRep
|
|
||||||
inherits ActorOfTransientProcess from Transfer
|
|
||||||
|
|
||||||
---Purpose : This class performs the transfer of an Entity from
|
|
||||||
-- IGESToBRep
|
|
||||||
--
|
|
||||||
-- I.E. for each type of Entity, it invokes the appropriate Tool
|
|
||||||
-- then returns the Binder which contains the Result
|
|
||||||
|
|
||||||
uses TransientProcess, Binder, InterfaceModel from Interface
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns mutable Actor from IGESToBRep;
|
|
||||||
|
|
||||||
SetModel (me : mutable; model : InterfaceModel from Interface);
|
|
||||||
|
|
||||||
SetContinuity (me : mutable; continuity : Integer from Standard = 0);
|
|
||||||
---Purpose By default continuity = 0
|
|
||||||
-- if continuity = 1 : try C1
|
|
||||||
-- if continuity = 2 : try C2
|
|
||||||
|
|
||||||
GetContinuity (me) returns Integer from Standard;
|
|
||||||
---Purpose : Return "thecontinuity"
|
|
||||||
|
|
||||||
Recognize (me : mutable; start : Transient) returns Boolean is redefined;
|
|
||||||
|
|
||||||
Transfer (me : mutable; start : Transient; TP : mutable TransientProcess)
|
|
||||||
returns mutable Binder is redefined;
|
|
||||||
|
|
||||||
UsedTolerance (me) returns Real;
|
|
||||||
---Purpose : Returns the tolerance which was actually used, either from
|
|
||||||
-- the file or from statics
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
themodel : InterfaceModel from Interface;
|
|
||||||
thecontinuity : Integer;
|
|
||||||
theeps : Real;
|
|
||||||
|
|
||||||
end Actor;
|
|
@ -11,7 +11,8 @@
|
|||||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||||
// commercial license or contractual agreement.
|
// commercial license or contractual agreement.
|
||||||
|
|
||||||
#include <IGESToBRep_Actor.ixx>
|
#include <IGESToBRep_Actor.hxx>
|
||||||
|
#include <Standard_Type.hxx>
|
||||||
#include <IGESToBRep.hxx>
|
#include <IGESToBRep.hxx>
|
||||||
#include <IGESData_IGESEntity.hxx>
|
#include <IGESData_IGESEntity.hxx>
|
||||||
#include <IGESData_IGESModel.hxx>
|
#include <IGESData_IGESModel.hxx>
|
||||||
@ -24,12 +25,11 @@
|
|||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <ShapeExtend_Explorer.hxx>
|
#include <ShapeExtend_Explorer.hxx>
|
||||||
#include <ShapeFix_ShapeTolerance.hxx>
|
#include <ShapeFix_ShapeTolerance.hxx>
|
||||||
|
#include <Interface_InterfaceModel.hxx>
|
||||||
#include <Interface_Macros.hxx>
|
#include <Interface_Macros.hxx>
|
||||||
#include <Interface_Static.hxx>
|
#include <Interface_Static.hxx>
|
||||||
|
|
||||||
#include <Message_ProgressSentry.hxx>
|
#include <Message_ProgressSentry.hxx>
|
||||||
|
#include <Standard_Transient.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TransferBRep.hxx>
|
#include <TransferBRep.hxx>
|
||||||
#include <TransferBRep_ShapeBinder.hxx>
|
#include <TransferBRep_ShapeBinder.hxx>
|
||||||
@ -37,6 +37,19 @@
|
|||||||
#include <XSAlgo.hxx>
|
#include <XSAlgo.hxx>
|
||||||
#include <XSAlgo_AlgoContainer.hxx>
|
#include <XSAlgo_AlgoContainer.hxx>
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_TYPE(IGESToBRep_Actor)
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY()
|
||||||
|
STANDARD_TYPE(Transfer_ActorOfTransientProcess),
|
||||||
|
STANDARD_TYPE(MMgt_TShared),
|
||||||
|
STANDARD_TYPE(Standard_Transient),
|
||||||
|
|
||||||
|
IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END()
|
||||||
|
IMPLEMENT_STANDARD_TYPE_END(IGESToBRep_Actor)
|
||||||
|
|
||||||
|
|
||||||
|
IMPLEMENT_DOWNCAST(IGESToBRep_Actor,Standard_Transient)
|
||||||
|
IMPLEMENT_STANDARD_RTTI(IGESToBRep_Actor)
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IGESToBRep_Actor
|
//function : IGESToBRep_Actor
|
||||||
//purpose :
|
//purpose :
|
||||||
|
83
src/IGESToBRep/IGESToBRep_Actor.hxx
Normal file
83
src/IGESToBRep/IGESToBRep_Actor.hxx
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESToBRep_Actor_HeaderFile
|
||||||
|
#define _IGESToBRep_Actor_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineHandle.hxx>
|
||||||
|
#include <Handle_Interface_InterfaceModel.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <Handle_Standard_Transient.hxx>
|
||||||
|
#include <Handle_Transfer_Binder.hxx>
|
||||||
|
#include <Transfer_TransientProcess.hxx>
|
||||||
|
|
||||||
|
class Interface_InterfaceModel;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Transfer_Binder;
|
||||||
|
class Transfer_TransientProcess;
|
||||||
|
class Standard_Transient;
|
||||||
|
class Handle(Standard_Type);
|
||||||
|
class Handle(Transfer_ActorOfTransientProcess);
|
||||||
|
class IGESToBRep_Actor;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_HANDLE(IGESToBRep_Actor,Transfer_ActorOfTransientProcess)
|
||||||
|
|
||||||
|
//! This class performs the transfer of an Entity from <br>
|
||||||
|
//! IGESToBRep <br>
|
||||||
|
//! <br>
|
||||||
|
//! I.E. for each type of Entity, it invokes the appropriate Tool <br>
|
||||||
|
//! then returns the Binder which contains the Result <br>
|
||||||
|
class IGESToBRep_Actor : public Transfer_ActorOfTransientProcess {
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
Standard_EXPORT IGESToBRep_Actor();
|
||||||
|
|
||||||
|
Standard_EXPORT void SetModel(const Handle(Interface_InterfaceModel)& model) ;
|
||||||
|
//!---Purpose By default continuity = 0 <br>
|
||||||
|
//! if continuity = 1 : try C1 <br>
|
||||||
|
//! if continuity = 2 : try C2 <br>
|
||||||
|
Standard_EXPORT void SetContinuity(const Standard_Integer continuity = 0);
|
||||||
|
|
||||||
|
//! Return "thecontinuity" <br>
|
||||||
|
Standard_EXPORT Standard_Integer GetContinuity() const;
|
||||||
|
|
||||||
|
Standard_EXPORT virtual Standard_Boolean Recognize(const Handle(Standard_Transient)& start);
|
||||||
|
|
||||||
|
Standard_EXPORT virtual Handle_Transfer_Binder Transfer(const Handle(Standard_Transient)& start,
|
||||||
|
const Handle(Transfer_TransientProcess)& TP);
|
||||||
|
|
||||||
|
//! Returns the tolerance which was actually used, either from <br>
|
||||||
|
//! the file or from statics <br>
|
||||||
|
Standard_EXPORT Standard_Real UsedTolerance() const;
|
||||||
|
|
||||||
|
DEFINE_STANDARD_RTTI(IGESToBRep_Actor)
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
Handle_Interface_InterfaceModel themodel;
|
||||||
|
Standard_Integer thecontinuity;
|
||||||
|
Standard_Real theeps;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
@ -27,7 +27,7 @@ uses
|
|||||||
IGESEntity from IGESData,
|
IGESEntity from IGESData,
|
||||||
IGESModel from IGESData,
|
IGESModel from IGESData,
|
||||||
CString from Standard,
|
CString from Standard,
|
||||||
TransientProcess from Transfer,
|
TransientProcess_Handle from Transfer,
|
||||||
Surface from Geom,
|
Surface from Geom,
|
||||||
Msg from Message
|
Msg from Message
|
||||||
is
|
is
|
||||||
@ -155,11 +155,11 @@ is
|
|||||||
---C++: inline
|
---C++: inline
|
||||||
---Purpose: Returns the value of "myContinuity"
|
---Purpose: Returns the value of "myContinuity"
|
||||||
|
|
||||||
SetTransferProcess(me: in out; TP: TransientProcess from Transfer);
|
SetTransferProcess(me: in out; TP: TransientProcess_Handle from Transfer);
|
||||||
---C++: inline
|
---C++: inline
|
||||||
---Purpose: Set the value of "myMsgReg"
|
---Purpose: Set the value of "myMsgReg"
|
||||||
|
|
||||||
GetTransferProcess(me) returns TransientProcess from Transfer;
|
GetTransferProcess(me) returns TransientProcess_Handle from Transfer;
|
||||||
---C++: inline
|
---C++: inline
|
||||||
---Purpose: Returns the value of "myMsgReg"
|
---Purpose: Returns the value of "myMsgReg"
|
||||||
|
|
||||||
@ -240,6 +240,6 @@ fields
|
|||||||
|
|
||||||
|
|
||||||
myModel : IGESModel from IGESData ;
|
myModel : IGESModel from IGESData ;
|
||||||
myTP : TransientProcess from Transfer;
|
myTP : TransientProcess_Handle from Transfer;
|
||||||
|
|
||||||
end CurveAndSurface;
|
end CurveAndSurface;
|
||||||
|
@ -1,108 +0,0 @@
|
|||||||
-- Created on: 1994-09-01
|
|
||||||
-- Created by: Marie Jose MARTZ
|
|
||||||
-- 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 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 Reader from IGESToBRep
|
|
||||||
|
|
||||||
---Purpose : A simple way to read geometric IGES data.
|
|
||||||
-- Encapsulates reading file and calling transfer tools
|
|
||||||
|
|
||||||
uses
|
|
||||||
IGESModel from IGESData,
|
|
||||||
ShareFlags from Interface,
|
|
||||||
TransientProcess from Transfer,
|
|
||||||
Shape from TopoDS,
|
|
||||||
SequenceOfShape from TopTools,
|
|
||||||
Actor from IGESToBRep
|
|
||||||
|
|
||||||
is
|
|
||||||
|
|
||||||
Create returns Reader;
|
|
||||||
---Purpose : Creates a Reader
|
|
||||||
|
|
||||||
LoadFile (me : in out; filename : CString) returns Integer;
|
|
||||||
---Purpose : Loads a Model from a file.Returns 0 if success.
|
|
||||||
-- returns 1 if the file could not be opened,
|
|
||||||
-- returns -1 if an error occurred while the file was being loaded.
|
|
||||||
|
|
||||||
SetModel (me : in out; model : IGESModel);
|
|
||||||
---Purpose : Specifies a Model to work on
|
|
||||||
-- Also clears the result and Done status, sets TransientProcess
|
|
||||||
|
|
||||||
Model (me) returns IGESModel;
|
|
||||||
---Purpose : Returns the Model to be worked on.
|
|
||||||
|
|
||||||
SetTransientProcess (me : in out; TP : mutable TransientProcess);
|
|
||||||
---Purpose : Allows to set an already defined TransientProcess
|
|
||||||
-- (to be called after LoadFile or SetModel)
|
|
||||||
|
|
||||||
TransientProcess (me) returns TransientProcess;
|
|
||||||
---Purpose : Returns the TransientProcess
|
|
||||||
|
|
||||||
Actor (me) returns Actor from IGESToBRep;
|
|
||||||
---Purpose : Returns "theActor"
|
|
||||||
|
|
||||||
Clear (me : in out);
|
|
||||||
---Purpose : Clears the results between two translation operations.
|
|
||||||
|
|
||||||
Check (me; withprint : Boolean) returns Boolean;
|
|
||||||
---Purpose : Checks the IGES file that was
|
|
||||||
-- loaded into memory. Displays error messages in the default
|
|
||||||
-- message file if withprint is true. Returns True if no fail
|
|
||||||
-- message was found and False if there was at least one fail message.
|
|
||||||
|
|
||||||
TransferRoots (me : in out; onlyvisible : Boolean = Standard_True);
|
|
||||||
---Purpose : Translates root entities in an
|
|
||||||
-- IGES file. Standard_True is the default value and means that only
|
|
||||||
-- visible root entities are translated. Standard_False
|
|
||||||
-- translates all of the roots (visible and invisible).
|
|
||||||
|
|
||||||
Transfer (me : in out; num : Integer) returns Boolean;
|
|
||||||
---Purpose : Transfers an Entity given its rank in the Model (Root or not)
|
|
||||||
-- Returns True if it is recognized as Geom-Topol.
|
|
||||||
-- (But it can have failed : see IsDone)
|
|
||||||
|
|
||||||
IsDone (me) returns Boolean;
|
|
||||||
---Purpose : Returns True if the LAST Transfer/TransferRoots was a success
|
|
||||||
|
|
||||||
UsedTolerance (me) returns Real;
|
|
||||||
---Purpose : Returns the Tolerance which has been actually used, converted
|
|
||||||
-- in millimeters
|
|
||||||
-- (either that from File or that from Session, according the mode)
|
|
||||||
|
|
||||||
NbShapes (me) returns Integer;
|
|
||||||
---Purpose : Returns the number of shapes produced by the translation.
|
|
||||||
|
|
||||||
Shape (me; num : Integer = 1) returns Shape from TopoDS;
|
|
||||||
---Purpose : Returns the num the resulting shape in a translation operation.
|
|
||||||
|
|
||||||
OneShape (me) returns Shape from TopoDS;
|
|
||||||
---Purpose : Returns all of the results in a
|
|
||||||
-- single shape which is:
|
|
||||||
-- - a null shape if there are no results,
|
|
||||||
-- - a shape if there is one result,
|
|
||||||
-- - a compound containing the resulting shapes if there are several.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fields
|
|
||||||
|
|
||||||
theModel : IGESModel from IGESData;
|
|
||||||
theDone : Boolean;
|
|
||||||
theShapes : SequenceOfShape from TopTools;
|
|
||||||
theActor : Actor from IGESToBRep;
|
|
||||||
theProc : TransientProcess from Transfer;
|
|
||||||
|
|
||||||
end Reader;
|
|
@ -15,23 +15,19 @@
|
|||||||
//#70 rln 03.03.99 syntax correction
|
//#70 rln 03.03.99 syntax correction
|
||||||
// sln 11.06.2002 OCC448 : Initialize "read.onlyvisiable" parameter to control transfering invisiable sub entities which logicaly depend on the grouping entities
|
// sln 11.06.2002 OCC448 : Initialize "read.onlyvisiable" parameter to control transfering invisiable sub entities which logicaly depend on the grouping entities
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <IGESToBRep_Reader.ixx>
|
#include <IGESToBRep_Reader.hxx>
|
||||||
#include <Standard_ErrorHandler.hxx>
|
#include <Standard_ErrorHandler.hxx>
|
||||||
#include <Standard_Failure.hxx>
|
#include <Standard_Failure.hxx>
|
||||||
#include <OSD_Timer.hxx>
|
#include <OSD_Timer.hxx>
|
||||||
|
|
||||||
#include <gp_Trsf.hxx>
|
#include <gp_Trsf.hxx>
|
||||||
|
|
||||||
#include <TopAbs.hxx>
|
#include <TopAbs.hxx>
|
||||||
#include <TopoDS_Compound.hxx>
|
#include <TopoDS_Compound.hxx>
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepLib.hxx>
|
#include <BRepLib.hxx>
|
||||||
#include <BRepTools_Modifier.hxx>
|
#include <BRepTools_Modifier.hxx>
|
||||||
|
|
||||||
#include <Message_Msg.hxx>
|
#include <Message_Msg.hxx>
|
||||||
#include <Message_Messenger.hxx>
|
#include <Message_Messenger.hxx>
|
||||||
|
|
||||||
#include <IGESFile_Read.hxx>
|
#include <IGESFile_Read.hxx>
|
||||||
#include <IGESData_FileProtocol.hxx>
|
#include <IGESData_FileProtocol.hxx>
|
||||||
#include <IGESData_GlobalSection.hxx>
|
#include <IGESData_GlobalSection.hxx>
|
||||||
@ -40,22 +36,17 @@
|
|||||||
#include <IGESSolid_Protocol.hxx>
|
#include <IGESSolid_Protocol.hxx>
|
||||||
#include <IGESAppli.hxx>
|
#include <IGESAppli.hxx>
|
||||||
#include <IGESAppli_Protocol.hxx>
|
#include <IGESAppli_Protocol.hxx>
|
||||||
|
|
||||||
#include <Interface_Macros.hxx>
|
#include <Interface_Macros.hxx>
|
||||||
#include <Interface_CheckTool.hxx>
|
#include <Interface_CheckTool.hxx>
|
||||||
#include <Interface_CheckIterator.hxx>
|
#include <Interface_CheckIterator.hxx>
|
||||||
#include <Interface_ShareFlags.hxx>
|
#include <Interface_ShareFlags.hxx>
|
||||||
#include <Interface_Static.hxx>
|
#include <Interface_Static.hxx>
|
||||||
#include <Interface_Check.hxx>
|
#include <Interface_Check.hxx>
|
||||||
|
|
||||||
#include <IGESToBRep.hxx>
|
#include <IGESToBRep.hxx>
|
||||||
#include <IGESToBRep_Actor.hxx>
|
#include <IGESToBRep_Actor.hxx>
|
||||||
#include <IGESToBRep_CurveAndSurface.hxx>
|
#include <IGESToBRep_CurveAndSurface.hxx>
|
||||||
|
|
||||||
//#include <ShapeCustom.hxx>
|
|
||||||
#include <ShapeExtend_Explorer.hxx>
|
#include <ShapeExtend_Explorer.hxx>
|
||||||
#include <ShapeFix_ShapeTolerance.hxx>
|
#include <ShapeFix_ShapeTolerance.hxx>
|
||||||
|
|
||||||
#include <Transfer_TransferOutput.hxx>
|
#include <Transfer_TransferOutput.hxx>
|
||||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||||
#include <TransferBRep.hxx>
|
#include <TransferBRep.hxx>
|
||||||
@ -63,10 +54,10 @@
|
|||||||
#include <TransferBRep_ShapeListBinder.hxx>
|
#include <TransferBRep_ShapeListBinder.hxx>
|
||||||
#include <XSAlgo.hxx>
|
#include <XSAlgo.hxx>
|
||||||
#include <XSAlgo_AlgoContainer.hxx>
|
#include <XSAlgo_AlgoContainer.hxx>
|
||||||
|
|
||||||
#include <ShapeAlgo.hxx>
|
#include <ShapeAlgo.hxx>
|
||||||
#include <ShapeAlgo_AlgoContainer.hxx>
|
#include <ShapeAlgo_AlgoContainer.hxx>
|
||||||
#include <Message_ProgressSentry.hxx>
|
#include <Message_ProgressSentry.hxx>
|
||||||
|
#include <IGESData_IGESModel.hxx>
|
||||||
|
|
||||||
#ifdef WNT
|
#ifdef WNT
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
120
src/IGESToBRep/IGESToBRep_Reader.hxx
Normal file
120
src/IGESToBRep/IGESToBRep_Reader.hxx
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
// Copyright (c) 2013 OPEN CASCADE SAS
|
||||||
|
//
|
||||||
|
// The content of this file is subject to the Open CASCADE Technology Public
|
||||||
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||||
|
// except in compliance with the License. Please obtain a copy of the License
|
||||||
|
// at http://www.opencascade.org and read it completely before using this file.
|
||||||
|
//
|
||||||
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||||
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||||
|
//
|
||||||
|
// The Original Code and all software distributed under the License is
|
||||||
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||||
|
// Initial Developer hereby disclaims all such warranties, including without
|
||||||
|
// limitation, any warranties of merchantability, fitness for a particular
|
||||||
|
// purpose or non-infringement. Please see the License for the specific terms
|
||||||
|
// and conditions governing the rights and limitations under the License.
|
||||||
|
|
||||||
|
#ifndef _IGESToBRep_Reader_HeaderFile
|
||||||
|
#define _IGESToBRep_Reader_HeaderFile
|
||||||
|
|
||||||
|
#include <Standard.hxx>
|
||||||
|
#include <Standard_DefineAlloc.hxx>
|
||||||
|
#include <Standard_Macro.hxx>
|
||||||
|
#include <Handle_IGESData_IGESModel.hxx>
|
||||||
|
#include <Standard_Boolean.hxx>
|
||||||
|
#include <TopTools_SequenceOfShape.hxx>
|
||||||
|
#include <IGESToBRep_Actor.hxx>
|
||||||
|
#include <Transfer_TransientProcess.hxx>
|
||||||
|
#include <Standard_Integer.hxx>
|
||||||
|
#include <Standard_CString.hxx>
|
||||||
|
#include <Standard_Real.hxx>
|
||||||
|
|
||||||
|
class IGESData_IGESModel;
|
||||||
|
class TopoDS_Shape;
|
||||||
|
|
||||||
|
|
||||||
|
//! A simple way to read geometric IGES data. <br>
|
||||||
|
//! Encapsulates reading file and calling transfer tools <br>
|
||||||
|
class IGESToBRep_Reader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
DEFINE_STANDARD_ALLOC
|
||||||
|
|
||||||
|
//! Creates a Reader <br>
|
||||||
|
Standard_EXPORT IGESToBRep_Reader();
|
||||||
|
|
||||||
|
//! Loads a Model from a file.Returns 0 if success. <br>
|
||||||
|
//! returns 1 if the file could not be opened, <br>
|
||||||
|
//! returns -1 if an error occurred while the file was being loaded. <br>
|
||||||
|
Standard_EXPORT Standard_Integer LoadFile(const Standard_CString filename);
|
||||||
|
|
||||||
|
//! Specifies a Model to work on <br>
|
||||||
|
//! Also clears the result and Done status, sets TransientProcess <br>
|
||||||
|
Standard_EXPORT void SetModel(const Handle(IGESData_IGESModel)& model);
|
||||||
|
|
||||||
|
//! Returns the Model to be worked on. <br>
|
||||||
|
Standard_EXPORT Handle(IGESData_IGESModel) Model() const;
|
||||||
|
|
||||||
|
//! Allows to set an already defined TransientProcess <br>
|
||||||
|
//! (to be called after LoadFile or SetModel) <br>
|
||||||
|
Standard_EXPORT void SetTransientProcess(const Handle(Transfer_TransientProcess)& TP);
|
||||||
|
|
||||||
|
//! Returns the TransientProcess <br>
|
||||||
|
Standard_EXPORT Transfer_TransientProcess_Handle TransientProcess() const;
|
||||||
|
|
||||||
|
//! Returns "theActor" <br>
|
||||||
|
Standard_EXPORT Handle(IGESToBRep_Actor) Actor() const;
|
||||||
|
|
||||||
|
//! Clears the results between two translation operations. <br>
|
||||||
|
Standard_EXPORT void Clear();
|
||||||
|
|
||||||
|
//! Checks the IGES file that was <br>
|
||||||
|
//! loaded into memory. Displays error messages in the default <br>
|
||||||
|
//! message file if withprint is true. Returns True if no fail <br>
|
||||||
|
//! message was found and False if there was at least one fail message. <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Check(const Standard_Boolean withprint) const;
|
||||||
|
|
||||||
|
//! Translates root entities in an <br>
|
||||||
|
//! IGES file. Standard_True is the default value and means that only <br>
|
||||||
|
//! visible root entities are translated. Standard_False <br>
|
||||||
|
//! translates all of the roots (visible and invisible). <br>
|
||||||
|
Standard_EXPORT void TransferRoots(const Standard_Boolean onlyvisible = Standard_True);
|
||||||
|
|
||||||
|
//! Transfers an Entity given its rank in the Model (Root or not) <br>
|
||||||
|
//! Returns True if it is recognized as Geom-Topol. <br>
|
||||||
|
//! (But it can have failed : see IsDone) <br>
|
||||||
|
Standard_EXPORT Standard_Boolean Transfer(const Standard_Integer num);
|
||||||
|
|
||||||
|
//! Returns True if the LAST Transfer/TransferRoots was a success <br>
|
||||||
|
Standard_EXPORT Standard_Boolean IsDone() const;
|
||||||
|
|
||||||
|
//! Returns the Tolerance which has been actually used, converted <br>
|
||||||
|
//! in millimeters <br>
|
||||||
|
//! (either that from File or that from Session, according the mode) <br>
|
||||||
|
Standard_EXPORT Standard_Real UsedTolerance() const;
|
||||||
|
|
||||||
|
//! Returns the number of shapes produced by the translation. <br>
|
||||||
|
Standard_EXPORT Standard_Integer NbShapes() const;
|
||||||
|
|
||||||
|
//! Returns the num the resulting shape in a translation operation. <br>
|
||||||
|
Standard_EXPORT TopoDS_Shape Shape(const Standard_Integer num = 1) const;
|
||||||
|
|
||||||
|
//! Returns all of the results in a <br>
|
||||||
|
//! single shape which is: <br>
|
||||||
|
//! - a null shape if there are no results, <br>
|
||||||
|
//! - a shape if there is one result, <br>
|
||||||
|
//! - a compound containing the resulting shapes if there are several. <br>
|
||||||
|
Standard_EXPORT TopoDS_Shape OneShape() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
Handle(IGESData_IGESModel) theModel;
|
||||||
|
Standard_Boolean theDone;
|
||||||
|
TopTools_SequenceOfShape theShapes;
|
||||||
|
Handle(IGESToBRep_Actor) theActor;
|
||||||
|
Handle(Transfer_TransientProcess) theProc;
|
||||||
|
|
||||||
|
};
|
||||||
|
#endif
|
@ -7,3 +7,9 @@ Interface_Translates.hxx
|
|||||||
Interface_StaticStandards.cxx
|
Interface_StaticStandards.cxx
|
||||||
Interface_Version.hxx
|
Interface_Version.hxx
|
||||||
Interface_VectorOfFileParameter.hxx
|
Interface_VectorOfFileParameter.hxx
|
||||||
|
Interface_JaggedArray.hxx
|
||||||
|
Interface_Recognizer.hxx
|
||||||
|
Interface_ReaderLib.hxx
|
||||||
|
Interface_ReaderLib.cxx
|
||||||
|
Interface_GeneralLib.hxx
|
||||||
|
Interface_GeneralLib.cxx
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user