mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0026371: Implementation of new entities for GD&T
Implement entities: - DatumReferenceCompartment, - DatumReferenceElement, - DatumReferenceModifierWithValue, - DatumSystem, - GeneralDatumReference, - ValueFormatTypeQualifier, - NonUniformZoneDefinition, - ProjectedZoneDefinition, - RunoutZoneDefinition, - RunoutZoneOrientation, - ToleranceZone, - ToleranceZoneDefinition, - ToleranceZoneForm, - ToleranceZoneTarget, - GeometricToleranceWithDefinedAreaUnit, - GeometricToleranceWithDefinedUnit, - GeometricToleranceWithMaximumTolerance, - GeometricToleranceWithModifiers, - UnequallyDisposedGeometricTolerance, - GeometricItemSpecificUsage, - IdAttribute, - IdAttributeSelect, - ItemIdentifiedRepresentationUsage, - ItemIdentifiedRepresentationUsageDefinition, - Apex, - CentreOfSymmetry, - GeometricAlignment, - ParallelOffset, - PerpendicularTo, - Tangent, - AllAroundShapeAspect, - BetweenShapeAspect, - CompositeGroupShapeAspect, - ContinuosShapeAspect, - ReprItemAndLengthMeasureWithUnitAndQRI, - ReprItemAndPlaneAngleMeasureWithUnitAndQRI, - ReprItemAndPlaneAngleMeasureWithUnit, - CompGroupShAspAndCompShAspAndDatumFeatAndShAsp, - CompShAspAndDatumFeatAndShAsp, - GeoTolAndGeoTolWthDatRef, - GeoTolAndGeoTolWthDatRefAndGeoTolWthMod, - GeoTolAndGeoTolWthMod, - GeoTolAndGeoTolWthDatRefAndUneqDisGeoTol, - IntegerRepresentationItem, - ValueRepresentationItem. Modify entities: - GeometricTolerance, - GeometricToleranceWithDatumReference, - ShapeDimensionRepresentation. fix compilation error fix compilation warning
This commit is contained in:
@@ -173,6 +173,8 @@ RWStepShape_RWTransitionalShapeRepresentation.cxx
|
||||
RWStepShape_RWTransitionalShapeRepresentation.hxx
|
||||
RWStepShape_RWTypeQualifier.cxx
|
||||
RWStepShape_RWTypeQualifier.hxx
|
||||
RWStepShape_RWValueFormatTypeQualifier.cxx
|
||||
RWStepShape_RWValueFormatTypeQualifier.hxx
|
||||
RWStepShape_RWVertex.cxx
|
||||
RWStepShape_RWVertex.hxx
|
||||
RWStepShape_RWVertexLoop.cxx
|
||||
|
@@ -23,6 +23,7 @@
|
||||
#include <StepRepr_HArray1OfRepresentationItem.hxx>
|
||||
#include <StepRepr_RepresentationContext.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepShape_HArray1OfShapeDimensionRepresentationItem.hxx>
|
||||
#include <StepShape_ShapeDimensionRepresentation.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@@ -52,15 +53,26 @@ void RWStepShape_RWShapeDimensionRepresentation::ReadStep (const Handle(StepData
|
||||
data->ReadString (num, 1, "representation.name", ach, aRepresentation_Name);
|
||||
|
||||
Handle(StepRepr_HArray1OfRepresentationItem) aRepresentation_Items;
|
||||
Handle(StepShape_HArray1OfShapeDimensionRepresentationItem) anItems;
|
||||
Standard_Integer sub2 = 0;
|
||||
if ( data->ReadSubList (num, 2, "representation.items", ach, sub2) ) {
|
||||
Standard_Integer num2 = sub2;
|
||||
Standard_Integer nb0 = data->NbParams(num2);
|
||||
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
Handle(StepRepr_RepresentationItem) anIt0;
|
||||
data->ReadEntity (num2, i0, "representation.items", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
|
||||
aRepresentation_Items->SetValue(i0, anIt0);
|
||||
Handle(StepRepr_RepresentationItem) anIt0;
|
||||
StepShape_ShapeDimensionRepresentationItem anIt0AP242;
|
||||
if (data->ReadEntity (num2, 1, "representation.items", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0)) {
|
||||
aRepresentation_Items = new StepRepr_HArray1OfRepresentationItem (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
data->ReadEntity (num2, i0, "representation.items", ach, STANDARD_TYPE(StepRepr_RepresentationItem), anIt0);
|
||||
aRepresentation_Items->SetValue(i0, anIt0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
anItems = new StepShape_HArray1OfShapeDimensionRepresentationItem (1, nb0);
|
||||
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
|
||||
data->ReadEntity (num2, i0, "representation.items", ach, anIt0AP242);
|
||||
anItems->SetValue(i0, anIt0AP242);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,9 +80,16 @@ void RWStepShape_RWShapeDimensionRepresentation::ReadStep (const Handle(StepData
|
||||
data->ReadEntity (num, 3, "representation.context_of_items", ach, STANDARD_TYPE(StepRepr_RepresentationContext), aRepresentation_ContextOfItems);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aRepresentation_Name,
|
||||
aRepresentation_Items,
|
||||
aRepresentation_ContextOfItems);
|
||||
if (anItems.IsNull()) {
|
||||
ent->Init(aRepresentation_Name,
|
||||
aRepresentation_Items,
|
||||
aRepresentation_ContextOfItems);
|
||||
}
|
||||
else {
|
||||
ent->Init(aRepresentation_Name,
|
||||
anItems,
|
||||
aRepresentation_ContextOfItems);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@@ -87,9 +106,17 @@ void RWStepShape_RWShapeDimensionRepresentation::WriteStep (StepData_StepWriter&
|
||||
SW.Send (ent->StepRepr_Representation::Name());
|
||||
|
||||
SW.OpenSub();
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
if (ent->ItemsAP242().IsNull()) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
SW.Send (Var0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (Standard_Integer i1=1; i1 <= ent->ItemsAP242()->Length(); i1++ ) {
|
||||
StepShape_ShapeDimensionRepresentationItem Var0 = ent->ItemsAP242()->Value(i1);
|
||||
SW.Send (Var0.Value());
|
||||
}
|
||||
}
|
||||
SW.CloseSub();
|
||||
|
||||
@@ -107,9 +134,17 @@ void RWStepShape_RWShapeDimensionRepresentation::Share (const Handle(StepShape_S
|
||||
|
||||
// Inherited fields of Representation
|
||||
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
if (ent->ItemsAP242().IsNull()) {
|
||||
for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
|
||||
Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
|
||||
iter.AddItem (Var0);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (Standard_Integer i1=1; i1 <= ent->ItemsAP242()->Length(); i1++ ) {
|
||||
StepShape_ShapeDimensionRepresentationItem Var0 = ent->ItemsAP242()->Value(i1);
|
||||
iter.AddItem (Var0.Value());
|
||||
}
|
||||
}
|
||||
|
||||
iter.AddItem (ent->StepRepr_Representation::ContextOfItems());
|
||||
|
62
src/RWStepShape/RWStepShape_RWValueFormatTypeQualifier.cxx
Normal file
62
src/RWStepShape/RWStepShape_RWValueFormatTypeQualifier.cxx
Normal file
@@ -0,0 +1,62 @@
|
||||
// Created on: 2015-07-14
|
||||
// Created by: Irina KRYLOVA
|
||||
// Copyright (c) 2015 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 <RWStepShape_RWValueFormatTypeQualifier.hxx>
|
||||
|
||||
#include <StepData_StepReaderData.hxx>
|
||||
#include <StepData_StepWriter.hxx>
|
||||
#include <StepShape_ValueFormatTypeQualifier.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : RWStepShape_RWValueFormatTypeQualifier
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
RWStepShape_RWValueFormatTypeQualifier::RWStepShape_RWValueFormatTypeQualifier ()
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ReadStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWValueFormatTypeQualifier::ReadStep (const Handle(StepData_StepReaderData)& data,
|
||||
const Standard_Integer num,
|
||||
Handle(Interface_Check)& ach,
|
||||
const Handle(StepShape_ValueFormatTypeQualifier) &ent) const
|
||||
{
|
||||
// Check number of parameters
|
||||
if ( ! data->CheckNbParams(num,1,ach,"value_format_type_qualifier") ) return;
|
||||
|
||||
// Own fields of ValueFormatTypeQualifier
|
||||
|
||||
Handle(TCollection_HAsciiString) aFormatType;
|
||||
data->ReadString (num, 1, "format_type", ach, aFormatType);
|
||||
|
||||
// Initialize entity
|
||||
ent->Init(aFormatType);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : WriteStep
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void RWStepShape_RWValueFormatTypeQualifier::WriteStep (StepData_StepWriter& SW,
|
||||
const Handle(StepShape_ValueFormatTypeQualifier) &ent) const
|
||||
{
|
||||
SW.Send (ent->FormatType());
|
||||
}
|
48
src/RWStepShape/RWStepShape_RWValueFormatTypeQualifier.hxx
Normal file
48
src/RWStepShape/RWStepShape_RWValueFormatTypeQualifier.hxx
Normal file
@@ -0,0 +1,48 @@
|
||||
// Created on: 2015-07-14
|
||||
// Created by: Irina KRYLOVA
|
||||
// Copyright (c) 2015 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 _RWStepShape_RWValueFormatTypeQualifier_HeaderFile
|
||||
#define _RWStepShape_RWValueFormatTypeQualifier_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
|
||||
class StepData_StepReaderData;
|
||||
class Interface_Check;
|
||||
class StepShape_ValueFormatTypeQualifier;
|
||||
class StepData_StepWriter;
|
||||
|
||||
//! Read & Write tool for ValueFormatTypeQualifier
|
||||
class RWStepShape_RWValueFormatTypeQualifier
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Empty constructor
|
||||
Standard_EXPORT RWStepShape_RWValueFormatTypeQualifier();
|
||||
|
||||
//! Reads ValueFormatTypeQualifier
|
||||
Standard_EXPORT void ReadStep (const Handle(StepData_StepReaderData)& data, const Standard_Integer num, Handle(Interface_Check)& ach, const Handle(StepShape_ValueFormatTypeQualifier)& ent) const;
|
||||
|
||||
//! Writes ValueFormatTypeQualifier
|
||||
Standard_EXPORT void WriteStep (StepData_StepWriter& SW, const Handle(StepShape_ValueFormatTypeQualifier)& ent) const;
|
||||
|
||||
};
|
||||
#endif // _RWStepShape_RWValueFormatTypeQualifier_HeaderFile
|
Reference in New Issue
Block a user