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

0024002: Overall code and build procedure refactoring -- automatic

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

15
src/IGESControl/FILES Normal file
View File

@@ -0,0 +1,15 @@
IGESControl_ActorWrite.cxx
IGESControl_ActorWrite.hxx
IGESControl_AlgoContainer.cxx
IGESControl_AlgoContainer.hxx
IGESControl_Controller.cxx
IGESControl_Controller.hxx
IGESControl_IGESBoundary.cxx
IGESControl_IGESBoundary.hxx
IGESControl_Reader.cxx
IGESControl_Reader.hxx
IGESControl_Reader.lxx
IGESControl_ToolContainer.cxx
IGESControl_ToolContainer.hxx
IGESControl_Writer.cxx
IGESControl_Writer.hxx

View File

@@ -1,45 +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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
package IGESControl
---Purpose : This package provide external access and control to use IGES
-- See also IGESToBRep for reading IGES to Shapes
uses
TColStd,
Interface,
Transfer,
IFSelect,
XSControl,
IGESData,
TopoDS,
IGESToBRep,
ShapeExtend,
Message
is
class Controller;
class Writer;
class Reader;
class ActorWrite;
class IGESBoundary;
class AlgoContainer;
class ToolContainer;
end;

View File

@@ -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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class 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 : FinderProcess) returns Binder is redefined;
---Purpose : Transfers Shape to IGES Entities
--
-- ModeTrans may be : 0 -> groups of Faces
-- or 1 -> BRep
end ActorWrite;

View File

@@ -11,24 +11,27 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <IGESControl_ActorWrite.ixx>
#include <TransferBRep_ShapeMapper.hxx>
#include <Interface_Macros.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESData_IGESEntity.hxx>
#include <BRepToIGES_BREntity.hxx>
#include <BRepToIGESBRep_Entity.hxx>
#include <Transfer_TransientMapper.hxx>
#include <Transfer_SimpleBinderOfTransient.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
#include <GeomToIGES_GeomCurve.hxx>
#include <GeomToIGES_GeomSurface.hxx>
#include <IGESControl_ActorWrite.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_IGESModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>
#include <Standard_Type.hxx>
#include <Transfer_Binder.hxx>
#include <Transfer_Finder.hxx>
#include <Transfer_FinderProcess.hxx>
#include <Transfer_SimpleBinderOfTransient.hxx>
#include <Transfer_TransientMapper.hxx>
#include <TransferBRep_ShapeMapper.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
#include <Interface_Static.hxx>
IGESControl_ActorWrite::IGESControl_ActorWrite () { ModeTrans() = 0; }

View File

@@ -0,0 +1,74 @@
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_ActorWrite_HeaderFile
#define _IGESControl_ActorWrite_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Transfer_ActorOfFinderProcess.hxx>
#include <Standard_Boolean.hxx>
class Transfer_Finder;
class Transfer_Binder;
class Transfer_FinderProcess;
class IGESControl_ActorWrite;
DEFINE_STANDARD_HANDLE(IGESControl_ActorWrite, Transfer_ActorOfFinderProcess)
//! Actor to write Shape to IGES
class IGESControl_ActorWrite : public Transfer_ActorOfFinderProcess
{
public:
Standard_EXPORT IGESControl_ActorWrite();
//! Recognizes a ShapeMapper
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Transfer_Finder)& start) Standard_OVERRIDE;
//! Transfers Shape to IGES Entities
//!
//! ModeTrans may be : 0 -> groups of Faces
//! or 1 -> BRep
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer (const Handle(Transfer_Finder)& start, const Handle(Transfer_FinderProcess)& FP) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(IGESControl_ActorWrite,Transfer_ActorOfFinderProcess)
protected:
private:
};
#endif // _IGESControl_ActorWrite_HeaderFile

View File

@@ -1,25 +0,0 @@
-- Created on: 2000-02-08
-- Created by: data exchange team
-- 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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class AlgoContainer from IGESControl inherits AlgoContainer from IGESToBRep
---Purpose:
is
Create returns AlgoContainer from IGESControl;
---Purpose: Empty constructor
end AlgoContainer;

View File

@@ -13,14 +13,15 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <IGESControl_AlgoContainer.ixx>
#include <IGESControl_AlgoContainer.hxx>
#include <IGESControl_ToolContainer.hxx>
#include <Standard_Type.hxx>
//=======================================================================
//function : IGESControl_AlgoContainer
//purpose :
//=======================================================================
IGESControl_AlgoContainer::IGESControl_AlgoContainer():IGESToBRep_AlgoContainer()
{
SetToolContainer (new IGESControl_ToolContainer);

View File

@@ -0,0 +1,61 @@
// Created on: 2000-02-08
// Created by: data exchange team
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_AlgoContainer_HeaderFile
#define _IGESControl_AlgoContainer_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <IGESToBRep_AlgoContainer.hxx>
class IGESControl_AlgoContainer;
DEFINE_STANDARD_HANDLE(IGESControl_AlgoContainer, IGESToBRep_AlgoContainer)
class IGESControl_AlgoContainer : public IGESToBRep_AlgoContainer
{
public:
//! Empty constructor
Standard_EXPORT IGESControl_AlgoContainer();
DEFINE_STANDARD_RTTI(IGESControl_AlgoContainer,IGESToBRep_AlgoContainer)
protected:
private:
};
#endif // _IGESControl_AlgoContainer_HeaderFile

View File

@@ -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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class 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 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 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 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 : FinderProcess from Transfer;
model : 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;

View File

@@ -14,66 +14,65 @@
//#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
#include <IGESControl_Controller.ixx>
#include <IGESSelect_WorkLibrary.hxx>
#include <IGESToBRep_Actor.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESData_Protocol.hxx>
#include <IGESSolid.hxx>
#include <IGESAppli.hxx>
#include <Interface_Static.hxx>
#include <IGESSelect_AutoCorrect.hxx>
#include <IGESSelect_ComputeStatus.hxx>
#include <IGESSelect_UpdateFileName.hxx>
#include <IGESSelect_SetGlobalParameter.hxx>
#include <IGESSelect_FloatFormat.hxx>
#include <IGESSelect_SelectBypassGroup.hxx>
#include <IGESSelect_SelectBypassSubfigure.hxx>
#include <IGESSelect_SelectBasicGeom.hxx>
#include <IGESSelect_SelectFaces.hxx>
#include <IGESSelect_SelectPCurves.hxx>
#include <IGESSelect_SelectVisibleStatus.hxx>
#include <IGESSelect_SelectSubordinate.hxx>
#include <IFSelect_SelectType.hxx>
#include <IGESBasic_SubfigureDef.hxx>
#include <IGESSelect_IGESTypeForm.hxx>
#include <IGESSelect_SignStatus.hxx>
#include <IGESSelect_SignLevelNumber.hxx>
#include <IGESSelect_SignColor.hxx>
#include <IGESSelect_IGESName.hxx>
#include <IFSelect_SignType.hxx>
#include <IFSelect_SignMultiple.hxx>
#include <IGESSelect_CounterOfLevelNumber.hxx>
#include <IFSelect_SignCounter.hxx>
#include <IGESSelect_EditHeader.hxx>
#include <IGESSelect_EditDirPart.hxx>
#include <IFSelect_EditForm.hxx>
#include <IGESSelect_RemoveCurves.hxx>
#include <IGESSelect_SetLabel.hxx>
#include <TCollection_HAsciiString.hxx>
#include <IGESControl_ActorWrite.hxx>
#include <IGESControl_AlgoContainer.hxx>
#include <XSAlgo.hxx>
#include <Interface_Macros.hxx>
#include <IGESToBRep.hxx>
#include <IFSelect_SelectModelEntities.hxx>
#include <IFSelect_SelectModelEntities.hxx>
#include <IFSelect_SelectModelRoots.hxx>
#include <IFSelect_SelectType.hxx>
#include <IFSelect_SignCounter.hxx>
#include <IFSelect_SignMultiple.hxx>
#include <IFSelect_SignType.hxx>
#include <IGESAppli.hxx>
#include <IGESBasic_SubfigureDef.hxx>
#include <IGESControl_ActorWrite.hxx>
#include <IGESControl_AlgoContainer.hxx>
#include <IGESControl_Controller.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESData_Protocol.hxx>
#include <IGESSelect_AutoCorrect.hxx>
#include <IGESSelect_ComputeStatus.hxx>
#include <IGESSelect_CounterOfLevelNumber.hxx>
#include <IGESSelect_EditDirPart.hxx>
#include <IGESSelect_EditHeader.hxx>
#include <IGESSelect_FloatFormat.hxx>
#include <IGESSelect_IGESName.hxx>
#include <IGESSelect_IGESTypeForm.hxx>
#include <IGESSelect_RemoveCurves.hxx>
#include <IGESSelect_SelectBasicGeom.hxx>
#include <IGESSelect_SelectBypassGroup.hxx>
#include <IGESSelect_SelectBypassSubfigure.hxx>
#include <IGESSelect_SelectFaces.hxx>
#include <IGESSelect_SelectPCurves.hxx>
#include <IGESSelect_SelectSubordinate.hxx>
#include <IGESSelect_SelectVisibleStatus.hxx>
#include <IGESSelect_SetGlobalParameter.hxx>
#include <IGESSelect_SetLabel.hxx>
#include <IGESSelect_SignColor.hxx>
#include <IGESSelect_SignLevelNumber.hxx>
#include <IGESSelect_SignStatus.hxx>
#include <IGESSelect_UpdateFileName.hxx>
#include <IGESSelect_WorkLibrary.hxx>
#include <IGESSolid.hxx>
#include <IGESToBRep.hxx>
#include <IGESToBRep_Actor.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>
#include <Standard_Type.hxx>
#include <TCollection_HAsciiString.hxx>
#include <TopoDS_Shape.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <Transfer_FinderProcess.hxx>
#include <XSAlgo.hxx>
#include <XSControl_SelectForTransfer.hxx>
#include <XSControl_WorkSession.hxx>
//szv#4:S4163:12Mar99 never referenced
//static const Standard_CString thelong = "IGES";
//static const Standard_CString theshort = "iges";
//=======================================================================
//function : IGESControl_Controller
//purpose :
//=======================================================================
IGESControl_Controller::IGESControl_Controller (const Standard_Boolean mod)
//JR/Hp
: XSControl_Controller ((Standard_CString ) (mod ? "FNES" : "IGES") , (Standard_CString ) (mod ? "fnes" : "iges") ) ,

View File

@@ -0,0 +1,99 @@
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_Controller_HeaderFile
#define _IGESControl_Controller_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <Standard_Boolean.hxx>
#include <XSControl_Controller.hxx>
#include <IFSelect_ReturnStatus.hxx>
#include <Standard_Integer.hxx>
class Interface_InterfaceModel;
class Transfer_ActorOfTransientProcess;
class TopoDS_Shape;
class Transfer_FinderProcess;
class XSControl_WorkSession;
class IGESControl_Controller;
DEFINE_STANDARD_HANDLE(IGESControl_Controller, XSControl_Controller)
//! Controller for IGES-5.1
class IGESControl_Controller : public XSControl_Controller
{
public:
//! 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
Standard_EXPORT IGESControl_Controller(const Standard_Boolean modefnes = Standard_False);
//! Creates a new empty Model ready to receive data of the Norm.
//! It is taken from IGES Template Model
Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const;
//! Returns the Actor for Read attached to the pair (norm,appli)
//! It is an Actor from IGESToBRep, adapted from an IGESModel :
//! Unit, tolerances
Standard_EXPORT Handle(Transfer_ActorOfTransientProcess) ActorRead (const Handle(Interface_InterfaceModel)& model) const;
//! 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
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_OVERRIDE;
//! 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
Standard_EXPORT static Standard_Boolean Init();
Standard_EXPORT virtual void Customise (Handle(XSControl_WorkSession)& WS) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(IGESControl_Controller,XSControl_Controller)
protected:
private:
Standard_Boolean themode;
};
#endif // _IGESControl_Controller_HeaderFile

View File

@@ -1,65 +0,0 @@
-- Created on: 2000-02-05
-- Created by: data exchange team
-- 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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class IGESBoundary from IGESControl inherits IGESBoundary from IGESToBRep
---Purpose: Translates IGES boundary entity (types 141, 142 and 508)
-- in Advanced Data Exchange.
-- Redefines translation and treatment methods from inherited
-- open class IGESToBRep_IGESBoundary.
uses
IGESEntity from IGESData,
HArray1OfIGESEntity from IGESData,
CurveAndSurface from IGESToBRep,
WireData from ShapeExtend
is
Create returns IGESBoundary from IGESControl;
---Purpose: Creates an object and calls inherited constuctor.
Create (CS: CurveAndSurface from IGESToBRep) returns IGESBoundary from IGESControl;
---Purpose: Creates an object and calls inherited constuctor.
Check (me: mutable; result, checkclosure, okCurve3d, okCurve2d: Boolean) is redefined;
---Purpose: Checks result of translation of IGES boundary entities
-- (types 141, 142 or 508).
-- Checks consistency of 2D and 3D representations and keeps
-- only one if they are inconsistent.
-- Checks the closure of resulting wire and if it is not closed,
-- checks 2D and 3D representation and updates the resulting
-- wire to contain only closed representation.
---Remark : If resulting representation will be 3D, some edges may still
-- contain pcurves which are consistent with 3D curves for the
-- given edge.
---Level: Internal
Transfer (me: mutable; okCurve : in out Boolean;
okCurve3d : in out Boolean;
okCurve2d : in out Boolean;
icurve3d : IGESEntity from IGESData;
scurve3d : WireData from ShapeExtend;
usescurve : Boolean;
toreverse3d: Boolean;
curves2d : HArray1OfIGESEntity from IGESData;
toreverse2d: Boolean;
number : Integer;
lsewd : out WireData from ShapeExtend)
returns Boolean is redefined protected;
end IGESBoundary;

View File

@@ -25,39 +25,40 @@
//S4181 pdn 15.04.99 implementing of reading IGES elementary surfaces. (instead of shift, reverce and
//scale factors the transformation matrix and scale factor used)
#include <IGESControl_IGESBoundary.ixx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <Precision.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
#include <ShapeBuild_Edge.hxx>
#include <ShapeAnalysis_Wire.hxx>
#include <ShapeAnalysis_ShapeTolerance.hxx>
#include <ShapeFix_Edge.hxx>
#include <ShapeFix_Wire.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <IGESControl_IGESBoundary.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESGeom_BSplineCurve.hxx>
#include <IGESToBRep.hxx>
#include <IGESToBRep_CurveAndSurface.hxx>
#include <IGESToBRep_TopoCurve.hxx>
#include <Message_Msg.hxx>
#include <Interface_Static.hxx>
#include <Message_Msg.hxx>
#include <Precision.hxx>
#include <ShapeAlgo.hxx>
#include <ShapeAlgo_AlgoContainer.hxx>
#include <ShapeAlgo_ToolContainer.hxx>
#include <IGESGeom_BSplineCurve.hxx>
#include <IGESData_IGESEntity.hxx>
#include <ShapeAnalysis_ShapeTolerance.hxx>
#include <ShapeAnalysis_Wire.hxx>
#include <ShapeBuild_Edge.hxx>
#include <ShapeExtend_WireData.hxx>
#include <ShapeFix_Edge.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <ShapeFix_Wire.hxx>
#include <Standard_Type.hxx>
#include <TColStd_HSequenceOfTransient.hxx>
#include <TopoDS_Edge.hxx>
#include <TopoDS_Wire.hxx>
//=======================================================================
//function : IGESControl_IGESBoundary
//purpose :
//=======================================================================
IGESControl_IGESBoundary::IGESControl_IGESBoundary() : IGESToBRep_IGESBoundary()
{
}

View File

@@ -0,0 +1,84 @@
// Created on: 2000-02-05
// Created by: data exchange team
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_IGESBoundary_HeaderFile
#define _IGESControl_IGESBoundary_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <IGESToBRep_IGESBoundary.hxx>
#include <Standard_Boolean.hxx>
#include <IGESData_HArray1OfIGESEntity.hxx>
#include <Standard_Integer.hxx>
class IGESToBRep_CurveAndSurface;
class IGESData_IGESEntity;
class ShapeExtend_WireData;
class IGESControl_IGESBoundary;
DEFINE_STANDARD_HANDLE(IGESControl_IGESBoundary, IGESToBRep_IGESBoundary)
//! Translates IGES boundary entity (types 141, 142 and 508)
//! in Advanced Data Exchange.
//! Redefines translation and treatment methods from inherited
//! open class IGESToBRep_IGESBoundary.
class IGESControl_IGESBoundary : public IGESToBRep_IGESBoundary
{
public:
//! Creates an object and calls inherited constuctor.
Standard_EXPORT IGESControl_IGESBoundary();
//! Creates an object and calls inherited constuctor.
Standard_EXPORT IGESControl_IGESBoundary(const IGESToBRep_CurveAndSurface& CS);
//! Checks result of translation of IGES boundary entities
//! (types 141, 142 or 508).
//! Checks consistency of 2D and 3D representations and keeps
//! only one if they are inconsistent.
//! Checks the closure of resulting wire and if it is not closed,
//! checks 2D and 3D representation and updates the resulting
//! wire to contain only closed representation.
Standard_EXPORT virtual void Check (const Standard_Boolean result, const Standard_Boolean checkclosure, const Standard_Boolean okCurve3d, const Standard_Boolean okCurve2d) Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(IGESControl_IGESBoundary,IGESToBRep_IGESBoundary)
protected:
Standard_EXPORT virtual Standard_Boolean Transfer (Standard_Boolean& okCurve, Standard_Boolean& okCurve3d, Standard_Boolean& okCurve2d, const Handle(IGESData_IGESEntity)& icurve3d, const Handle(ShapeExtend_WireData)& scurve3d, const Standard_Boolean usescurve, const Standard_Boolean toreverse3d, const Handle(IGESData_HArray1OfIGESEntity)& curves2d, const Standard_Boolean toreverse2d, const Standard_Integer number, Handle(ShapeExtend_WireData)& lsewd) Standard_OVERRIDE;
private:
};
#endif // _IGESControl_IGESBoundary_HeaderFile

View File

@@ -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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class 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 : 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;

View File

@@ -13,54 +13,51 @@
//gka 06.01.99 S3767
//abv 10.04.99 S4136: eliminate using BRepAPI::Precision()
#include <IGESControl_Reader.ixx>
#include <IGESControl_Controller.hxx>
#include <XSControl_Controller.hxx>
#include <XSControl_TransferReader.hxx>
#include <Interface_ShareFlags.hxx>
#include <IFSelect_Functions.hxx>
#include <Interface_InterfaceModel.hxx>
#include <IGESData_IGESModel.hxx>
#include <Interface_Static.hxx>
#include <Interface_Check.hxx>
// S3767 dce 18/01/1999
#include <Message_Msg.hxx>
#include <Transfer_TransientProcess.hxx>
#include <Transfer_IteratorOfProcessForTransient.hxx>
#include <Transfer_Binder.hxx>
#include <TopoDS_Shape.hxx>
#include <Interface_CheckIterator.hxx>
#include <Transfer_IteratorOfProcessForTransient.hxx>
#include <IFSelect_CheckCounter.hxx>//Transfer_Iterator.hxx>
#include <Dico_DictionaryOfTransient.hxx>
#include <BRepLib.hxx>
#include <Dico_DictionaryOfInteger.hxx>
#include <Dico_DictionaryOfTransient.hxx>
#include <Dico_IteratorOfDictionaryOfInteger.hxx>
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
#include <Interface_Macros.hxx>
#include <IGESData_IGESEntity.hxx>
#include <TColStd_HSequenceOfInteger.hxx>
#include <OSD_Timer.hxx>
#include <Transfer_TransferOutput.hxx>
#include <ShapeExtend_Explorer.hxx>
#include <Message_Messenger.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <IGESToBRep_Actor.hxx>
#include <IFSelect_CheckCounter.hxx>
#include <IFSelect_Functions.hxx>
#include <IGESControl_Controller.hxx>
#include <IGESControl_Reader.hxx>
#include <IGESData_FileProtocol.hxx>
#include <TransferBRep.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESToBRep_Actor.hxx>
#include <Interface_Check.hxx>
#include <Interface_CheckIterator.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
#include <Interface_ShareFlags.hxx>
#include <Interface_Static.hxx>
#include <Message_Messenger.hxx>
#include <Message_Msg.hxx>
#include <OSD_Timer.hxx>
#include <ShapeExtend_Explorer.hxx>
#include <ShapeFix_ShapeTolerance.hxx>
#include <BRepLib.hxx>
// add of stdio.h for NT compilation
#include <TColStd_HSequenceOfInteger.hxx>
#include <TopoDS_Shape.hxx>
#include <Transfer_ActorOfTransientProcess.hxx>
#include <Transfer_Binder.hxx>
#include <Transfer_IteratorOfProcessForTransient.hxx>
#include <Transfer_TransferOutput.hxx>
#include <Transfer_TransientProcess.hxx>
#include <TransferBRep.hxx>
#include <XSControl_Controller.hxx>
#include <XSControl_TransferReader.hxx>
#include <XSControl_WorkSession.hxx>
#include <stdio.h>
// S3767 dce 18/01/1999
//Transfer_Iterator.hxx>
// add of stdio.h for NT compilation
//=======================================================================
//function : IGESControl_Reader
//purpose :
//=======================================================================
IGESControl_Reader::IGESControl_Reader ()
{
IGESControl_Controller::Init();

View File

@@ -0,0 +1,125 @@
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_Reader_HeaderFile
#define _IGESControl_Reader_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <XSControl_Reader.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.
//! 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);
class IGESControl_Reader : public XSControl_Reader
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a Reader from scratch
Standard_EXPORT IGESControl_Reader();
//! Creates a Reader from an already existing Session
Standard_EXPORT IGESControl_Reader(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
//! Set the transion of ALL Roots (if theReadOnlyVisible is False)
//! or of Visible Roots (if theReadOnlyVisible is True)
void SetReadVisible (const Standard_Boolean ReadRoot);
Standard_Boolean GetReadVisible() const;
//! Returns the model as a IGESModel.
//! It can then be consulted (header, product)
Standard_EXPORT Handle(IGESData_IGESModel) IGESModel() const;
//! 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
Standard_EXPORT virtual Standard_Integer NbRootsForTransfer() Standard_OVERRIDE;
//! Prints Statistics and check list for Transfer
Standard_EXPORT void PrintTransferInfo (const IFSelect_PrintFail failwarn, const IFSelect_PrintCount mode) const;
protected:
private:
Standard_Boolean theReadOnlyVisible;
};
#include <IGESControl_Reader.lxx>
#endif // _IGESControl_Reader_HeaderFile

View File

@@ -1,32 +0,0 @@
-- Created on: 2000-02-08
-- Created by: data exchange team
-- 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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class ToolContainer from IGESControl inherits ToolContainer from IGESToBRep
---Purpose:
uses
IGESBoundary from IGESToBRep
is
Create returns ToolContainer from IGESControl;
---Purpose: Empty constructor
IGESBoundary (me) returns IGESBoundary from IGESToBRep is redefined;
---Purpose: Returns IGESControl_IGESBoundary
end ToolContainer;

View File

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

View File

@@ -0,0 +1,65 @@
// Created on: 2000-02-08
// Created by: data exchange team
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_ToolContainer_HeaderFile
#define _IGESControl_ToolContainer_HeaderFile
#include <Standard.hxx>
#include <Standard_Type.hxx>
#include <IGESToBRep_ToolContainer.hxx>
class IGESToBRep_IGESBoundary;
class IGESControl_ToolContainer;
DEFINE_STANDARD_HANDLE(IGESControl_ToolContainer, IGESToBRep_ToolContainer)
class IGESControl_ToolContainer : public IGESToBRep_ToolContainer
{
public:
//! Empty constructor
Standard_EXPORT IGESControl_ToolContainer();
//! Returns IGESControl_IGESBoundary
Standard_EXPORT virtual Handle(IGESToBRep_IGESBoundary) IGESBoundary() const Standard_OVERRIDE;
DEFINE_STANDARD_RTTI(IGESControl_ToolContainer,IGESToBRep_ToolContainer)
protected:
private:
};
#endif // _IGESControl_ToolContainer_HeaderFile

View File

@@ -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 License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
class 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 : 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 FinderProcess;
SetTransferProcess (me : in out; TP : 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;

View File

@@ -14,40 +14,42 @@
//cky 16.01.99 Remove couts.
//rln 28.12.98 CCI60005
#include <Standard_Stream.hxx>
#include <IGESControl_Writer.ixx>
#include <IGESControl_Controller.hxx>
#include <IGESSelect_WorkLibrary.hxx>
#include <Bnd_Box.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BndLib_AddSurface.hxx>
#include <BRepBndLib.hxx>
#include <BRepToIGES_BREntity.hxx>
#include <BRepToIGESBRep_Entity.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Geometry.hxx>
#include <Geom_Surface.hxx>
#include <GeomToIGES_GeomCurve.hxx>
#include <GeomToIGES_GeomSurface.hxx>
#include <IGESData_IGESWriter.hxx>
#include <IGESData_Protocol.hxx>
#include <XSControl_TransferWriter.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>
#include <ShapeAnalysis_ShapeTolerance.hxx>
#include <gp_XYZ.hxx>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_Surface.hxx>
#include <BndLib_Add3dCurve.hxx>
#include <BndLib_AddSurface.hxx>
#include <GeomToIGES_GeomCurve.hxx>
#include <GeomToIGES_GeomSurface.hxx>
#include <gp_XYZ.hxx>
#include <IGESControl_Controller.hxx>
#include <IGESControl_Writer.hxx>
#include <IGESData_IGESEntity.hxx>
#include <IGESData_IGESModel.hxx>
#include <IGESData_IGESWriter.hxx>
#include <IGESData_Protocol.hxx>
#include <IGESSelect_WorkLibrary.hxx>
#include <Interface_Macros.hxx>
#include <Interface_Static.hxx>
#include <Message_ProgressIndicator.hxx>
#include <OSD_OpenFile.hxx>
#include <ShapeAnalysis_ShapeTolerance.hxx>
#include <Standard_Stream.hxx>
#include <Standard_Transient.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS_Shape.hxx>
#include <Transfer_FinderProcess.hxx>
#include <XSAlgo.hxx>
#include <XSAlgo_AlgoContainer.hxx>
#include <TopExp_Explorer.hxx>
#include <Message_ProgressIndicator.hxx>
#include <errno.h>
#include <OSD_OpenFile.hxx>
#include <Geom_Geometry.hxx>
#include <XSControl_TransferWriter.hxx>
#include <errno.h>
IGESControl_Writer::IGESControl_Writer ()
: theTP (new Transfer_FinderProcess(10000)) ,
thest (Standard_False)

View File

@@ -0,0 +1,144 @@
// 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 License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _IGESControl_Writer_HeaderFile
#define _IGESControl_Writer_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <IGESData_BasicEditor.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_CString.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
//! 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).
class IGESControl_Writer
{
public:
DEFINE_STANDARD_ALLOC
//! Creates a writer object with the
//! default unit (millimeters) and write mode (Face).
//! IGESControl_Writer (const Standard_CString unit,
//! const Standard_Integer modecr = 0);
Standard_EXPORT IGESControl_Writer();
//! 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.
Standard_EXPORT IGESControl_Writer(const Standard_CString unit, const Standard_Integer modecr = 0);
//! 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.
Standard_EXPORT IGESControl_Writer(const Handle(IGESData_IGESModel)& model, const Standard_Integer modecr = 0);
//! Returns the IGES model to be written in output.
Standard_EXPORT Handle(IGESData_IGESModel) Model() const;
Standard_EXPORT Handle(Transfer_FinderProcess) TransferProcess() const;
//! Returns/Sets the TransferProcess : it contains final results
//! and if some, check messages
Standard_EXPORT void SetTransferProcess (const Handle(Transfer_FinderProcess)& TP);
//! 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
Standard_EXPORT Standard_Boolean AddShape (const TopoDS_Shape& sh);
//! 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
Standard_EXPORT Standard_Boolean AddGeom (const Handle(Standard_Transient)& geom);
//! Adds an IGES entity (and the ones it references) to the model
Standard_EXPORT Standard_Boolean AddEntity (const Handle(IGESData_IGESEntity)& ent);
//! Computes the entities found in
//! the model, which is ready to be written.
//! This contrasts with the default computation of headers only.
Standard_EXPORT void ComputeModel();
//! Computes then writes the model to an OStream
//! Returns True when done, false in case of error
Standard_EXPORT Standard_Boolean Write (Standard_OStream& S, const Standard_Boolean fnes = Standard_False);
//! 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).
Standard_EXPORT Standard_Boolean Write (const Standard_CString file, const Standard_Boolean fnes = Standard_False);
//! Prints Statistics about Transfer
Standard_EXPORT void PrintStatsTransfer (const Standard_Integer what, const Standard_Integer mode = 0) const;
protected:
private:
Handle(Transfer_FinderProcess) theTP;
Handle(IGESData_IGESModel) themod;
IGESData_BasicEditor thedit;
Standard_Integer thecr;
Standard_Boolean thest;
};
#endif // _IGESControl_Writer_HeaderFile