1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00
occt/src/StepBasic/StepBasic_ConversionBasedUnitAndRatioUnit.cxx
dpasukhi 49d628667b 0033099: Data Exchange, Step Import - Wrong PMI values in GDT
measure_with_unit entity is changed to be translated as Handle(Standard_Transient) and to be processed later, depending on the underlying type being used.
2024-05-15 16:24:33 +01:00

49 lines
1.8 KiB
C++

// 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 <Standard_Type.hxx>
#include <StepBasic_ConversionBasedUnitAndRatioUnit.hxx>
#include <StepBasic_DimensionalExponents.hxx>
#include <StepBasic_RatioUnit.hxx>
#include <TCollection_HAsciiString.hxx>
IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ConversionBasedUnitAndRatioUnit,StepBasic_ConversionBasedUnit)
StepBasic_ConversionBasedUnitAndRatioUnit::StepBasic_ConversionBasedUnitAndRatioUnit ()
{
}
void StepBasic_ConversionBasedUnitAndRatioUnit::Init(const Handle(StepBasic_DimensionalExponents)& theDimensions,
const Handle(TCollection_HAsciiString)& theName,
const Handle(Standard_Transient)& theConversionFactor)
{
// --- ANDOR component fields ---
StepBasic_ConversionBasedUnit::Init(theDimensions, theName, theConversionFactor);
// --- ANDOR component fields ---
myRatioUnit = new StepBasic_RatioUnit();
myRatioUnit->Init(theDimensions);
}
void StepBasic_ConversionBasedUnitAndRatioUnit::SetRatioUnit(const Handle(StepBasic_RatioUnit)& theRatioUnit)
{
myRatioUnit = theRatioUnit;
}
Handle(StepBasic_RatioUnit) StepBasic_ConversionBasedUnitAndRatioUnit::RatioUnit() const
{
return myRatioUnit;
}