From 29ff650f65dd6aecbf9f4f96956ef3a6c254160e Mon Sep 17 00:00:00 2001 From: Itai Nahshon Date: Thu, 6 Jul 2017 23:22:47 +0300 Subject: [PATCH] Spelling --- src/Base/UnitsSchema.h | 6 +++--- src/Base/UnitsSchemaMmMin.cpp | 11 +++++++---- src/Base/UnitsSchemaMmMin.h | 10 +++++----- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/Base/UnitsSchema.h b/src/Base/UnitsSchema.h index 1400e1691c..b894d0f90d 100644 --- a/src/Base/UnitsSchema.h +++ b/src/Base/UnitsSchema.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2009 Juergen Riegel (FreeCAD@juergen-riegel.net> * + * Copyright (c) 2009 Juergen Riegel (FreeCAD@juergen-riegel.net> * * * * This file is part of the FreeCAD CAx development system. * * * @@ -40,8 +40,8 @@ enum UnitSystem { ImperialDecimal = 3, /** Imperial with length in inch only */ Centimeters = 4, /** All lengths in centimeters, areas and volumes in square/cubic meters */ ImperialBuilding = 5, /** All lengths in feet + inches + fractions */ - MmMin = 6, /** All lengths in mm, Speed in mm/min. Usefull for small parts & CNN */ -} ; + MmMin = 6, /** Lengths in mm, Speed in mm/min. Angle in degrees. Useful for small parts & CNC */ +}; /** The UnitSchema class diff --git a/src/Base/UnitsSchemaMmMin.cpp b/src/Base/UnitsSchemaMmMin.cpp index b2fb501da4..d75f75259c 100644 --- a/src/Base/UnitsSchemaMmMin.cpp +++ b/src/Base/UnitsSchemaMmMin.cpp @@ -40,10 +40,13 @@ using namespace Base; QString UnitsSchemaMmMin::schemaTranslate(const Quantity &quant, double &factor, QString &unitString) { Unit unit = quant.getUnit(); - if (unit == Unit::Angle) { - // TODO Cascade for the Areas - // default action for all cases without special treatment: - unitString = QString::fromUtf8("\xC2\xB0"); + if (unit == Unit::Length) { + unitString = QString::fromLatin1("mm"); + factor = 1.0; + } + else if (unit == Unit::Angle) { + //unitString = QString::fromUtf8("\xC2\xB0"); + unitString = QString::fromUtf8(u8"\u00B0"); factor = 1.0; } else if (unit == Unit::Velocity) { diff --git a/src/Base/UnitsSchemaMmMin.h b/src/Base/UnitsSchemaMmMin.h index 2113abb5f9..964916a9fe 100644 --- a/src/Base/UnitsSchemaMmMin.h +++ b/src/Base/UnitsSchemaMmMin.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (c) 2009 Juergen Riegel (FreeCAD@juergen-riegel.net> * + * Copyright (c) 2009 Juergen Riegel (FreeCAD@juergen-riegel.net> * * * * This file is part of the FreeCAD CAx development system. * * * @@ -32,10 +32,10 @@ namespace Base { -/** The standard units schema - * Here is defined what internal (base) units FreeCAD uses. - * FreeCAD uses a mm/kg/deg scala. - * Also it defines how the units get presented. +/* Metric units schema intended for design of small parts and for CNC + * Lengths are alwais in mm. + * Angles in degrees (use degree symbol) + * Velocities in mm/min (as used in g-code). */ class UnitsSchemaMmMin: public UnitsSchema {