View Issue Details

IDProjectCategoryView StatusLast Update
0002876FreeCADFeaturepublic2018-08-26 18:39
ReporterFreeCadder Assigned Toeivindkvedalen  
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionfixed 
Platformx64OSWindowsOS Version7
Product Version0.16 
Fixed in Version0.17 
Summary0002876: Value of Part::Thickness is missing unit (redefine this property to be a quantity instead of a regular numeric value)
DescriptionIt's inconvenient that "Part::Thickness" doesn't use "mm" units for "Value".

In the example below, to compute the inside diameter of a pipe, the (negative) wall thickness needs to be multiplied with "1mm" before adding to the outside diameter.
Steps To ReproduceApp.newDocument("Unnamed");
Cylinder = App.ActiveDocument.addObject("Part::Cylinder", "Cylinder")
Gui.ActiveDocument.Cylinder.hide()
Pipe = App.ActiveDocument.addObject("Part::Thickness", "Pipe")
Pipe.Faces = (Cylinder, ["Face2", "Face3"])
Pipe.Mode = 1
Pipe.Value = -1 # negative wall thickness
Spreadsheet = App.ActiveDocument.addObject('Spreadsheet::Sheet', 'Spreadsheet')
Spreadsheet.set('A1', 'Pipe OD')
Spreadsheet.set('B1', 'Pipe WT')
Spreadsheet.set('C1', 'Pipe ID')
Spreadsheet.set('A2', '=2*Cylinder.Radius')
Spreadsheet.set('B2', '=-Pipe.Value*1mm')
Spreadsheet.set('C2', '=2*(Cylinder.Radius + Pipe.Value*1mm)')
App.ActiveDocument.recompute()
# double click Spreadsheet, click on C2 field
Additional InformationMaybe introduce a new property "Offset" that is aliased to "Value" but uses "mm".
Tagsspreadsheet, units
FreeCAD Information

Activities

Kunda1

2017-01-27 22:05

administrator   ~0008031

@FreeCadder please start a forum thread (and bi-directionally link this ticket to it) to generate discussion on such things

FreeCadder

2017-01-28 03:34

reporter   ~0008034

Last edited: 2017-01-29 02:17

Thanks.

Kunda1

2017-01-28 05:10

administrator   ~0008038

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20299

Kunda1

2017-05-23 12:53

administrator   ~0009098

@eivindkvedalen do you mind weighing in on this ticket?

eivindkvedalen

2017-05-23 15:17

developer   ~0009099

For historical reasons, before the Quantity class was introduces, parameters were assumed to be metric (mm), and thus unit was not stored. It is possible, if a developer finds time, to redefine this property to be a quantity instead of a regular numeric value. The only complication is that code has to added to make loading of old files possible (this is more boiler-plate type of work now; code for this exists in several places in FreeCAD already).

Kunda1

2017-05-23 19:16

administrator   ~0009102

@eivindkvedalen how would you rename this ticket to better reflect this Feature Request?

Kunda1

2017-07-19 10:59

administrator   ~0009781

@wmayer can you provide any orientation on this ticket?

Kunda1

2017-07-23 16:01

administrator   ~0009798

@eivindkvedalen submitted FreeCAD Pull Request 894 as a fix.

Kunda1

2017-07-23 20:56

administrator   ~0009801

Merged fix in c:FreeCAD:054a3da1071ecf8351a3de587d432090b8772aa3:

Issue History

Date Modified Username Field Change
2017-01-27 14:54 FreeCadder New Issue
2017-01-27 22:05 Kunda1 Note Added: 0008031
2017-01-27 22:06 Kunda1 Status new => feedback
2017-01-28 03:34 FreeCadder Note Added: 0008034
2017-01-28 03:34 FreeCadder Status feedback => new
2017-01-28 05:10 Kunda1 Note Added: 0008038
2017-01-29 02:17 FreeCadder Note Edited: 0008034
2017-01-30 11:50 Kunda1 Tag Attached: units
2017-03-24 14:50 Kunda1 Tag Attached: #lowhangingfruit
2017-03-24 14:50 Kunda1 Tag Attached: spreadsheet
2017-05-23 12:53 Kunda1 Note Added: 0009098
2017-05-23 15:17 eivindkvedalen Note Added: 0009099
2017-05-23 19:16 Kunda1 Note Added: 0009102
2017-06-28 22:28 Kunda1 Summary Value of Part::Thickness is missing unit => Value of Part::Thickness is missing unit (redefine this property to be a quantity instead of a regular numeric value)
2017-07-19 10:59 Kunda1 Note Added: 0009781
2017-07-20 09:36 eivindkvedalen Assigned To => eivindkvedalen
2017-07-20 09:36 eivindkvedalen Status new => assigned
2017-07-23 16:01 Kunda1 Note Added: 0009798
2017-07-23 20:56 Kunda1 Status assigned => closed
2017-07-23 20:56 Kunda1 Resolution open => fixed
2017-07-23 20:56 Kunda1 Fixed in Version => 0.17
2017-07-23 20:56 Kunda1 Note Added: 0009801
2018-08-26 18:39 Kunda1 Tag Detached: #lowhangingfruit