#include <RWStepVisual_RWTessellatedGeometricSet.hxx>
#include <RWStepVisual_RWTessellatedCurveSet.hxx>
#include <RWStepVisual_RWCoordinatesList.hxx>
-
+#include <StepRepr_CharacterizedRepresentation.hxx>
+#include <RWStepRepr_RWCharacterizedRepresentation.hxx>
+#include <StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
+#include <RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
static Standard_Integer catsh,catdr,catstr,catdsc,cataux;
tool.Share(anent,iter);
}
break;
+ case 714:
+ {
+ DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent);
+ RWStepRepr_RWCharacterizedRepresentation tool;
+ tool.Share(anent, iter);
+ }
+ break;
+ case 715:
+ {
+ DeclareAndCast(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, anent, ent);
+ RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation tool;
+ tool.Share(anent, iter);
+ }
+ break;
default : break;
}
}
case 706:
ent = new StepDimTol_GeoTolAndGeoTolWthMaxTol;
break;
-
case 707:
ent = new StepVisual_TessellatedAnnotationOccurrence;
break;
-
case 708:
ent = new StepVisual_TessellatedItem;
break;
-
case 709:
ent = new StepVisual_TessellatedGeometricSet;
break;
-
case 710:
ent = new StepVisual_TessellatedCurveSet;
break;
-
case 711:
ent = new StepVisual_CoordinatesList;
break;
-
case 712:
ent = new StepRepr_ConstructiveGeometryRepresentation;
break;
-
case 713:
ent = new StepRepr_ConstructiveGeometryRepresentationRelationship;
break;
+ case 714:
+ ent = new StepRepr_CharacterizedRepresentation;
+ break;
+ case 715:
+ ent = new StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation;
+ break;
+
default:
return Standard_False;
case 711: return cataux;
case 712:
case 713: return catsh;
+ case 714: return catstr;
+ case 715: return catdsc;
default : break;
}
#include <StepVisual_TessellatedGeometricSet.hxx>
#include <StepVisual_TessellatedCurveSet.hxx>
#include <StepVisual_CoordinatesList.hxx>
+#include <StepRepr_CharacterizedRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
#include <RWStepVisual_RWTessellatedGeometricSet.hxx>
#include <RWStepVisual_RWTessellatedCurveSet.hxx>
#include <RWStepVisual_RWCoordinatesList.hxx>
+#include <RWStepRepr_RWCharacterizedRepresentation.hxx>
#include <RWStepRepr_RWConstructiveGeometryRepresentation.hxx>
#include <RWStepRepr_RWConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
+#include <RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
+
// -- General Declarations (Recognize, StepType) ---
static TCollection_AsciiString Reco_CoordinatesList("COORDINATES_LIST");
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentation("CONSTRUCTIVE_GEOMETRY_REPRESENTATION");
static TCollection_AsciiString Reco_ConstructiveGeometryRepresentationRelationship("CONSTRUCTIVE_GEOMETRY_REPRESENTATION_RELATIONSHIP");
+static TCollection_AsciiString Reco_CharacterizedRepresentation("CHARACTERIZED_REPRESENTATION");
// -- Definition of the libraries --
static Handle(Dico_DictionaryOfInteger) typenums;
typenums->SetItem ( Reco_CoordinatesList, 711);
typenums->SetItem ( Reco_ConstructiveGeometryRepresentation, 712);
typenums->SetItem ( Reco_ConstructiveGeometryRepresentationRelationship, 713);
+ typenums->SetItem ( Reco_CharacterizedRepresentation, 714);
// SHORT NAMES
types(4).IsEqual(StepType(624))))) {
return 706;
}
+ else if (types(1).IsEqual(StepType(402)) &&
+ types(2).IsEqual(StepType(714)) &&
+ types(3).IsEqual(StepType(441)) &&
+ types(4).IsEqual(StepType(245))) {
+ return 715;
+ }
}
else if (NbComp == 3) {
if ((types(1).IsEqual(StepType(158))) &&
return Standard_True;
case 706:
return Standard_True;
+ case 715:
+ return Standard_True;
default:
return Standard_False;
}
case 711 : return Reco_CoordinatesList;
case 712 : return Reco_ConstructiveGeometryRepresentation;
case 713 : return Reco_ConstructiveGeometryRepresentationRelationship;
+ case 714 : return Reco_CharacterizedRepresentation;
default : return PasReco;
}
types.Append (StepType(676));
types.Append (StepType(625));
break;
+ case 715:
+ types.Append(StepType(402));
+ types.Append(StepType(714));
+ types.Append(StepType(441));
+ types.Append(StepType(245));
}
return Standard_True;
}
tool.ReadStep (data,num,ach,anent);
}
break;
+ case 714:
+ {
+ DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent);
+ RWStepRepr_RWCharacterizedRepresentation tool;
+ tool.ReadStep(data, num, ach, anent);
+ }
+ break;
+ case 715:
+ {
+ DeclareAndCast(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, anent, ent);
+ RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation tool;
+ tool.ReadStep(data, num, ach, anent);
+ }
+ break;
default:
ach->AddFail("Type Mismatch when reading - Entity");
tool.WriteStep(SW,anent);
}
break;
+ case 714:
+ {
+ DeclareAndCast(StepRepr_CharacterizedRepresentation, anent, ent);
+ RWStepRepr_RWCharacterizedRepresentation tool;
+ tool.WriteStep(SW, anent);
+ }
+ break;
+ case 715:
+ {
+ DeclareAndCast(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, anent, ent);
+ RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation tool;
+ tool.WriteStep(SW, anent);
+ }
+ break;
default:
return;
RWStepRepr_RWBetweenShapeAspect.hxx
RWStepRepr_RWCentreOfSymmetry.cxx
RWStepRepr_RWCentreOfSymmetry.hxx
+RWStepRepr_RWCharacterizedRepresentation.cxx
+RWStepRepr_RWCharacterizedRepresentation.hxx
RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx
RWStepRepr_RWCompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx
RWStepRepr_RWCompositeGroupShapeAspect.cxx
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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_Check.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <RWStepRepr_RWCharacterizedRepresentation.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_HArray1OfRepresentationItem.hxx>
+#include <StepRepr_CharacterizedRepresentation.hxx>
+#include <StepRepr_RepresentationContext.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+
+//=======================================================================
+//function : RWStepRepr_RWCharacterizedRepresentation
+//purpose :
+//=======================================================================
+RWStepRepr_RWCharacterizedRepresentation::RWStepRepr_RWCharacterizedRepresentation () {}
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+void RWStepRepr_RWCharacterizedRepresentation::ReadStep
+ (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num,
+ Handle(Interface_Check)& ach,
+ const Handle(StepRepr_CharacterizedRepresentation)& ent) const
+{
+ // Number of Parameter Control
+ if (!data->CheckNbParams(num, 4, ach, "characterized_representation")) return;
+
+ // name
+ Handle(TCollection_HAsciiString) aName;
+ data->ReadString (num, 1, "name", ach, aName);
+
+ // description
+ Handle(TCollection_HAsciiString) aDescription;
+ data->ReadString (num, 2, "description", ach, aDescription);
+
+ // items
+ Handle(StepRepr_HArray1OfRepresentationItem) anItems;
+ Handle(StepRepr_RepresentationItem) anItem;
+ Standard_Integer nsub;
+ if (data->ReadSubList (num, 3, "items", ach, nsub)) {
+ Standard_Integer nb = data->NbParams(nsub);
+ anItems = new StepRepr_HArray1OfRepresentationItem (1, nb);
+ for (Standard_Integer i = 1; i <= nb; i ++) {
+ if (data->ReadEntity (nsub, i,"representation_item", ach,
+ STANDARD_TYPE(StepRepr_RepresentationItem), anItem))
+ anItems->SetValue(i, anItem);
+ }
+ }
+
+ // context_of_items
+ Handle(StepRepr_RepresentationContext) aContextOfItems;
+ data->ReadEntity(num, 4, "context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
+
+ // Initialization of the read entity
+ ent->Init(aName, aDescription, anItems, aContextOfItems);
+}
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+void RWStepRepr_RWCharacterizedRepresentation::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepRepr_CharacterizedRepresentation)& ent) const
+{
+ // name
+ SW.Send(ent->Name());
+
+ // description
+ if (!ent->Description().IsNull())
+ SW.Send(ent->Description());
+ else
+ SW.SendUndef();
+
+ // items
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->NbItems(); i ++) {
+ SW.Send(ent->ItemsValue(i));
+ }
+ SW.CloseSub();
+
+ // context_of_items
+ SW.Send(ent->ContextOfItems());
+}
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+void RWStepRepr_RWCharacterizedRepresentation::Share
+ (const Handle(StepRepr_CharacterizedRepresentation)& ent,
+ Interface_EntityIterator& iter) const
+{
+ Standard_Integer nbElem = ent->NbItems();
+ for (Standard_Integer i=1; i <= nbElem; i++) {
+ iter.GetOneItem(ent->ItemsValue(i));
+ }
+ iter.GetOneItem(ent->ContextOfItems());
+}
+
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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_RWCharacterizedRepresentation_HeaderFile
+#define _RWStepRepr_RWCharacterizedRepresentation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepRepr_CharacterizedRepresentation;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+
+//! Read & Write Module for CharacterizedRepresentation
+class RWStepRepr_RWCharacterizedRepresentation
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+
+ Standard_EXPORT RWStepRepr_RWCharacterizedRepresentation();
+
+ Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepRepr_CharacterizedRepresentation)& ent) const;
+
+ Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepRepr_CharacterizedRepresentation)& ent) const;
+
+ Standard_EXPORT void Share (const Handle(StepRepr_CharacterizedRepresentation)& ent, Interface_EntityIterator& iter) const;
+};
+
+#endif // _RWStepRepr_RWCharacterizedRepresentation_HeaderFile
RWStepVisual_RWCameraModelD3.hxx
RWStepVisual_RWCameraUsage.cxx
RWStepVisual_RWCameraUsage.hxx
+RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx
+RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx
RWStepVisual_RWColour.cxx
RWStepVisual_RWColour.hxx
RWStepVisual_RWColourRgb.cxx
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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_Check.hxx>
+#include <Interface_EntityIterator.hxx>
+#include <RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
+#include <StepData_StepReaderData.hxx>
+#include <StepData_StepWriter.hxx>
+#include <StepRepr_RepresentationContext.hxx>
+#include <StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
+
+//=======================================================================
+//function : RWStepVisual_RWChObjAndChReprAndDModelAndRepr
+//purpose :
+//=======================================================================
+RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::
+ RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation()
+{
+}
+
+
+//=======================================================================
+//function : ReadStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::ReadStep
+ (const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num0, Handle(Interface_Check)& ach,
+ const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const
+{
+ Standard_Integer num = 0;
+ data->NamedForComplex("REPRESENTATION","RPRSNT", num0, num, ach);
+ if (!data->CheckNbParams(num, 3, ach, "shape_aspect")) return;
+
+ // name
+ Handle(TCollection_HAsciiString) aName;
+ data->ReadString(num, 1, "name", ach, aName);
+
+ // items
+ Handle(StepRepr_HArray1OfRepresentationItem) anItems;
+ Handle(StepRepr_RepresentationItem) anItem;
+ Standard_Integer nsub;
+ if (data->ReadSubList(num, 2, "items", ach, nsub)) {
+ Standard_Integer nb = data->NbParams(nsub);
+ anItems = new StepRepr_HArray1OfRepresentationItem(1, nb);
+ for (Standard_Integer i = 1; i <= nb; i++) {
+ if (data->ReadEntity(nsub, i, "representation_item", ach,
+ STANDARD_TYPE(StepRepr_RepresentationItem), anItem))
+ anItems->SetValue(i, anItem);
+ }
+ }
+
+ // context_of_items
+ Handle(StepRepr_RepresentationContext) aContextOfItems;
+ data->ReadEntity(num, 3, "context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aContextOfItems);
+
+ // Initialize the entity
+ ent->Init(aName, anItems, aContextOfItems);
+}
+
+
+//=======================================================================
+//function : WriteStep
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::WriteStep
+ (StepData_StepWriter& SW,
+ const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const
+{
+ SW.StartEntity("CHARACTERIZED_OBJECT");
+ SW.SendDerived();
+ SW.SendDerived();
+ SW.StartEntity("CHARACTERIZED_REPRESENTATION");
+ SW.StartEntity("DRAUGHTING_MODEL");
+ SW.StartEntity("REPRESENTATION");
+ SW.Send(ent->Name());
+ SW.OpenSub();
+ for (Standard_Integer i = 1; i <= ent->NbItems(); i++) {
+ SW.Send(ent->ItemsValue(i));
+ }
+ SW.CloseSub();
+ SW.Send(ent->ContextOfItems());
+}
+
+
+//=======================================================================
+//function : Share
+//purpose :
+//=======================================================================
+
+void RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::Share
+(const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent,
+ Interface_EntityIterator& iter) const
+{
+ Standard_Integer nbElem = ent->NbItems();
+ for (Standard_Integer i = 1; i <= nbElem; i++) {
+ iter.GetOneItem(ent->ItemsValue(i));
+ }
+ iter.GetOneItem(ent->ContextOfItems());
+}
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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 _RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile
+#define _RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_DefineAlloc.hxx>
+#include <Standard_Handle.hxx>
+
+#include <Standard_Integer.hxx>
+class StepData_StepReaderData;
+class Interface_Check;
+class StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation;
+class StepData_StepWriter;
+class Interface_EntityIterator;
+
+
+//! Read & Write Module for complex STEP entity Characterized_Object & Characterized_Representation & Draughting_Model & Representation
+class RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation
+{
+public:
+
+ DEFINE_STANDARD_ALLOC
+
+
+ Standard_EXPORT RWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation();
+
+ Standard_EXPORT void ReadStep(const Handle(StepData_StepReaderData)& data,
+ const Standard_Integer num, Handle(Interface_Check)& ach,
+ const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const;
+
+ Standard_EXPORT void WriteStep(StepData_StepWriter& SW,
+ const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent) const;
+
+ Standard_EXPORT void Share(const Handle(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation)& ent,
+ Interface_EntityIterator& iter) const;
+};
+#endif // _RRWStepVisual_RWCharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile
#include <StepBasic_ProductDefinitionFormation.hxx>
#include <StepBasic_ProductDefinitionRelationship.hxx>
#include <StepBasic_SiUnit.hxx>
+#include <StepBasic_SiUnitAndLengthUnit.hxx>
#include <StepBasic_Unit.hxx>
#include <STEPCAFControl_Controller.hxx>
#include <STEPCAFControl_DataMapIteratorOfDataMapOfShapePD.hxx>
#include <StepDimTol_GeoTolAndGeoTolWthMod.hxx>
#include <StepDimTol_GeometricToleranceWithMaximumTolerance.hxx>
#include <StepGeom_Axis2Placement3d.hxx>
+#include <StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext.hxx>
+#include <StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx.hxx>
#include <StepGeom_Plane.hxx>
#include <StepGeom_Polyline.hxx>
#include <StepDimTol_PlacedDatumTargetFeature.hxx>
#include <StepVisual_AnnotationPlane.hxx>
#include <StepVisual_DraughtingCallout.hxx>
#include <StepVisual_DraughtingCalloutElement.hxx>
+#include <StepVisual_DraughtingModel.hxx>
#include <StepVisual_Invisibility.hxx>
#include <StepVisual_LayeredItem.hxx>
#include <StepVisual_PlanarBox.hxx>
//function : GetLengthConversionFactor
//purpose :
//=======================================================================
-static Standard_Boolean GetLengthConversionFactor(Handle(StepBasic_NamedUnit)& NU,
+static Standard_Boolean GetLengthConversionFactor(const Handle(StepBasic_NamedUnit)& NU,
Standard_Real& afact)
{
afact=1.;
return Standard_True;
}
+//=======================================================================
+//function : GetLengthConversionFactorFromContext
+//purpose :
+//=======================================================================
+static Standard_Boolean GetLengthConversionFactorFromContext(const Handle(StepRepr_RepresentationContext)& theRC,
+ Standard_Real& theFact)
+{
+ theFact = 1;
+ if (theRC.IsNull())
+ return Standard_False;
+ Handle(StepBasic_ConversionBasedUnitAndLengthUnit) aSiLU;
+ Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext) aCtx =
+ Handle(StepGeom_GeometricRepresentationContextAndGlobalUnitAssignedContext)::DownCast(theRC);
+ if (!aCtx.IsNull()) {
+ for (Standard_Integer j = 1; j <= aCtx->NbUnits(); j++) {
+ if (aCtx->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) {
+ aSiLU = Handle(StepBasic_ConversionBasedUnitAndLengthUnit)::DownCast(aCtx->UnitsValue(j));
+ break;
+ }
+ }
+ }
+ if (aSiLU.IsNull()) {
+ Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx) aCtx1 =
+ Handle(StepGeom_GeomRepContextAndGlobUnitAssCtxAndGlobUncertaintyAssCtx)::DownCast(theRC);
+ if (!aCtx1.IsNull()) {
+ for (Standard_Integer j = 1; j <= aCtx1->NbUnits(); j++) {
+ if (aCtx1->UnitsValue(j)->IsKind(STANDARD_TYPE(StepBasic_ConversionBasedUnitAndLengthUnit))) {
+ aSiLU = Handle(StepBasic_ConversionBasedUnitAndLengthUnit)::DownCast(aCtx1->UnitsValue(j));
+ break;
+ }
+ }
+ }
+ }
+ if (aSiLU.IsNull())
+ return Standard_False;
+ return GetLengthConversionFactor(aSiLU, theFact);
+
+}
//=======================================================================
//function : GetAngleConversionFactor
if (aDMIA.IsNull() || aDMIA->NbIdentifiedItem() == 0)
return;
+ // calculate units
+ Handle(StepVisual_DraughtingModel) aDModel =
+ Handle(StepVisual_DraughtingModel)::DownCast(aDMIA->UsedRepresentation());
+ Standard_Real aFact = 1;
+ if (!aDModel.IsNull())
+ GetLengthConversionFactorFromContext(aDModel->ContextOfItems(), aFact);
+
// retrieve AnnotationPlane
Standard_Boolean isHasPlane = Standard_False;
gp_Ax2 aPlaneAxes;
//set location of the annotation plane
Handle(TColStd_HArray1OfReal) aLocCoords;
Handle(StepGeom_CartesianPoint) aLoc = aA2P3D->Location();
- gp_Pnt aLocPos( aLoc->CoordinatesValue (1), aLoc->CoordinatesValue (2), aLoc->CoordinatesValue (3));
+ gp_Pnt aLocPos( aLoc->CoordinatesValue(1) * aFact, aLoc->CoordinatesValue(2) * aFact, aLoc->CoordinatesValue(3) * aFact);
aPlaneAxes.SetLocation(aLocPos);
isHasPlane = Standard_True;
}
}
}
}
- //case of tesselated entities
+ //case of tessellated entities
else
{
Handle(StepRepr_RepresentationItem) aTessItem = anItem->Item();
Standard_Integer indnext = anIndexes->Value(n + 1);
if( ind > aPoints->Length() || indnext > aPoints->Length())
continue;
- gp_Pnt aP1(aPoints->Value(ind));
- gp_Pnt aP2(aPoints->Value(indnext));
+ gp_Pnt aP1(aPoints->Value(ind) * aFact);
+ gp_Pnt aP2(aPoints->Value(indnext) * aFact);
BRepBuilderAPI_MakeEdge aMaker(aP1, aP2);
if( aMaker.IsDone())
{
{
Handle(Transfer_TransientProcess) aTP = theTR->TransientProcess();
const Interface_Graph& aGraph = aTP->Graph();
+
+ //calculate units
+ Standard_Real aFact = 1;
+ Handle(StepShape_ShapeDimensionRepresentation) aSDR = NULL;
+ for (Interface_EntityIterator anIt = aGraph.Sharings(theGDT); aSDR.IsNull() && anIt.More(); anIt.Next()) {
+ aSDR = Handle(StepShape_ShapeDimensionRepresentation)::DownCast(anIt.Value());
+ }
+ if (!aSDR.IsNull())
+ GetLengthConversionFactorFromContext(aSDR->ContextOfItems(), aFact);
if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalSize))) {
// retrieve derived geometry
}
// set connection point to object
- gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3));
+ gp_Pnt aPnt(aPoint->CoordinatesValue(1) * aFact, aPoint->CoordinatesValue(2) * aFact, aPoint->CoordinatesValue(3) * aFact);
theDimObject->SetPoint(aPnt);
}
else if (theGDT->IsKind(STANDARD_TYPE(StepShape_DimensionalLocation))) {
}
if (!aPoint.IsNull()) {
// set connection point to object
- gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3));
+ gp_Pnt aPnt(aPoint->CoordinatesValue(1) * aFact, aPoint->CoordinatesValue(2) * aFact, aPoint->CoordinatesValue(3) * aFact);
theDimObject->SetPoint(aPnt);
}
}
}
if (!aPoint.IsNull()) {
// set connection point to object
- gp_Pnt aPnt(aPoint->CoordinatesValue(1), aPoint->CoordinatesValue(2), aPoint->CoordinatesValue(3));
+ gp_Pnt aPnt(aPoint->CoordinatesValue(1) * aFact, aPoint->CoordinatesValue(2) * aFact, aPoint->CoordinatesValue(3) * aFact);
theDimObject->SetPoint2(aPnt);
}
}
#include <StepVisual_TessellatedGeometricSet.hxx>
#include <StepVisual_TessellatedCurveSet.hxx>
#include <StepVisual_CoordinatesList.hxx>
+#include <StepRepr_CharacterizedRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentation.hxx>
#include <StepRepr_ConstructiveGeometryRepresentationRelationship.hxx>
+#include <StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
static int init = 0;
static Interface_DataMapOfTransientInteger types(800);
types.Bind (STANDARD_TYPE(StepVisual_CoordinatesList), 711);
types.Bind (STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentation), 712);
types.Bind (STANDARD_TYPE(StepRepr_ConstructiveGeometryRepresentationRelationship), 713);
+ types.Bind (STANDARD_TYPE(StepRepr_CharacterizedRepresentation), 714);
+ types.Bind (STANDARD_TYPE(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation), 715);
}
StepRepr_CentreOfSymmetry.hxx
StepRepr_CharacterizedDefinition.cxx
StepRepr_CharacterizedDefinition.hxx
+StepRepr_CharacterizedRepresentation.cxx
+StepRepr_CharacterizedRepresentation.hxx
StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.cxx
StepRepr_CompGroupShAspAndCompShAspAndDatumFeatAndShAsp.hxx
StepRepr_CompositeGroupShapeAspect.cxx
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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_CharacterizedRepresentation.hxx>
+#include <StepRepr_RepresentationContext.hxx>
+#include <StepRepr_RepresentationItem.hxx>
+#include <TCollection_HAsciiString.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepRepr_CharacterizedRepresentation, StepRepr_Representation)
+
+//=======================================================================
+//function : StepRepr_CharacterizedRepresentation
+//purpose :
+//=======================================================================
+StepRepr_CharacterizedRepresentation::StepRepr_CharacterizedRepresentation () {}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+void StepRepr_CharacterizedRepresentation::Init
+ (const Handle(TCollection_HAsciiString)& theName,
+ const Handle(TCollection_HAsciiString)& theDescription,
+ const Handle(StepRepr_HArray1OfRepresentationItem)& theItems,
+ const Handle(StepRepr_RepresentationContext)& theContextOfItems)
+{
+ myDescription = theDescription;
+ StepRepr_Representation::Init(theName, theItems, theContextOfItems);
+}
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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_CharacterizedRepresentation_HeaderFile
+#define _StepRepr_CharacterizedRepresentation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepRepr_Representation.hxx>
+class TCollection_HAsciiString;
+class StepRepr_RepresentationContext;
+class StepRepr_RepresentationItem;
+
+
+class StepRepr_CharacterizedRepresentation;
+DEFINE_STANDARD_HANDLE(StepRepr_CharacterizedRepresentation, StepRepr_Representation)
+
+
+class StepRepr_CharacterizedRepresentation : public StepRepr_Representation
+{
+
+public:
+
+ Standard_EXPORT StepRepr_CharacterizedRepresentation();
+
+ //! Returns a CharacterizedRepresentation
+ Standard_EXPORT void Init (const Handle(TCollection_HAsciiString)& theName,
+ const Handle(TCollection_HAsciiString)& theDescription,
+ const Handle(StepRepr_HArray1OfRepresentationItem)& theItems,
+ const Handle(StepRepr_RepresentationContext)& theContextOfItems);
+
+ Standard_EXPORT void SetDescription (const Handle(TCollection_HAsciiString)& theDescription) {
+ myDescription = theDescription;
+ }
+
+ Standard_EXPORT Handle(TCollection_HAsciiString) Description() const {
+ return myDescription;
+ }
+
+ DEFINE_STANDARD_RTTIEXT(StepRepr_CharacterizedRepresentation, StepRepr_Representation)
+
+private:
+
+ Handle(TCollection_HAsciiString) myDescription;
+
+};
+#endif // _StepRepr_CharacterizedRepresentation_HeaderFile
StepVisual_CameraUsage.cxx
StepVisual_CameraUsage.hxx
StepVisual_CentralOrParallel.hxx
+StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.cxx
+StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx
StepVisual_Colour.cxx
StepVisual_Colour.hxx
StepVisual_ColourRgb.cxx
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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 <StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, StepVisual_DraughtingModel)
+
+//=======================================================================
+//function : StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation
+//purpose :
+//=======================================================================
+StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation::StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation() { }
--- /dev/null
+// Created on: 2016-08-25
+// Created by: Irina KRYLOVA
+// Copyright (c) 2016 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 _StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile
+#define _StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <StepVisual_DraughtingModel.hxx>
+
+class StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation;
+DEFINE_STANDARD_HANDLE(StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, StepVisual_DraughtingModel)
+//! Added for Dimensional Tolerances
+//! Complex STEP entity Characterized_Object & Characterized_Representation & Draughting_Model & Representation
+class StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation : public StepVisual_DraughtingModel
+{
+
+public:
+
+ Standard_EXPORT StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation();
+
+ DEFINE_STANDARD_RTTIEXT(CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation, StepVisual_DraughtingModel)
+
+};
+#endif // _StepVisual_CharacterizedObjectAndCharacterizedRepresentationAndDraughtingModelAndRepresentation_HeaderFile
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_06_asme1_cr3000_rd.prt.stp
+puts "TODO CR27235 ALL:Error : 4 differences with reference data found :"
+puts "TODO CR27235 ALL:Error on writing file"
+
+set ref_data {
+Centre of mass: 571.08730967855467 2205.0751810551806 -1537.7275040606771
+Mass: 535373.51735687314
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_06_asme1_ct5240_rd.stp
+puts "TODO CR27235 ALL:Error : 4 differences with reference data found :"
+puts "TODO CR27235 ALL:Error on writing file"
+
+set ref_data {
+Centre of mass: 1.2441670631221204 66.716892937106863 -65.116654400171385
+Mass: 21888.331129713944
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_06_asme1_ct5240_rd-1.stp
+puts "TODO CR27235 ALL:Error : 4 differences with reference data found :"
+puts "TODO CR27235 ALL:Error on writing file"
+
+set ref_data {
+Centre of mass: 31.601843403303537 1694.6090806025425 -1653.9630217643687
+Mass: 555963.61069472972
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_08_asme1_cr3000_rc.prt.stp
+puts "TODO CR27235 ALL:Error : 4 differences with reference data found :"
+puts "TODO CR27235 ALL:Error on writing file"
+
+set ref_data {
+Centre of mass: 1104.9937982009856 239.05520712068363 1053.1493316328786
+Mass: 707651.56598301406
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_08_asme1_ct5240_rc.stp
+
+set ref_data {
+Centre of mass: 45.768141003733746 46.547197794287811 34.003050733925484
+Mass: 21424.556049917097
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_08_asme1_ct5240_rc-1.stp
+
+set ref_data {
+Centre of mass: 1162.5107814948756 1182.2988239749477 863.67748864175542
+Mass: 544183.72366787971
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_09_asme1_cr3000_rd.prt.stp
+puts "TODO CR27235 ALL:Error : 4 differences with reference data found :"
+puts "TODO CR27235 ALL:Error on writing file"
+
+set ref_data {
+Centre of mass: 502.07157406480525 128.63296443659232 -279.83117556867592
+Mass: 480992.45347041014
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_09_asme1_ct5240_rd.stp
+
+set ref_data {
+Centre of mass: -21.689685614183912 7.533923731961659 -1.9615575977866939
+Mass: 22433.616210032662
+
+}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug27645_nist_ftc_09_asme1_ct5240_rd-1.stp
+
+set ref_data {
+Centre of mass: -550.91801460026238 191.36166279182876 -49.823562983782956
+Mass: 569813.85173483356
+
+}