View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002876 | FreeCAD | Feature | public | 2017-01-27 14:54 | 2018-08-26 18:39 |
Reporter | FreeCadder | Assigned To | eivindkvedalen | ||
Priority | normal | Severity | tweak | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x64 | OS | Windows | OS Version | 7 |
Product Version | 0.16 | ||||
Fixed in Version | 0.17 | ||||
Summary | 0002876: Value of Part::Thickness is missing unit (redefine this property to be a quantity instead of a regular numeric value) | ||||
Description | It'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 Reproduce | App.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 Information | Maybe introduce a new property "Offset" that is aliased to "Value" but uses "mm". | ||||
Tags | spreadsheet, units | ||||
FreeCAD Information | |||||
|
@FreeCadder please start a forum thread (and bi-directionally link this ticket to it) to generate discussion on such things |
|
Thanks. |
|
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=10&t=20299 |
|
@eivindkvedalen do you mind weighing in on this ticket? |
|
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). |
|
@eivindkvedalen how would you rename this ticket to better reflect this Feature Request? |
|
@wmayer can you provide any orientation on this ticket? |
|
@eivindkvedalen submitted FreeCAD Pull Request 894 as a fix. |
|
Merged fix in c:FreeCAD:054a3da1071ecf8351a3de587d432090b8772aa3: |
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 |