mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-15 00:33:06 +05:00
0021511: EDF 2153 GEOM: Choose to take units into account or not when importing a STEP file
- Additional change: return native units as they are read from the STEP file
This commit is contained in:
parent
d1371cd825
commit
5ad7147996
@ -651,7 +651,7 @@ bool GEOMToolsGUI::Import()
|
||||
CORBA::String_var aUnits = aInsOp->ReadValue(fileN, fileT, "LEN_UNITS");
|
||||
QString aUnitsStr (aUnits.in());
|
||||
bool needConvert = true;
|
||||
if (aUnitsStr.isEmpty() || aUnitsStr == "M")
|
||||
if (aUnitsStr.isEmpty() || aUnitsStr == "M" || aUnitsStr.toLower() == "metre")
|
||||
needConvert = false;
|
||||
|
||||
if (needConvert) {
|
||||
|
@ -122,6 +122,8 @@ extern "C"
|
||||
TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
|
||||
aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
|
||||
if (anUnitLengthNames.Length() > 0) {
|
||||
aValue = new TCollection_HAsciiString( anUnitLengthNames.First() );
|
||||
/*
|
||||
TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
|
||||
if (aLenUnits == "millimetre")
|
||||
aValue = new TCollection_HAsciiString ("MM");
|
||||
@ -141,6 +143,7 @@ extern "C"
|
||||
// std::cout << ", " << anUnitLengthNames.Value(ii);
|
||||
//std::cout << std::endl;
|
||||
// tmp end
|
||||
*/
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -207,7 +210,7 @@ extern "C"
|
||||
}
|
||||
// TODO (for other units than mm, cm, m or inch)
|
||||
//else if (aLenUnits == "")
|
||||
// Interface_Static::SetCVal("xstep.cascade.unit", "");
|
||||
// Interface_Static::SetCVal("xstep.cascade.unit", "???");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user