//purpose :
//=======================================================================
-static Standard_Integer unit(Draw_Interpretor& , Standard_Integer n, const char** a)
+static Standard_Integer unit(Draw_Interpretor& di, Standard_Integer n, const char** a)
{
if(n == 4) {
- cout << Units::Convert(Draw::Atof(a[1]), a[2], a[3]) << endl;
+ di << Units::Convert(Draw::Atof(a[1]), a[2], a[3]);
return 0;
}
else
mille mille 1852 m
light year Al 9.46053E+15 m
-inch in. 25.40001969E-03 m
+inch in. 0.0254 m
in
caliber caliber 1 in.
foot ft. 12 in
yd
statute mile stat.mile 1760 yd.
-nautical mile naut.mile 6080 ft.
+nautical mile naut.mile 1852 m
....................................................................................................................................
M L T I K N J P S
TIME 0 0 1 0 0 0 0 0 0
Standard_Real UnitsMethods::GetLengthFactorValue (const Standard_Integer par)
{
switch ( par ) {
- case 1 : return 25.4;
- case 2 : return 1.;
+ case 1 : return 25.4; // inch
+ case 2 : return 1.; // millimeter
- case 4 : return 304.8;
- case 5 : return 1609270.;
- case 6 : return 1000.;
- case 7 : return 1000000.;
- case 8 : return 0.0254;
- case 9 : return 0.001;
- case 10 : return 10.;
- case 11 : return 0.0000254;
+ case 4 : return 304.8; // foot
+ case 5 : return 1609344.; // mile
+ case 6 : return 1000.; // meter
+ case 7 : return 1000000.; // kilometer
+ case 8 : return 0.0254; // mil (0.001 inch)
+ case 9 : return 0.001; // micron
+ case 10 : return 10.; // centimeter
+ case 11 : return 0.0000254; // microinch
default : return 1.;
}
}