
Tue, 09/05/2023 - 20:37
Hi: I'm confused by this code in STEPCAFControl_Writer.cxx which assigns a density to a solid:
// write MRI
if( aDensity > 0 ) {
// mass
Handle(StepBasic_SiUnitAndMassUnit) SMU = new StepBasic_SiUnitAndMassUnit;
SMU->SetName(StepBasic_sunGram);
Handle(StepBasic_DerivedUnitElement) DUE1 = new StepBasic_DerivedUnitElement;
DUE1->Init(SMU,3.0);
// length
Handle(StepBasic_SiUnitAndLengthUnit) SLU = new StepBasic_SiUnitAndLengthUnit;
SLU->Init(Standard_True,StepBasic_spCenti,StepBasic_sunMetre);
Handle(StepBasic_DerivedUnitElement) DUE2 = new StepBasic_DerivedUnitElement;
DUE2->Init(SLU,2.0);
// other
Handle(StepBasic_HArray1OfDerivedUnitElement) HADUE = new StepBasic_HArray1OfDerivedUnitElement(1,2);
HADUE->SetValue(1,DUE1);
HADUE->SetValue(2,DUE2);
Handle(StepBasic_DerivedUnit) DU = new StepBasic_DerivedUnit;
DU->Init(HADUE);
This seems to be creating a density unit of g^3-cm^2. Do I just not understand what STEP is expecting here?
Thanks, Allen