Entity mechanical_design_and_draughting_relationship and function for its transfer added.
#include <RWStepRepr_RWMaterialDesignation.hxx>
#include <RWStepRepr_RWMaterialProperty.hxx>
#include <RWStepRepr_RWMaterialPropertyRepresentation.hxx>
+#include <RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx>
#include <RWStepRepr_RWMeasureRepresentationItem.hxx>
#include <RWStepRepr_RWProductConcept.hxx>
#include <RWStepRepr_RWProductDefinitionShape.hxx>
#include <StepRepr_ConfigurationEffectivity.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <StepRepr_DataEnvironment.hxx>
#include <StepRepr_DescriptiveRepresentationItem.hxx>
#include <StepRepr_Extension.hxx>
aTool.Share(anEnt, iter);
}
break;
+ case 824:
+ {
+ DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anEnt, ent);
+ RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool;
+ aTool.Share(anEnt, iter);
+ }
+ break;
default : break;
}
}
case 823:
ent = new StepRepr_RealRepresentationItem;
break;
+ case 824:
+ ent = new StepRepr_MechanicalDesignAndDraughtingRelationship;
+ break;
default:
return Standard_False;
#include <RWStepShape_RWManifoldSurfaceShapeRepresentation.hxx>
#include <RWStepRepr_RWMappedItem.hxx>
#include <RWStepBasic_RWMeasureWithUnit.hxx>
+#include <RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx>
#include <RWStepVisual_RWMechanicalDesignGeometricPresentationArea.hxx>
#include <RWStepVisual_RWMechanicalDesignGeometricPresentationRepresentation.hxx>
// Removed from Rev2 to Rev4 : <RWStepVisual_RWMechanicalDesignPresentationArea.hxx>
#include <StepRepr_CharacterizedRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <RWStepVisual_RWTessellatedAnnotationOccurrence.hxx>
#include <RWStepVisual_RWTessellatedItem.hxx>
static TCollection_AsciiString Reco_GeneralPropertyRelationship("GENERAL_PROPERTY_RELATIONSHIP");
static TCollection_AsciiString Reco_BooleanRepresentationItem("BOOLEAN_REPRESENTATION_ITEM");
static TCollection_AsciiString Reco_RealRepresentationItem("REAL_REPRESENTATION_ITEM");
+static TCollection_AsciiString Reco_MechanicalDesignAndDraughtingRelationship("MECHANICAL_DESIGN_AND_DRAUGHTING_RELATIONSHIP");
// -- Definition of the libraries --
typenums.Bind(Reco_GeneralPropertyRelationship, 821);
typenums.Bind(Reco_BooleanRepresentationItem, 822);
typenums.Bind(Reco_RealRepresentationItem, 823);
+ typenums.Bind(Reco_MechanicalDesignAndDraughtingRelationship, 824);
// SHORT NAMES
case 821: return Reco_GeneralPropertyRelationship;
case 822: return Reco_BooleanRepresentationItem;
case 823: return Reco_RealRepresentationItem;
+ case 824: return Reco_MechanicalDesignAndDraughtingRelationship;
default : return PasReco;
}
}
aTool.ReadStep(data, num, ach, anent);
}
break;
+ case 824:
+ {
+ DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anent, ent);
+ RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool;
+ aTool.ReadStep(data, num, ach, anent);
+ }
+ break;
default:
ach->AddFail("Type Mismatch when reading - Entity");
}
aTool.WriteStep(SW, anent);
}
break;
+ case 824:
+ {
+ DeclareAndCast(StepRepr_MechanicalDesignAndDraughtingRelationship, anent, ent);
+ RWStepRepr_RWMechanicalDesignAndDraughtingRelationship aTool;
+ aTool.WriteStep(SW, anent);
+ }
+ break;
default:
return;
}
RWStepRepr_RWMaterialPropertyRepresentation.hxx
RWStepRepr_RWMeasureRepresentationItem.cxx
RWStepRepr_RWMeasureRepresentationItem.hxx
+RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.cxx
+RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx
RWStepRepr_RWParallelOffset.cxx
RWStepRepr_RWParallelOffset.hxx
RWStepRepr_RWParametricRepresentationContext.cxx
--- /dev/null
+// Copyright (c) 2024 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 <Standard_Type.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <RWStepRepr_RWMechanicalDesignAndDraughtingRelationship.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_Representation.hxx>
+#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
+
+RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::
+ RWStepRepr_RWMechanicalDesignAndDraughtingRelationship() {}
+
+void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::ReadStep
+ (const Handle(StepData_StepReaderData)& theData,
+ const Standard_Integer theNum,
+ Handle(Interface_Check)& theAch,
+ const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const
+{
+ // Number of Parameter Control
+ if (!theData->CheckNbParams(theNum, 4, theAch, "mechanical_design_and_draughting_relationship")) return;
+
+ // Inherited field : name
+ Handle(TCollection_HAsciiString) aName;
+ theData->ReadString (theNum, 1, "name", theAch, aName);
+
+ // Inherited field : description
+ Handle(TCollection_HAsciiString) aDescription;
+ if (theData->IsParamDefined (theNum, 2)) {
+ theData->ReadString (theNum, 2, "description", theAch, aDescription);
+ }
+ // Inherited field : rep_1
+ Handle(StepRepr_Representation) aRep1;
+ theData->ReadEntity(theNum, 3, "rep_1", theAch, STANDARD_TYPE(StepRepr_Representation), aRep1);
+
+ // Inherited field : rep_2
+ Handle(StepRepr_Representation) aRep2;
+ theData->ReadEntity(theNum, 4, "rep_2", theAch, STANDARD_TYPE(StepRepr_Representation), aRep2);
+
+// Initialisation of the read entity
+ theEnt->Init(aName, aDescription, aRep1, aRep2);
+}
+
+void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::WriteStep
+ (StepData_StepWriter& theSW,
+ const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const
+{
+ // Inherited field : name
+ theSW.Send(theEnt->Name());
+
+ // Inherited field : description
+ theSW.Send(theEnt->Description());
+
+ // Inherited field : rep_1
+ theSW.Send(theEnt->Rep1());
+
+ // Inherited field : rep_2
+ theSW.Send(theEnt->Rep2());
+}
+
+void RWStepRepr_RWMechanicalDesignAndDraughtingRelationship::Share
+ (const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt,
+ Interface_EntityIterator& theIter) const
+{
+ theIter.GetOneItem(theEnt->Rep1());
+ theIter.GetOneItem(theEnt->Rep2());
+}
--- /dev/null
+// Copyright (c) 2024 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 _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile
+#define _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepRepr_MechanicalDesignAndDraughtingRelationship;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+
+//! Read & Write Module for MechanicalDesignAndDraughtingRelationship
+class RWStepRepr_RWMechanicalDesignAndDraughtingRelationship
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+ Standard_EXPORT RWStepRepr_RWMechanicalDesignAndDraughtingRelationship();
+
+ Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& theData,
+ const Standard_Integer theNum,
+ Handle(Interface_Check)& theAch,
+ const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const;
+
+ Standard_EXPORT void WriteStep(StepData_StepWriter& theSW,
+ const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt) const;
+
+ Standard_EXPORT void Share(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theEnt,
+ Interface_EntityIterator& theIter) const;
+
+};
+#endif // _RWStepRepr_RWMechanicalDesignAndDraughtingRelationship_HeaderFile
#include <XSAlgo_AlgoContainer.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
+#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <Geom_Plane.hxx>
IMPLEMENT_STANDARD_RTTIEXT(STEPControl_ActorRead,Transfer_ActorOfTransientProcess)
}
+//=======================================================================
+//function : TransferEntity
+//purpose :
+//=======================================================================
+Handle(TransferBRep_ShapeBinder) STEPControl_ActorRead::TransferEntity(
+ const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR,
+ const Handle(Transfer_TransientProcess)& theTP,
+ const StepData_Factors& theLocalFactors,
+ const Message_ProgressRange& theProgress)
+{
+ Handle(TransferBRep_ShapeBinder) aShBinder;
+ if (theMDADR.IsNull())
+ return aShBinder;
+
+ Standard_Boolean aResetUnits = Standard_False;
+ Handle(StepRepr_Representation) anOldSRContext = mySRContext;
+ StepData_Factors aLocalFactors = theLocalFactors;
+ TopoDS_Compound aComp;
+ BRep_Builder aBuilder;
+ aBuilder.MakeCompound(aComp);
+
+ Message_ProgressScope aPS(theProgress, NULL, 2);
+ for (Standard_Integer anIndex = 1; anIndex <= 2; anIndex++)
+ {
+ Message_ProgressRange aRange = aPS.Next();
+ Handle(StepRepr_Representation) aRepr = (anIndex == 1) ? theMDADR->Rep1() : theMDADR->Rep2();
+ if (aRepr.IsNull())
+ continue;
+ if (mySRContext.IsNull() || aRepr->ContextOfItems() != mySRContext->ContextOfItems())
+ {
+ PrepareUnits(aRepr, theTP, aLocalFactors);
+ aResetUnits = Standard_True;
+ }
+ Handle(Transfer_Binder) aBinder;
+ if (aRepr->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)))
+ {
+ Handle(StepShape_ShapeRepresentation) aShapeRepr = Handle(StepShape_ShapeRepresentation)::DownCast(aRepr);
+ Standard_Boolean isBound = Standard_False;
+ if (!theTP->IsBound(aShapeRepr))
+ {
+ aBinder = TransferEntity(aShapeRepr, theTP, theLocalFactors, isBound, false, aRange);
+ }
+ else
+ {
+ aBinder = theTP->Find(aShapeRepr);
+ }
+ }
+ TopoDS_Shape aResult = TransferBRep::ShapeResult(aBinder);
+ if (!aResult.IsNull())
+ {
+ aBuilder.Add(aComp, aResult);
+ }
+ }
+
+ aShBinder = new TransferBRep_ShapeBinder(aComp);
+ mySRContext = anOldSRContext;
+ if (anOldSRContext.IsNull() || aResetUnits)
+ {
+ PrepareUnits(anOldSRContext, theTP, aLocalFactors);
+ }
+
+ theTP->Bind(theMDADR, aShBinder);
+
+ return aShBinder;
+}
+
//=======================================================================
//function : IsNeedRepresentation
//purpose :
Standard_Integer aNbRep = (theRep == aSRR->Rep1() ? 2 : 1);
aBinder = TransferEntity(aSRR, theTP, theLocalFactors, aNbRep, theUseTrsf, thePS.Next());
}
+ else if (anItem->DynamicType() == STANDARD_TYPE(StepRepr_MechanicalDesignAndDraughtingRelationship))
+ {
+ Handle(StepRepr_MechanicalDesignAndDraughtingRelationship) aMDADR =
+ Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)::DownCast(anItem);
+ aBinder = TransferEntity(aMDADR, theTP, theLocalFactors, thePS.Next());
+ }
else if (theReadConstructiveGeomRR &&
anItem->DynamicType() == STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship))
{
class TopoDS_Shell;
class TopoDS_Compound;
class StepRepr_ConstructiveGeometryRepresentationRelationship;
+class StepRepr_MechanicalDesignAndDraughtingRelationship;
class StepData_StepModel;
const Handle(Transfer_TransientProcess)& theTP,
const StepData_Factors& theLocalFactors = StepData_Factors());
+ //! Transfers MechanicalDesignAndDraughtingRelationship entity
+ Handle(TransferBRep_ShapeBinder) TransferEntity(const Handle(StepRepr_MechanicalDesignAndDraughtingRelationship)& theMDADR,
+ const Handle(Transfer_TransientProcess)& theTP,
+ const StepData_Factors& theLocalFactors,
+ const Message_ProgressRange& theProgress);
+
//! Translates file by old way when CDSR are roots . Acts only if "read.step.product_mode" is equal Off.
Standard_EXPORT Handle(TransferBRep_ShapeBinder) OldWay
(const Handle(Standard_Transient)& start,
#include <StepRepr_CharacterizedRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
#include <StepVisual_CharacterizedObjAndRepresentationAndDraughtingModel.hxx>
#include <StepVisual_AnnotationFillArea.hxx>
#include <StepVisual_AnnotationFillAreaOccurrence.hxx>
types.Bind(STANDARD_TYPE(StepBasic_GeneralPropertyRelationship), 821);
types.Bind(STANDARD_TYPE(StepRepr_BooleanRepresentationItem), 822);
types.Bind(STANDARD_TYPE(StepRepr_RealRepresentationItem), 823);
+ types.Bind(STANDARD_TYPE(StepRepr_MechanicalDesignAndDraughtingRelationship), 824);
}
StepRepr_MaterialPropertyRepresentation.hxx
StepRepr_MeasureRepresentationItem.cxx
StepRepr_MeasureRepresentationItem.hxx
+StepRepr_MechanicalDesignAndDraughtingRelationship.cxx
+StepRepr_MechanicalDesignAndDraughtingRelationship.hxx
StepRepr_NextAssemblyUsageOccurrence.cxx
StepRepr_NextAssemblyUsageOccurrence.hxx
StepRepr_ParallelOffset.cxx
--- /dev/null
+// Copyright (c) 2024 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 <Standard_Type.hxx>
+#include <StepRepr_MechanicalDesignAndDraughtingRelationship.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepRepr_MechanicalDesignAndDraughtingRelationship, StepRepr_RepresentationRelationship)
+
+StepRepr_MechanicalDesignAndDraughtingRelationship::StepRepr_MechanicalDesignAndDraughtingRelationship() {}
--- /dev/null
+// Copyright (c) 2024 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 _StepRepr_MechanicalDesignAndDraughtingRelationship_HeaderFile
+#define _StepRepr_MechanicalDesignAndDraughtingRelationship_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepRepr_RepresentationRelationship.hxx>
+
+
+class StepRepr_MechanicalDesignAndDraughtingRelationship;
+DEFINE_STANDARD_HANDLE(StepRepr_MechanicalDesignAndDraughtingRelationship, StepRepr_RepresentationRelationship)
+
+
+class StepRepr_MechanicalDesignAndDraughtingRelationship : public StepRepr_RepresentationRelationship
+{
+public:
+
+ //! Returns a MechanicalDesignAndDraughtingRelationship
+ Standard_EXPORT StepRepr_MechanicalDesignAndDraughtingRelationship();
+
+ DEFINE_STANDARD_RTTIEXT(StepRepr_MechanicalDesignAndDraughtingRelationship, StepRepr_RepresentationRelationship)
+};
+
+#endif // _StepRepr_MechanicalDesignAndDraughtingRelationship_HeaderFile
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+puts "TODO CR23096 ALL: TPSTAT : Faulty"
+puts "TODO CR23096 ALL: LABELS : Faulty"
+
+
+set filename bug29241.stp
+
+set ref_data {
+DATA : Faulties = 0 ( 22 ) Warnings = 0 ( 22 ) Summary = 0 ( 44 )
+TPSTAT : Faulties = 0 ( 0 ) Warnings = 2 ( 1 ) Summary = 2 ( 1 )
+CHECKSHAPE : Wires = 0 ( 0 ) Faces = 0 ( 0 ) Shells = 0 ( 0 ) Solids = 0 ( 0 )
+NBSHAPES : Solid = 1 ( 1 ) Shell = 2 ( 2 ) Face = 205 ( 205 )
+STATSHAPE : Solid = 1 ( 1 ) Shell = 2 ( 2 ) Face = 205 ( 205 ) FreeWire = 0 ( 1 )
+TOLERANCE : MaxTol = 0.000584860357 ( 0.0009118447559 ) AvgTol = 2.354671626e-005 ( 3.258060117e-005 )
+LABELS : N0Labels = 1 ( 1 ) N1Labels = 3 ( 18 ) N2Labels = 0 ( 0 ) TotalLabels = 4 ( 19 ) NameLabels = 1 ( 1 ) ColorLabels = 3 ( 3 ) LayerLabels = 0 ( 0 )
+PROPS : Centroid = 0 ( 0 ) Volume = 0 ( 0 ) Area = 0 ( 0 )
+NCOLORS : NColors = 3 ( 3 )
+COLORS : Colors = LIGHTSTEELBLUE1 PALEGOLDENROD WHITE ( LIGHTSTEELBLUE1 PALEGOLDENROD WHITE )
+NLAYERS : NLayers = 0 ( 0 )
+LAYERS : Layers = ( )
+
+}