mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-16 09: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");
|
CORBA::String_var aUnits = aInsOp->ReadValue(fileN, fileT, "LEN_UNITS");
|
||||||
QString aUnitsStr (aUnits.in());
|
QString aUnitsStr (aUnits.in());
|
||||||
bool needConvert = true;
|
bool needConvert = true;
|
||||||
if (aUnitsStr.isEmpty() || aUnitsStr == "M")
|
if (aUnitsStr.isEmpty() || aUnitsStr == "M" || aUnitsStr.toLower() == "metre")
|
||||||
needConvert = false;
|
needConvert = false;
|
||||||
|
|
||||||
if (needConvert) {
|
if (needConvert) {
|
||||||
|
@ -122,6 +122,8 @@ extern "C"
|
|||||||
TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
|
TColStd_SequenceOfAsciiString anUnitSolidAngleNames;
|
||||||
aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
|
aReader.FileUnits(anUnitLengthNames, anUnitAngleNames, anUnitSolidAngleNames);
|
||||||
if (anUnitLengthNames.Length() > 0) {
|
if (anUnitLengthNames.Length() > 0) {
|
||||||
|
aValue = new TCollection_HAsciiString( anUnitLengthNames.First() );
|
||||||
|
/*
|
||||||
TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
|
TCollection_AsciiString aLenUnits = anUnitLengthNames.First();
|
||||||
if (aLenUnits == "millimetre")
|
if (aLenUnits == "millimetre")
|
||||||
aValue = new TCollection_HAsciiString ("MM");
|
aValue = new TCollection_HAsciiString ("MM");
|
||||||
@ -141,6 +143,7 @@ extern "C"
|
|||||||
// std::cout << ", " << anUnitLengthNames.Value(ii);
|
// std::cout << ", " << anUnitLengthNames.Value(ii);
|
||||||
//std::cout << std::endl;
|
//std::cout << std::endl;
|
||||||
// tmp end
|
// tmp end
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -207,7 +210,7 @@ extern "C"
|
|||||||
}
|
}
|
||||||
// TODO (for other units than mm, cm, m or inch)
|
// TODO (for other units than mm, cm, m or inch)
|
||||||
//else if (aLenUnits == "")
|
//else if (aLenUnits == "")
|
||||||
// Interface_Static::SetCVal("xstep.cascade.unit", "");
|
// Interface_Static::SetCVal("xstep.cascade.unit", "???");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user