Handle(StepData_Protocol) stepro = Handle(StepData_Protocol)::DownCast
( model->Protocol());
if (!stepro.IsNull()) sch = new TCollection_HAsciiString
- (stepro->SchemaName());
+ (stepro->SchemaName(model));
if (!sch.IsNull()) schid->SetValue (1,sch);
}
header.AddItem(fs);
aResult += "!\n";
aResult += "!Defines the version of schema used for the output STEP file\n";
aResult +=
- "!Default value: 1 or AP214CD. Available values: 1 or AP214CD, 2 or AP214DIS, 3 or AP203, ";
+ "!Default value: 4 or AP214IS. Available values: 1 or AP214CD, 2 or AP214DIS, 3 or AP203, ";
aResult += "4 or AP214IS, 5 or AP242DIS\n";
aResult += aScope + "write.schema :\t " + InternalParameters.WriteSchema + "\n";
aResult += "!\n";
WriteMode_PrecisionMode WritePrecisionMode = WriteMode_PrecisionMode_Average; //<! Specifies the mode of writing the resolution value into the STEP file
double WritePrecisionVal = 0.0001; //<! Resolution value for an STEP file when WriteMode_PrecisionMode is Greatest
WriteMode_Assembly WriteAssembly = WriteMode_Assembly_Auto; //<! Writing assembly mode
- WriteMode_StepSchema WriteSchema = WriteMode_StepSchema_AP214CD; //<! Defines the version of schema used for the output STEP file
+ WriteMode_StepSchema WriteSchema = WriteMode_StepSchema_AP214IS; //<! Defines the version of schema used for the output STEP file
RWMode_Tessellated WriteTessellated = RWMode_Tessellated_OnNoBRep; //!< Defines whether tessellated shapes should be translated
TCollection_AsciiString WriteProductName; //<! Defines the text string that will be used for field 'name' of PRODUCT entities written to the STEP file
bool WriteSurfaceCurMode = true; //<! Indicates whether parametric curves (curves in parametric space of surface) should be written into the STEP file
else return 0;
}
-Standard_CString HeaderSection_Protocol::SchemaName() const
+Standard_CString HeaderSection_Protocol::SchemaName(const Handle(Interface_InterfaceModel)&) const
{ return schemaName; }
//! Returns a Case Number for each of the HeaderSection Entities
Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE;
- Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_CString SchemaName(const Handle(Interface_InterfaceModel)&) const Standard_OVERRIDE;
#include "RWStepAP214_ReadWriteModule.pxx"
#include <Standard_Transient.hxx>
#include <Standard_Type.hxx>
-#include <StepAP214_Protocol.hxx>
#include <StepData_StepReaderData.hxx>
#include <StepData_StepWriter.hxx>
#include <StepData_WriterLib.hxx>
RWStepAP214_ReadWriteModule::RWStepAP214_ReadWriteModule ()
{
-// Handle(StepAP214_Protocol) protocol = new StepAP214_Protocol;
-// StepData_WriterLib::SetGlobal(Handle(RWStepAP214_ReadWriteModule)::DownCast(This()),protocol);
-// Interface_ReaderLib::SetGlobal(Handle(RWStepAP214_ReadWriteModule)::DownCast(This()),protocol);
if (!typenums.IsEmpty()) return;
typenums.Bind (Reco_CartesianPoint, 59);
typenums.Bind (Reco_VertexPoint, 316);
#include <Interface_EntityIterator.hxx>
#include <StepData_StepModel.hxx>
#include <HeaderSection_FileSchema.hxx>
-#include <Interface_Static.hxx>
#include <Message_ProgressScope.hxx>
#include <NCollection_DataMap.hxx>
#include <OSD_Path.hxx>
#include <Message_ProgressScope.hxx>
#include <MoniTool_DataMapIteratorOfDataMapOfShapeTransient.hxx>
#include <OSD_Path.hxx>
-#include <StepAP214_Protocol.hxx>
#include <StepAP242_DraughtingModelItemAssociation.hxx>
#include <StepAP242_GeometricItemSpecificUsage.hxx>
#include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx>
#include <GeomToStep_MakeAxis2Placement3d.hxx>
#include <Interface_Macros.hxx>
-#include <Interface_Static.hxx>
#include <StepAP203_CcDesignApproval.hxx>
#include <StepAP203_CcDesignDateAndTimeAssignment.hxx>
#include <StepAP203_CcDesignPersonAndOrganizationAssignment.hxx>
GetAPD()->Application()->SetApplication (name);
}
-/*
-//=======================================================================
-//function : SetACapplication
-//purpose :
-//=======================================================================
-
-void STEPConstruct_ContextTool::SetACapplication (const Handle(TCollection_HAsciiString)& application)
-{
- GetPDC()->Formation()->OfProduct()->FrameOfReferenceValue(1)
- ->FrameOfReference()->SetApplication(application);
-
-}
-*/
-
-// --------------------------------
-// Product Related Product Category
-// --------------------------------
-
-/*
-
-//=======================================================================
-//function : GetPRPC
-//purpose :
-//=======================================================================
-
-Handle(StepBasic_ProductRelatedProductCategory) STEPConstruct_ContextTool::GetPRPC()
-{
- return thePRPC;
-}
-
-//=======================================================================
-//function : AddPRPC
-//purpose :
-//=======================================================================
-
-void STEPConstruct_ContextTool::AddPRPC (const Standard_Boolean enforce)
-{
- Standard_Boolean noprpc = thePRPC.IsNull();
- if (noprpc || enforce) {
- //:i3 abv 1 Sep 98: ProSTEP TR9: generate PRODUCT_TYPE (derived) instead of PRPC
- switch (Interface_Static::IVal("write.step.schema")) { //j4
- default:
- case 1:
- thePRPC = new StepBasic_ProductType;
- thePRPC->SetName (new TCollection_HAsciiString("part"));
- break;
- case 4:
- case 2:
- thePRPC = new StepBasic_ProductRelatedProductCategory;
- thePRPC->SetName (new TCollection_HAsciiString("part"));
- break;
- case 3:
- thePRPC = new StepBasic_ProductRelatedProductCategory;
- thePRPC->SetName (new TCollection_HAsciiString("detail")); // !!!!! or "assembly"
- break;
- }
- thePRPC->UnSetDescription(); //:i3
- }
-// if (noprpc || enforce) aStepModel->AddWithRefs(thePRPC);
-}
-
-//=======================================================================
-//function : SetPRPCName
-//purpose :
-//=======================================================================
-
-void STEPConstruct_ContextTool::SetPRPCName(const Handle(TCollection_HAsciiString)& aName)
-{
- GetPRPC()->SetName(aName);
-}
-
-//=======================================================================
-//function : GetPRPCName
-//purpose :
-//=======================================================================
-
-Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetPRPCName()
-{
- if (GetPRPC().IsNull()) return new TCollection_HAsciiString("");
- return GetPRPC()->Name();
-}
-
-//=======================================================================
-//function : SetPRPCDescription
-//purpose :
-//=======================================================================
-
-void STEPConstruct_ContextTool::SetPRPCDescription (const Handle(TCollection_HAsciiString)& aDescription)
-{
- Handle(StepBasic_ProductRelatedProductCategory) aPRPC = GetPRPC();
- aPRPC->SetDescription(aDescription);
-// aPRPC->HasDescription(Standard_True);
-}
-
-//=======================================================================
-//function : GetPRPCDescription
-//purpose :
-//=======================================================================
-
-Handle(TCollection_HAsciiString) STEPConstruct_ContextTool::GetPRPCDescription()
-{
- Handle(StepBasic_ProductRelatedProductCategory) aPRPC = GetPRPC();
- if (!aPRPC.IsNull() && aPRPC->HasDescription())
- return aPRPC->Description();
- else {
- return new TCollection_HAsciiString("");
- }
-}
-
-// ================================================================
-//
-// Settings from an already done SDR (see SDRtool)
-//
-// ================================================================
-
-void STEPConstruct_ContextTool::SetSDR (const Handle(StepShape_ShapeDefinitionRepresentation)& sdr)
-{
-// SDR partage des choses avec le contexte ... On raccroche les wagons
- Handle(StepBasic_Product) theProduct =
- sdr->Definition()->Definition().ProductDefinition()->Formation()->OfProduct();
- Handle(StepBasic_ApplicationContext) theAppli =
- theProduct->FrameOfReferenceValue(1)->FrameOfReference();
- Handle(StepBasic_HArray1OfProduct) ProdList =
- new StepBasic_HArray1OfProduct(1,1);
- ProdList->SetValue(1,theProduct);
- thePRPC->SetProducts (ProdList);
- theAPD->SetApplication (theAppli);
-}
-*/
-
//=======================================================================
//function : GetDefaultAxis
//purpose :
//:j4 gka 16.03.99 S4134
// abv 20.11.99 renamed from StepPDR_SDRtool
-#include <Interface_Static.hxx>
#include <StepBasic_ApplicationContext.hxx>
#include <StepBasic_DesignContext.hxx>
#include <StepBasic_MechanicalContext.hxx>
#include <APIHeaderSection_MakeHeader.hxx>
#include <Interface_EntityIterator.hxx>
-#include <Interface_Static.hxx>
#include <Quantity_Color.hxx>
#include <StepBasic_MeasureValueMember.hxx>
#include <STEPConstruct.hxx>
//abv 17.11.99: renamed from StepPDR_MakeUnitAndToleranceContext and merged with STEPControl_Unit
//abv 30.02.00: ability to write file in units other than MM
-#include <Interface_Static.hxx>
#include <StepBasic_ConversionBasedUnitAndAreaUnit.hxx>
#include <StepBasic_ConversionBasedUnitAndLengthUnit.hxx>
#include <StepBasic_ConversionBasedUnitAndPlaneAngleUnit.hxx>
#include <gp_Pnt.hxx>
#include <Interface_EntityIterator.hxx>
#include <Interface_Macros.hxx>
-#include <Interface_Static.hxx>
#include <Message.hxx>
#include <StepBasic_DerivedUnit.hxx>
#include <StepBasic_DerivedUnitElement.hxx>
#include <Interface_Graph.hxx>
#include <Interface_InterfaceModel.hxx>
#include <Interface_Macros.hxx>
-#include <Interface_Static.hxx>
#include <Message_Messenger.hxx>
#include <Message_ProgressScope.hxx>
#include <OSD_Timer.hxx>
// Flag indicating whether SDRs associated with the product`s main SDR
// by SRRs (which correspond to hybrid model representation in AP203 since 1998)
// should be taken into account
- Standard_Integer readSRR = aStepModel->InternalParameters.ReadRelationship;
+ const bool readSRR = aStepModel->InternalParameters.ReadRelationship;
- Standard_Integer readConstructiveGeomRR = aStepModel->InternalParameters.ReadConstrRelation;
+ const bool readConstructiveGeomRR = aStepModel->InternalParameters.ReadConstrRelation;
// Flag indicating whether SDRs associated with the product`s main SDR
// by SAs (which correspond to hybrid model representation in AP203 before 1998)
// should be taken into account
aResult = TransferBRep::ShapeResult(shbinder);
aBuilder.Add(aCund, aResult);
}
+
// translate possible shapes related by SRRs, which corresponds to
// way of writing hybrid models in AP203 since 1998, and AP209
- Standard_Integer aReadSRR = Interface_Static::IVal("read.step.shape.relationship");
- Standard_Integer aReadConstructiveGeomRR = Interface_Static::IVal("read.step.constructivegeom.relationship");
- if (aReadSRR)
+ Handle(StepData_StepModel) aStepModel = Handle(StepData_StepModel)::DownCast(TP->Model());
+ if (aStepModel->InternalParameters.ReadRelationship)
{
const Interface_Graph& aGraph = TP->Graph();
Standard_Integer aSRRnum = 0;
for (Interface_EntityIterator aSubsIt(aGraph.Sharings(maprep)); aSubsIt.More(); aSubsIt.Next())
++aSRRnum;
Message_ProgressScope aPS(aPSRoot.Next(), "Part", aSRRnum);
- TopoDS_Shape aNewResult = TransferRelatedSRR(TP, maprep, Standard_False, aReadConstructiveGeomRR, theLocalFactors, aCund, aPS);
+ TopoDS_Shape aNewResult = TransferRelatedSRR(TP, maprep, Standard_False, aStepModel->InternalParameters.ReadConstrRelation, theLocalFactors, aCund, aPS);
if (!aNewResult.IsNull())
{
aResult = aNewResult;
TopoDS_Shape STEPControl_ActorRead::TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
const Handle(StepShape_ShapeRepresentation)& theRep,
const Standard_Boolean theUseTrsf,
- const Standard_Integer theReadConstructiveGeomRR,
+ const Standard_Boolean theReadConstructiveGeomRR,
const StepData_Factors& theLocalFactors,
TopoDS_Compound& theCund,
Message_ProgressScope& thePS)
Standard_EXPORT TopoDS_Shape TransferRelatedSRR(const Handle(Transfer_TransientProcess)& theTP,
const Handle(StepShape_ShapeRepresentation)& theRep,
const Standard_Boolean theUseTrsf,
- const Standard_Integer theReadConstructiveGeomRR,
+ const Standard_Boolean theReadConstructiveGeomRR,
const StepData_Factors& theLocalFactors,
TopoDS_Compound& theCund,
Message_ProgressScope& thePS);
#include <GeomToStep_MakeAxis2Placement3d.hxx>
#include <Interface_Macros.hxx>
#include <Interface_MSG.hxx>
-#include <Interface_Static.hxx>
#include <Message_ProgressScope.hxx>
#include <ShapeAnalysis_ShapeTolerance.hxx>
#include <ShapeProcess_ShapeContext.hxx>
#include <IFSelect_WorkLibrary.hxx>
#include <Interface_EntityIterator.hxx>
#include <Interface_Graph.hxx>
-#include <Interface_Static.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
#include <StepBasic_ApplicationContext.hxx>
static Standard_CString schemaAP242DIS = "AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF. {1 0 10303 442 1 1 4 }";
#include <HeaderSection_Protocol.hxx>
+#include <StepData_StepModel.hxx>
#include <StepShape_AdvancedBrepShapeRepresentation.hxx>
#include <StepShape_AdvancedFace.hxx>
#include <StepShape_ExtrudedFaceSolid.hxx>
#include <StepShape_RevolvedFaceSolid.hxx>
#include <StepShape_SweptFaceSolid.hxx>
-#include <Interface_Static.hxx>
#include <StepBasic_AreaUnit.hxx>
#include <StepBasic_VolumeUnit.hxx>
#include <StepBasic_SiUnitAndAreaUnit.hxx>
//purpose :
//=======================================================================
-Standard_CString StepAP214_Protocol::SchemaName() const
-{
- switch (Interface_Static::IVal("write.step.schema")) { //:j4
- default:
- case 1 : return schemaAP214CD; break;
- case 2 : return schemaAP214DIS; break;
- case 3 : return schemaAP203; break;
- case 4: return schemaAP214IS; break;
- case 5 : return schemaAP242DIS; break;
+Standard_CString StepAP214_Protocol::SchemaName(
+ const Handle(Interface_InterfaceModel)& theModel) const
+{
+ Handle(StepData_StepModel) aModel1 = Handle(StepData_StepModel)::DownCast(theModel);
+ const DESTEP_Parameters::WriteMode_StepSchema aSchema =
+ aModel1.IsNull() ? DESTEP_Parameters::WriteMode_StepSchema_AP214IS
+ : aModel1->InternalParameters.WriteSchema;
+ switch (aSchema)
+ {
+ case DESTEP_Parameters::WriteMode_StepSchema_AP203:
+ return schemaAP203;
+ case DESTEP_Parameters::WriteMode_StepSchema_AP214IS:
+ return schemaAP214IS;
+ case DESTEP_Parameters::WriteMode_StepSchema_AP242DIS:
+ return schemaAP242DIS;
+ case DESTEP_Parameters::WriteMode_StepSchema_AP214CD:
+ return schemaAP214CD;
+ case DESTEP_Parameters::WriteMode_StepSchema_AP214DIS:
+ default:
+ return schemaAP214DIS;
}
}
-
//=======================================================================
//function : NbResources
//purpose :
//! Returns a Case Number for each of the StepAP214 Entities
Standard_EXPORT virtual Standard_Integer TypeNumber (const Handle(Standard_Type)& atype) const Standard_OVERRIDE;
- Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_CString SchemaName(const Handle(Interface_InterfaceModel)& theModel) const Standard_OVERRIDE;
//! Returns count of Protocol used as Resources (level one)
Standard_EXPORT virtual Standard_Integer NbResources() const Standard_OVERRIDE;
#include <StepData.hxx>
#include <Interface_Macros.hxx>
-#include <Interface_Static.hxx>
#include <Interface_Statics.hxx>
#include <StepData_DefaultGeneral.hxx>
#include <StepData_FileProtocol.hxx>
void StepData::Init ()
{
-// InitHandleVoid(StepData_Protocol,proto);
-// InitHandleVoid(StepData_DefaultGeneral,stmod);
-//:S4136 Interface_Static::Init("step","step.readaccept.void",'i',"1");
-// if (proto.IsNull()) proto = new StepData_Protocol;
-// if (stmod.IsNull()) stmod = new StepData_DefaultGeneral;
}
Handle(StepData_Protocol) StepData::Protocol ()
}
- Standard_CString StepData_FileProtocol::SchemaName () const
+ Standard_CString StepData_FileProtocol::SchemaName (const Handle(Interface_InterfaceModel)&) const
{ return thename; }
//! To be redefined by each sub-class
//! Here, SchemaName returns "" (empty String)
//! was C++ : return const
- Standard_EXPORT virtual Standard_CString SchemaName() const Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_CString SchemaName(const Handle(Interface_InterfaceModel)& theModel) const Standard_OVERRIDE;
}
-Standard_CString StepData_Protocol::SchemaName () const
+Standard_CString StepData_Protocol::SchemaName (const Handle(Interface_InterfaceModel)&) const
{
return thename;
}
//! To be redefined by each sub-class
//! Here, SchemaName returns "(DEFAULT)"
//! was C++ : return const
- Standard_EXPORT virtual Standard_CString SchemaName() const;
+ Standard_EXPORT virtual Standard_CString SchemaName(const Handle(Interface_InterfaceModel)& theModel) const;
//! Creates an empty Model for Step Norm
Standard_EXPORT Handle(Interface_InterfaceModel) NewModel() const Standard_OVERRIDE;
#include <StepData_StepModel.hxx>
#include <StepData_StepWriter.hxx>
#include <TCollection_HAsciiString.hxx>
-#include <Interface_Static.hxx>
#include <stdio.h>
IMPLEMENT_STANDARD_RTTIEXT(StepData_StepModel,Interface_InterfaceModel)
#include <Interface_Check.hxx>
#include <Interface_HArray1OfHAsciiString.hxx>
#include <Interface_Macros.hxx>
-#include <Interface_Static.hxx>
#include <Interface_ParamList.hxx>
#include <Message.hxx>
#include <Message_Messenger.hxx>
thelib.AddProtocol (theproto);
thename.Clear();
thename.AssignCat ("Step Type (Schema ");
- thename.AssignCat (theproto->SchemaName());
+ thename.AssignCat (theproto->SchemaName(nullptr));
thename.AssignCat (")");
}
Standard_CString StepSelect_StepType::Value
(const Handle(Standard_Transient)& ent,
- const Handle(Interface_InterfaceModel)& /*model*/) const
+ const Handle(Interface_InterfaceModel)& model) const
{
static Standard_Mutex aMutex;
Standard_Mutex::Sentry aSentry(aMutex);
Standard_Boolean ok = thelib.Select (ent,module,CN);
if (!ok) {
lastvalue.AssignCat ("..NOT FROM SCHEMA ");
- lastvalue.AssignCat (theproto->SchemaName());
+ lastvalue.AssignCat (theproto->SchemaName(model));
lastvalue.AssignCat ("..");
} else {
Standard_Boolean plex = module->IsComplex(CN);
#include <Geom_Curve.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
-#include <Interface_Static.hxx>
#include <Message_Messenger.hxx>
#include <Message_ProgressScope.hxx>
#include <Precision.hxx>
#include <Geom2d_Curve.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Surface.hxx>
-#include <Interface_Static.hxx>
#include <Precision.hxx>
#include <ShapeFix_Wire.hxx>
#include <Standard_ErrorHandler.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <Geom_Surface.hxx>
#include <gp_Pnt.hxx>
-#include <Interface_Static.hxx>
#include <Precision.hxx>
#include <ShapeAlgo.hxx>
#include <ShapeAlgo_AlgoContainer.hxx>
#include <BRepClass3d.hxx>
-#include <Interface_Static.hxx>
#include <Message_ProgressScope.hxx>
#include <MoniTool_DataMapOfShapeTransient.hxx>
#include <StdFail_NotDone.hxx>
#include <BRepClass3d.hxx>
-#include <Interface_Static.hxx>
#include <Message_ProgressScope.hxx>
#include <StdFail_NotDone.hxx>
#include <StepData_Factors.hxx>
#include <BRepClass3d.hxx>
-#include <Interface_Static.hxx>
#include <Message_ProgressScope.hxx>
#include <StdFail_NotDone.hxx>
#include <StepData_Factors.hxx>
// commercial license or contractual agreement.
-#include <Interface_Static.hxx>
#include <MoniTool_DataMapOfShapeTransient.hxx>
#include <Message_ProgressScope.hxx>
#include <StdFail_NotDone.hxx>
#include <GeomToStep_MakeCurve.hxx>
#include <GeomToStep_MakeLine.hxx>
#include <gp_Vec.hxx>
-#include <Interface_Static.hxx>
#include <StdFail_NotDone.hxx>
#include <StepData_Factors.hxx>
#include <StepData_StepModel.hxx>
#include <Geom_ToroidalSurface.hxx>
#include <GeomToStep_MakeCurve.hxx>
#include <GeomToStep_MakeSurface.hxx>
-#include <Interface_Static.hxx>
#include <Precision.hxx>
#include <ShapeAlgo.hxx>
#include <ShapeAlgo_AlgoContainer.hxx>
#include <BRep_Tool.hxx>
#include <GeomToStep_MakeCartesianPoint.hxx>
#include <gp_Pnt.hxx>
-#include <Interface_Static.hxx>
#include <StdFail_NotDone.hxx>
#include <StepData_StepModel.hxx>
#include <StepGeom_CartesianPoint.hxx>
#include <BRep_Tool.hxx>
-#include <Interface_Static.hxx>
#include <StepData_StepModel.hxx>
#include <StepShape_TopologicalRepresentationItem.hxx>
#include <TopoDSToStep_Tool.hxx>
provider.STEP.OCC.write.precision.mode : 0
provider.STEP.OCC.write.precision.val : 0.0001
provider.STEP.OCC.write.assembly : 2
-provider.STEP.OCC.write.schema : 1
+provider.STEP.OCC.write.schema : 4
provider.STEP.OCC.write.tessellated : 2
provider.STEP.OCC.write.product.name :
provider.STEP.OCC.write.surfacecurve.mode : 1
provider.STEP.OCC.write.precision.mode : 0
provider.STEP.OCC.write.precision.val : 0.0001
provider.STEP.OCC.write.assembly : 2
-provider.STEP.OCC.write.schema : 1
+provider.STEP.OCC.write.schema : 4
provider.STEP.OCC.write.tessellated : 2
provider.STEP.OCC.write.product.name :
provider.STEP.OCC.write.surfacecurve.mode : 1