Handle(Interface_Static) Interface_InterfaceModel::GetParam
(const Standard_CString theParamName)
{
+ if (IsEqual(theParamName, "write.step.schema"))
+ {
+ Handle(Standard_Transient) result;
+ myParamMap.Find(theParamName, result);
+ Standard_Integer anInt = Handle(Interface_Static)::DownCast(result)->IntegerValue();
+
+ }
Handle(Standard_Transient) result;
myParamMap.Find(theParamName, result);
return Handle(Interface_Static)::DownCast(result);
#include <RWStepAP214.hxx>
#include <RWStepAP214_GeneralModule.hxx>
#include <RWStepAP214_ReadWriteModule.hxx>
-#include <StepAP214.hxx>
-#include <StepAP214_Protocol.hxx>
#include <StepData_WriterLib.hxx>
static int THE_RWStepAP214_init = 0;
-void RWStepAP214::Init()
+void RWStepAP214::Init(const Handle(StepAP214_Protocol)& theProto)
{
if (THE_RWStepAP214_init)
{
}
THE_RWStepAP214_init = 1;
RWHeaderSection::Init();
- Handle(StepAP214_Protocol) proto = StepAP214::Protocol();
- Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule,proto);
- Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
- StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule,proto);
+ Interface_GeneralLib::SetGlobal (new RWStepAP214_GeneralModule, theProto);
+ Interface_ReaderLib::SetGlobal (new RWStepAP214_ReadWriteModule, theProto);
+ StepData_WriterLib::SetGlobal (new RWStepAP214_ReadWriteModule, theProto);
}
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
+#include <StepAP214_Protocol.hxx>
class RWStepAP214_ReadWriteModule;
class RWStepAP214_GeneralModule;
//! enforced the initialisation of the libraries
- Standard_EXPORT static void Init();
+ Standard_EXPORT static void Init(const Handle(StepAP214_Protocol)& theProto);
#include <StepAP203_ChangeRequest.hxx>
#include <StepAP203_StartRequest.hxx>
#include <StepAP203_StartWork.hxx>
-#include <StepAP214.hxx>
#include <StepAP214_AppliedApprovalAssignment.hxx>
#include <StepAP214_AppliedDateAndTimeAssignment.hxx>
#include <StepAP214_AppliedDateAssignment.hxx>
catstr = Interface_Category::Number("Structure");
catdsc = Interface_Category::Number("Description");
cataux = Interface_Category::Number("Auxiliary");
-//// Interface_GeneralLib::SetGlobal(Handle(RWStepAP214_GeneralModule)::DownCast(This()), StepAP214::Protocol());
}
#include <IFSelect_SelectSignature.hxx>
#include <IFSelect_SignAncestor.hxx>
#include <IFSelect_SignCounter.hxx>
+#include <IFSelect_SelectModelEntities.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
#include <RWHeaderSection.hxx>
#include <ShapeExtend.hxx>
#include <Standard_Type.hxx>
#include <Standard_Version.hxx>
+#include <StepAP214_Protocol.hxx>
#include <STEPControl_ActorRead.hxx>
#include <STEPControl_ActorWrite.hxx>
#include <STEPControl_Controller.hxx>
#include <StepData_FileProtocol.hxx>
#include <StepData_StepModel.hxx>
-#include <STEPEdit.hxx>
#include <STEPEdit_EditContext.hxx>
#include <STEPEdit_EditSDR.hxx>
#include <StepSelect_StepType.hxx>
STEPControl_Controller::STEPControl_Controller()
: XSControl_Controller("STEP", "step")
{
- RWHeaderSection::Init(); RWStepAP214::Init();
+ RWHeaderSection::Init();
+
+ myAdaptorProtocol = new StepAP214_Protocol();
+ RWStepAP214::Init(Handle(StepAP214_Protocol)::DownCast(myAdaptorProtocol));
Handle(STEPControl_ActorWrite) ActWrite = new STEPControl_ActorWrite;
myAdaptorWrite = ActWrite;
Handle(StepSelect_WorkLibrary) swl = new StepSelect_WorkLibrary;
swl->SetDumpLabel(1);
myAdaptorLibrary = swl;
- myAdaptorProtocol = STEPEdit::Protocol();
myAdaptorRead = new STEPControl_ActorRead; // par ex pour Recognize
+ myStepType = new StepSelect_StepType;
+ myStepType->SetProtocol(myAdaptorProtocol);
+
SetModeWrite (0,4);
SetModeWriteHelp (0,"As Is");
SetModeWriteHelp (1,"Faceted Brep");
DeclareAndCast(IFSelect_Selection,xmr,SessionItem("xst-model-roots"));
if (!xmr.IsNull()) {
- Handle(IFSelect_Signature) sty = STEPEdit::SignType();
- AddSessionItem (sty,"step-type");
- Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(sty,Standard_False,Standard_True);
+ AddSessionItem (myStepType,"step-type");
+ Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(myStepType,Standard_False,Standard_True);
AddSessionItem (tys,"step-types");
//szv:mySignType = sty;
AddSessionItem (new IFSelect_SignAncestor(),"xst-derived");
Handle(STEPSelections_SelectDerived) stdvar = new STEPSelections_SelectDerived();
- stdvar->SetProtocol(STEPEdit::Protocol());
+ stdvar->SetProtocol(myAdaptorProtocol);
AddSessionItem (stdvar,"step-derived");
- Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
+ //Creates a Selection for ShapeDefinitionRepresentation
+ Handle(IFSelect_SelectSignature) selsdr = new IFSelect_SelectSignature
+ (myStepType, "SHAPE_DEFINITION_REPRESENTATION");
selsdr->SetInput (xmr);
AddSessionItem (selsdr,"step-shape-def-repr");
- AddSessionItem (STEPEdit::NewSelectPlacedItem(),"step-placed-items");
- // input deja pret avec ModelAll
- AddSessionItem (STEPEdit::NewSelectShapeRepr(),"step-shape-repr");
+ // Creates a Selection for Placed Items, i.e. MappedItem or
+ // ContextDependentShapeRepresentation, which itself refers to a
+ // RepresentationRelationship with possible subtypes (Shape...
+ // and/or ...WithTransformation)
+ Handle(IFSelect_SelectSignature) selrrs = new IFSelect_SelectSignature
+ (myStepType, "MAPPED_ITEM|CONTEXT_DEPENDENT_SHAPE_REPRESENTATION", Standard_False);
+ selrrs->SetInput(new IFSelect_SelectModelEntities);
+ AddSessionItem (selrrs,"step-placed-items");
+
+ // Creates a Selection for ShapeRepresentation and its sub - types,
+ // plus ContextDependentShapeRepresentation (which is not a
+ // sub-type of ShapeRepresentation)
+ Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
+ (myStepType, "SHAPE_REPRESENTATION", Standard_False);
+ // REPRESENTATION_RELATIONSHIP passe par CONTEXT_DEPENDENT_SHAPE_REPRESENTATION
+ sel->SetInput(new IFSelect_SelectModelEntities);
+ AddSessionItem (sel,"step-shape-repr");
}
//pdn
Handle(Interface_InterfaceModel) STEPControl_Controller::NewModel () const
{
- return STEPEdit::NewModel();
+ APIHeaderSection_MakeHeader head;
+ return head.NewModel(myAdaptorProtocol);
}
// #### PROVISOIRE ??? ####
WS->AddNamedItem ("xst-transferrable-roots",st1);
if (!slr.IsNull()) {
- Handle(IFSelect_Signature) sty = STEPEdit::SignType();
- WS->AddNamedItem ("step-type",sty);
+ WS->AddNamedItem ("step-type", myStepType);
- Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(sty,Standard_False,Standard_True);
+ Handle(IFSelect_SignCounter) tys = new IFSelect_SignCounter(myStepType,Standard_False,Standard_True);
WS->AddNamedItem ("step-types",tys);
//szv:mySignType = sty;
- WS->SetSignType( sty );
+ WS->SetSignType(myStepType);
//pdn S4133 18.02.99
WS->AddNamedItem ("xst-derived",new IFSelect_SignAncestor());
Handle(STEPSelections_SelectDerived) stdvar = new STEPSelections_SelectDerived();
- stdvar->SetProtocol(STEPEdit::Protocol());
+ stdvar->SetProtocol(myAdaptorProtocol);
WS->AddNamedItem ("step-derived",stdvar);
-
- Handle(IFSelect_SelectSignature) selsdr = STEPEdit::NewSelectSDR();
- selsdr->SetInput (slr);
- WS->AddNamedItem ("step-shape-def-repr",selsdr);
- Handle(IFSelect_SelectSignature) selrrs = STEPEdit::NewSelectPlacedItem();
+
+ //Creates a Selection for ShapeDefinitionRepresentation
+ Handle(IFSelect_SelectSignature) selsdr = new IFSelect_SelectSignature
+ (myStepType, "SHAPE_DEFINITION_REPRESENTATION");
+ selsdr->SetInput(slr);
+ WS->AddNamedItem("step-shape-def-repr", selsdr);
+
+ // Creates a Selection for Placed Items, i.e. MappedItem or
+ // ContextDependentShapeRepresentation, which itself refers to a
+ // RepresentationRelationship with possible subtypes (Shape...
+ // and/or ...WithTransformation)
+ Handle(IFSelect_SelectSignature) selrrs = new IFSelect_SelectSignature
+ (myStepType, "MAPPED_ITEM|CONTEXT_DEPENDENT_SHAPE_REPRESENTATION", Standard_False);
+ selrrs->SetInput(new IFSelect_SelectModelEntities);
WS->AddNamedItem ("step-placed-items",selrrs);
- Handle(IFSelect_SelectSignature) selsr = STEPEdit::NewSelectShapeRepr();
- // input deja pret avec ModelAll
- WS->AddNamedItem ("step-shape-repr",selsr);
+
+ // Creates a Selection for ShapeRepresentation and its sub - types,
+ // plus ContextDependentShapeRepresentation (which is not a
+ // sub-type of ShapeRepresentation)
+ Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
+ (myStepType, "SHAPE_REPRESENTATION", Standard_False);
+ // REPRESENTATION_RELATIONSHIP passe par CONTEXT_DEPENDENT_SHAPE_REPRESENTATION
+ sel->SetInput(new IFSelect_SelectModelEntities);
+ WS->AddNamedItem ("step-shape-repr", sel);
}
//pdn
#include <IFSelect_ReturnStatus.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
+#include <StepSelect_StepType.hxx>
class Interface_InterfaceModel;
class Transfer_ActorOfTransientProcess;
class XSControl_WorkSession;
private:
-
+ Handle(StepSelect_StepType) myStepType;
};
+++ /dev/null
-// 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.
-
-
-#include <APIHeaderSection_MakeHeader.hxx>
-#include <IFSelect_SelectModelEntities.hxx>
-#include <IFSelect_SelectModelRoots.hxx>
-#include <IFSelect_SelectSignature.hxx>
-#include <IFSelect_Signature.hxx>
-#include <Interface_Protocol.hxx>
-#include <StepAP214.hxx>
-#include <StepAP214_Protocol.hxx>
-#include <StepData_StepModel.hxx>
-#include <STEPEdit.hxx>
-#include <StepSelect_StepType.hxx>
-
-Handle(Interface_Protocol) STEPEdit::Protocol ()
-{
-/*
- static Handle(StepData_FileProtocol) proto;
- if (!proto.IsNull()) return proto;
- proto = new StepData_FileProtocol;
- proto->Add (StepAP214::Protocol());
- proto->Add (HeaderSection::Protocol());
- return proto;
-*/
- return StepAP214::Protocol();
-}
-
-Handle(StepData_StepModel) STEPEdit::NewModel ()
-{
- APIHeaderSection_MakeHeader head;
- return head.NewModel(STEPEdit::Protocol());
-}
-
-Handle(IFSelect_Signature) STEPEdit::SignType ()
-{
- static Handle(StepSelect_StepType) sty;
- if (!sty.IsNull()) return sty;
- sty = new StepSelect_StepType;
- sty->SetProtocol (STEPEdit::Protocol());
- return sty;
-}
-
-Handle(IFSelect_SelectSignature) STEPEdit::NewSelectSDR ()
-{
- Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
- (STEPEdit::SignType(),"SHAPE_DEFINITION_REPRESENTATION");
- sel->SetInput (new IFSelect_SelectModelRoots);
- return sel;
-}
-
-Handle(IFSelect_SelectSignature) STEPEdit::NewSelectPlacedItem ()
-{
- Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
- (STEPEdit::SignType(),"MAPPED_ITEM|CONTEXT_DEPENDENT_SHAPE_REPRESENTATION",Standard_False);
- sel->SetInput (new IFSelect_SelectModelEntities);
- return sel;
-}
-
-Handle(IFSelect_SelectSignature) STEPEdit::NewSelectShapeRepr ()
-{
- Handle(IFSelect_SelectSignature) sel = new IFSelect_SelectSignature
- (STEPEdit::SignType(),"SHAPE_REPRESENTATION",Standard_False);
-// REPRESENTATION_RELATIONSHIP passe par CONTEXT_DEPENDENT_SHAPE_REPRESENTATION
- sel->SetInput (new IFSelect_SelectModelEntities);
- return sel;
-}
+++ /dev/null
-// Created on: 1998-07-29
-// 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 _STEPEdit_HeaderFile
-#define _STEPEdit_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-class Interface_Protocol;
-class StepData_StepModel;
-class IFSelect_Signature;
-class IFSelect_SelectSignature;
-class STEPEdit_EditContext;
-class STEPEdit_EditSDR;
-
-
-//! Provides tools to exploit and edit a set of STEP data :
-//! editors, selections ..
-class STEPEdit
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- //! Returns a Protocol fit for STEP (creates the first time)
- Standard_EXPORT static Handle(Interface_Protocol) Protocol();
-
- //! Returns a new empty StepModel fit for STEP
- //! i.e. with its header determined from Protocol
- Standard_EXPORT static Handle(StepData_StepModel) NewModel();
-
- //! Returns a SignType fit for STEP (creates the first time)
- Standard_EXPORT static Handle(IFSelect_Signature) SignType();
-
- //! Creates a Selection for ShapeDefinitionRepresentation
- //! By default searches among root entities
- Standard_EXPORT static Handle(IFSelect_SelectSignature) NewSelectSDR();
-
- //! Creates a Selection for Placed Items, i.e. MappedItem or
- //! ContextDependentShapeRepresentation, which itself refers to a
- //! RepresentationRelationship with possible subtypes (Shape...
- //! and/or ...WithTransformation)
- //! By default in the whole StepModel
- Standard_EXPORT static Handle(IFSelect_SelectSignature) NewSelectPlacedItem();
-
- //! Creates a Selection for ShapeRepresentation and its sub-types,
- //! plus ContextDependentShapeRepresentation (which is not a
- //! sub-type of ShapeRepresentation)
- //! By default in the whole StepModel
- Standard_EXPORT static Handle(IFSelect_SelectSignature) NewSelectShapeRepr();
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class STEPEdit_EditContext;
-friend class STEPEdit_EditSDR;
-
-};
-
-
-
-
-
-
-
-#endif // _STEPEdit_HeaderFile
+++ /dev/null
-// 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.
-
-
-#include <Interface_Statics.hxx>
-#include <StepAP214.hxx>
-#include <StepAP214_Protocol.hxx>
-
-StaticHandle(StepAP214_Protocol, proto);
-
-Handle(StepAP214_Protocol) StepAP214::Protocol()
-
- {
- InitHandleVoid(StepAP214_Protocol, proto);
- return proto;
- }
-
+++ /dev/null
-// Created on: 1995-12-01
-// Created by: EXPRESS->CDL V0.2 Translator
-// 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 _StepAP214_HeaderFile
-#define _StepAP214_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-class StepAP214_Protocol;
-class StepAP214_AutoDesignDateAndPersonItem;
-class StepAP214_AutoDesignDateAndTimeItem;
-class StepAP214_AutoDesignDatedItem;
-class StepAP214_AutoDesignGeneralOrgItem;
-class StepAP214_AutoDesignOrganizationItem;
-class StepAP214_AutoDesignGroupedItem;
-class StepAP214_AutoDesignPresentedItemSelect;
-class StepAP214_AutoDesignReferencingItem;
-class StepAP214_DateAndTimeItem;
-class StepAP214_DateItem;
-class StepAP214_ApprovalItem;
-class StepAP214_OrganizationItem;
-class StepAP214_DocumentReferenceItem;
-class StepAP214_GroupItem;
-class StepAP214_PersonAndOrganizationItem;
-class StepAP214_PresentedItemSelect;
-class StepAP214_SecurityClassificationItem;
-class StepAP214_Protocol;
-class StepAP214_AutoDesignApprovalAssignment;
-class StepAP214_AutoDesignActualDateAndTimeAssignment;
-class StepAP214_AutoDesignNominalDateAndTimeAssignment;
-class StepAP214_AutoDesignActualDateAssignment;
-class StepAP214_AutoDesignNominalDateAssignment;
-class StepAP214_AutoDesignGroupAssignment;
-class StepAP214_AutoDesignOrganizationAssignment;
-class StepAP214_AutoDesignDateAndPersonAssignment;
-class StepAP214_AutoDesignPersonAndOrganizationAssignment;
-class StepAP214_AutoDesignPresentedItem;
-class StepAP214_AutoDesignSecurityClassificationAssignment;
-class StepAP214_AutoDesignDocumentReference;
-class StepAP214_AppliedApprovalAssignment;
-class StepAP214_AppliedDateAndTimeAssignment;
-class StepAP214_AppliedDateAssignment;
-class StepAP214_AppliedGroupAssignment;
-class StepAP214_AppliedOrganizationAssignment;
-class StepAP214_AppliedPersonAndOrganizationAssignment;
-class StepAP214_AppliedPresentedItem;
-class StepAP214_AppliedSecurityClassificationAssignment;
-class StepAP214_AppliedDocumentReference;
-class StepAP214_AppliedExternalIdentificationAssignment;
-class StepAP214_Class;
-class StepAP214_ExternalIdentificationItem;
-class StepAP214_ExternallyDefinedClass;
-class StepAP214_ExternallyDefinedGeneralProperty;
-class StepAP214_RepItemGroup;
-
-
-//! Complete AP214 CC1 , Revision 4
-//! Upgrading from Revision 2 to Revision 4 : 26 Mar 1997
-//! Splitting in sub-schemas : 5 Nov 1997
-class StepAP214
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- //! creates a Protocol
- Standard_EXPORT static Handle(StepAP214_Protocol) Protocol();
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class StepAP214_AutoDesignDateAndPersonItem;
-friend class StepAP214_AutoDesignDateAndTimeItem;
-friend class StepAP214_AutoDesignDatedItem;
-friend class StepAP214_AutoDesignGeneralOrgItem;
-friend class StepAP214_AutoDesignOrganizationItem;
-friend class StepAP214_AutoDesignGroupedItem;
-friend class StepAP214_AutoDesignPresentedItemSelect;
-friend class StepAP214_AutoDesignReferencingItem;
-friend class StepAP214_DateAndTimeItem;
-friend class StepAP214_DateItem;
-friend class StepAP214_ApprovalItem;
-friend class StepAP214_OrganizationItem;
-friend class StepAP214_DocumentReferenceItem;
-friend class StepAP214_GroupItem;
-friend class StepAP214_PersonAndOrganizationItem;
-friend class StepAP214_PresentedItemSelect;
-friend class StepAP214_SecurityClassificationItem;
-friend class StepAP214_Protocol;
-friend class StepAP214_AutoDesignApprovalAssignment;
-friend class StepAP214_AutoDesignActualDateAndTimeAssignment;
-friend class StepAP214_AutoDesignNominalDateAndTimeAssignment;
-friend class StepAP214_AutoDesignActualDateAssignment;
-friend class StepAP214_AutoDesignNominalDateAssignment;
-friend class StepAP214_AutoDesignGroupAssignment;
-friend class StepAP214_AutoDesignOrganizationAssignment;
-friend class StepAP214_AutoDesignDateAndPersonAssignment;
-friend class StepAP214_AutoDesignPersonAndOrganizationAssignment;
-friend class StepAP214_AutoDesignPresentedItem;
-friend class StepAP214_AutoDesignSecurityClassificationAssignment;
-friend class StepAP214_AutoDesignDocumentReference;
-friend class StepAP214_AppliedApprovalAssignment;
-friend class StepAP214_AppliedDateAndTimeAssignment;
-friend class StepAP214_AppliedDateAssignment;
-friend class StepAP214_AppliedGroupAssignment;
-friend class StepAP214_AppliedOrganizationAssignment;
-friend class StepAP214_AppliedPersonAndOrganizationAssignment;
-friend class StepAP214_AppliedPresentedItem;
-friend class StepAP214_AppliedSecurityClassificationAssignment;
-friend class StepAP214_AppliedDocumentReference;
-friend class StepAP214_AppliedExternalIdentificationAssignment;
-friend class StepAP214_Class;
-friend class StepAP214_ExternalIdentificationItem;
-friend class StepAP214_ExternallyDefinedClass;
-friend class StepAP214_ExternallyDefinedGeneralProperty;
-friend class StepAP214_RepItemGroup;
-
-};
-
-
-
-
-
-
-
-#endif // _StepAP214_HeaderFile
#include <StepVisual_CameraModelD3MultiClippingUnion.hxx>
#include <StepVisual_AnnotationCurveOccurrenceAndAnnotationOccurrenceAndGeomReprItemAndReprItemAndStyledItem.hxx>
-static int THE_StepAP214_Protocol_init = 0;
-static Interface_DataMapOfTransientInteger types(800);
//=======================================================================
//function : StepAP214_Protocol
//=======================================================================
StepAP214_Protocol::StepAP214_Protocol () :
- myShemaName(schemaAP214IS)
+ myShemaName(schemaAP214IS),
+ types(800)
{
- if (THE_StepAP214_Protocol_init)
- {
- return;
- }
- THE_StepAP214_Protocol_init = 1;
-
types.Bind (STANDARD_TYPE(StepBasic_Address), 1);
types.Bind (STANDARD_TYPE(StepShape_AdvancedBrepShapeRepresentation), 2);
types.Bind (STANDARD_TYPE(StepShape_AdvancedFace), 3);
private:
Standard_CString myShemaName;
+ Interface_DataMapOfTransientInteger types;
};
#include <Message_Messenger.hxx>
#include <Message.hxx>
+#include <Standard_Mutex.hxx>
#ifdef OCCT_DEBUG
#define CHRONOMESURE
const Handle(StepData_FileRecognizer)& recodata)
{
- Handle(Message_Messenger) sout = Message::DefaultMessenger();
- char *ficnom = nomfic ; // because const (non reconnu par C)
-
- checkread->Clear();
- recfile_modeprint ( (modepr > 0 ? modepr-1 : 0) );
- FILE* newin = stepread_setinput(ficnom);
- if (!newin) return -1;
+ static Standard_Mutex aPars;
+ {
+ Standard_Mutex::Sentry aLock(aPars);
+
+ Handle(Message_Messenger) sout = Message::DefaultMessenger();
+ char *ficnom = nomfic; // because const (non reconnu par C)
+
+ checkread->Clear();
+ recfile_modeprint(( modepr > 0 ? modepr - 1 : 0 ));
+ FILE* newin = stepread_setinput(ficnom);
+ if (!newin) return -1;
#ifdef CHRONOMESURE
- Standard_Integer n ;
- OSD_Timer c ;
- c.Reset () ;
- c.Start();
- sout << " ... Step File Reading : " << ficnom << "" << endl;
+ Standard_Integer n;
+ OSD_Timer c;
+ c.Reset();
+ c.Start();
+ sout << " ... Step File Reading : " << ficnom << "" << endl;
#endif
- try {
- OCC_CATCH_SIGNALS
- if (stepread () != 0) { lir_file_fin(3); stepread_endinput (newin,ficnom); return 1; }
- }
- catch (Standard_Failure const& anException) {
+ try {
+ OCC_CATCH_SIGNALS
+ if (stepread() != 0) { lir_file_fin(3); stepread_endinput(newin, ficnom); return 1; }
+ }
+ catch (Standard_Failure const& anException) {
#ifdef OCCT_DEBUG
- sout << " ... Exception Raised while reading Step File : " << ficnom << ":\n" << endl;
- sout << anException.GetMessageString();
- sout << " ..." << endl;
+ sout << " ... Exception Raised while reading Step File : " << ficnom << ":\n" << endl;
+ sout << anException.GetMessageString();
+ sout << " ..." << endl;
#endif
- (void)anException;
- lir_file_fin(3);
- stepread_endinput (newin,ficnom);
- return 1;
- }
- // Continue reading of file despite of possible fails
- //if (checkread->HasFailed()) { lir_file_fin(3); stepread_endinput (newin,ficnom); return 1; }
+ (void)anException;
+ lir_file_fin(3);
+ stepread_endinput(newin, ficnom);
+ return 1;
+ }
+ // Continue reading of file despite of possible fails
+ //if (checkread->HasFailed()) { lir_file_fin(3); stepread_endinput (newin,ficnom); return 1; }
#ifdef CHRONOMESURE
- sout << " ... STEP File Read ... " << endl;
- c.Show();
+ sout << " ... STEP File Read ... " << endl;
+ c.Show();
#endif
-// Creation du StepReaderData
-
- LesTypes[rec_argNondef] = Interface_ParamVoid ;
- LesTypes[rec_argSub] = Interface_ParamSub ;
- LesTypes[rec_argIdent] = Interface_ParamIdent ;
- LesTypes[rec_argInteger] = Interface_ParamInteger ;
- LesTypes[rec_argFloat] = Interface_ParamReal ;
- LesTypes[rec_argEnum] = Interface_ParamEnum ;
- LesTypes[rec_argBinary] = Interface_ParamBinary ;
- LesTypes[rec_argText] = Interface_ParamText ;
- LesTypes[rec_argHexa] = Interface_ParamHexa ;
- LesTypes[rec_argMisc] = Interface_ParamMisc ;
-
- Standard_Integer nbhead, nbrec, nbpar;
- lir_file_nbr (&nbhead,&nbrec,&nbpar); // renvoi par lex/yacc
- Handle(StepData_StepReaderData) undirec =
- new StepData_StepReaderData(nbhead,nbrec,nbpar); // creation tableau de records
-
- for ( Standard_Integer nr = 1; nr <= nbrec; nr ++) {
- int nbarg; char* ident; char* typrec = 0;
- lir_file_rec (&ident, &typrec, &nbarg);
- undirec->SetRecord (nr, ident, typrec, nbarg);
-
- if (nbarg>0) {
- int typa; char* val;
- Interface_ParamType newtype;
- while(lir_file_arg (&typa, &val) == 1) {
- newtype = LesTypes[typa] ;
- undirec->AddStepParam (nr, val, newtype);
+ // Creation du StepReaderData
+
+ LesTypes[rec_argNondef] = Interface_ParamVoid;
+ LesTypes[rec_argSub] = Interface_ParamSub;
+ LesTypes[rec_argIdent] = Interface_ParamIdent;
+ LesTypes[rec_argInteger] = Interface_ParamInteger;
+ LesTypes[rec_argFloat] = Interface_ParamReal;
+ LesTypes[rec_argEnum] = Interface_ParamEnum;
+ LesTypes[rec_argBinary] = Interface_ParamBinary;
+ LesTypes[rec_argText] = Interface_ParamText;
+ LesTypes[rec_argHexa] = Interface_ParamHexa;
+ LesTypes[rec_argMisc] = Interface_ParamMisc;
+
+ Standard_Integer nbhead, nbrec, nbpar;
+ lir_file_nbr(&nbhead, &nbrec, &nbpar); // renvoi par lex/yacc
+ Handle(StepData_StepReaderData) undirec =
+ new StepData_StepReaderData(nbhead, nbrec, nbpar); // creation tableau de records
+
+ for (Standard_Integer nr = 1; nr <= nbrec; nr++) {
+ int nbarg; char* ident; char* typrec = 0;
+ lir_file_rec(&ident, &typrec, &nbarg);
+ undirec->SetRecord(nr, ident, typrec, nbarg);
+
+ if (nbarg > 0) {
+ int typa; char* val;
+ Interface_ParamType newtype;
+ while (lir_file_arg(&typa, &val) == 1) {
+ newtype = LesTypes[typa];
+ undirec->AddStepParam(nr, val, newtype);
+ }
}
+ undirec->InitParams(nr);
+ lir_file_finrec();
}
- undirec->InitParams(nr);
- lir_file_finrec();
- }
- lir_file_fin(1);
-// on a undirec pret pour la suite
+ lir_file_fin(1);
+ // on a undirec pret pour la suite
#ifdef CHRONOMESURE
- sout << " ... Step File loaded ... " << endl;
- c.Show();
- sout << " "<< undirec->NbRecords () <<
- " records (entities,sub-lists,scopes), "<< nbpar << " parameters\n" << endl;
+ sout << " ... Step File loaded ... " << endl;
+ c.Show();
+ sout << " " << undirec->NbRecords() <<
+ " records (entities,sub-lists,scopes), " << nbpar << " parameters\n" << endl;
#endif
-// Analyse : par StepReaderTool
+ // Analyse : par StepReaderTool
- StepData_StepReaderTool readtool (undirec,protocol);
- readtool.SetErrorHandle (Standard_True);
+ StepData_StepReaderTool readtool(undirec, protocol);
+ readtool.SetErrorHandle(Standard_True);
- readtool.PrepareHeader(recoheader); // Header. reco nul -> pour Protocol
- readtool.Prepare(recodata); // Data. reco nul -> pour Protocol
+ readtool.PrepareHeader(recoheader); // Header. reco nul -> pour Protocol
+ readtool.Prepare(recodata); // Data. reco nul -> pour Protocol
#ifdef CHRONOMESURE
- sout << " ... Parameters prepared ... ";
- c.Show();
+ sout << " ... Parameters prepared ... ";
+ c.Show();
#endif
- readtool.LoadModel(stepmodel);
- if (stepmodel->Protocol().IsNull()) stepmodel->SetProtocol (protocol);
- lir_file_fin(2);
-
- readtool.Clear();
- undirec.Nullify();
+ readtool.LoadModel(stepmodel);
+ if (stepmodel->Protocol().IsNull()) stepmodel->SetProtocol(protocol);
+ lir_file_fin(2);
+
+ readtool.Clear();
+ undirec.Nullify();
#ifdef CHRONOMESURE
- sout << " ... Objets analysed ... " << endl;
- c.Show();
- n = stepmodel->NbEntities() ;
- sout << " STEP Loading done : " << n << " Entities" << endl;
+ sout << " ... Objets analysed ... " << endl;
+ c.Show();
+ n = stepmodel->NbEntities();
+ sout << " STEP Loading done : " << n << " Entities" << endl;
#endif
-
- stepread_endinput (newin,ficnom); return 0 ;
+
+ stepread_endinput(newin, ficnom); return 0;
+ }
}
void StepFile_Interrupt (char* mess)
try {
OCC_CATCH_SIGNALS
Handle(ShapeExtend_MsgRegistrator) msg = new ShapeExtend_MsgRegistrator;
- Handle(ShapeFix_Shape) sfs = ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape();
+ Handle(ShapeFix_Shape) sfs = new ShapeFix_Shape;// ShapeAlgo::AlgoContainer()->ToolContainer()->FixShape();
sfs->Init ( shape );
sfs->SetMsgRegistrator ( msg );
sfs->SetPrecision ( Prec );