View Issue Details

IDProjectCategoryView StatusLast Update
0004199PathBugpublic2020-01-24 11:35
Reportermlampert Assigned Tomlampert  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19 
Fixed in Version0.19 
Summary0004199: Path.Length reports wrong length
DescriptionSome experiments with Path.Length revealed that the calculation is incorrect. As it turns out the implementation relies on all coordinates set - any not set coordinates are filled with 0 which does not result in the correct length.
Steps To Reproduce
>>> Path.Path([Path.Command('G0', {'X':1}), Path.Command('G0', {'Y':1})]).Length
2.414213562373095
>>>

The result should be 2, but because the second command's X value gets reset to 0 it's length is calculated as 1.414


TagsNo tags attached.
FreeCAD Informationaffects all versions

Activities

openBrain

2019-11-22 16:42

developer   ~0013828

@mlampert : according guidelines, could you please open a forum thread and crosslink it with this ticket (in both directions). Thx

Kunda1

2020-01-11 12:49

administrator   ~0014048

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

mlampert

2020-01-17 06:57

developer   ~0014092

fix: https://github.com/FreeCAD/FreeCAD/pull/2909

Kunda1

2020-01-17 11:47

administrator   ~0014093

Last edited: 2020-01-17 11:48

View 2 revisions

Using https://www.freecadweb.org/wiki/Tracker#MantisBT_.3C.3D.3E_GitHub_Markup
I can reference the PR via
p:FreeCAD:2909:
Result: FreeCAD Pull Request 2909

mlampert

2020-01-19 18:45

developer   ~0014098

https://github.com/FreeCAD/FreeCAD/commit/099d06a29c55d57ca4f8df84b75516f8ca8b4657

Kunda1

2020-01-24 11:32

administrator   ~0014105

Last edited: 2020-01-24 11:35

View 2 revisions

FreeCAD master 099d06a2

Edit: retroactively associated commit to mantis

Related Changesets

FreeCAD: master 099d06a2

2020-01-18 19:26:10

sliptonic


Committer: GitHub Details Diff
Merge pull request #2909 from mlampert/bugfix/path-length

Path: Fix Path.Length calculation.
Affected Issues
0004199
mod - src/Mod/Path/App/Command.cpp Diff File
mod - src/Mod/Path/App/Command.h Diff File
mod - src/Mod/Path/App/Path.cpp Diff File
mod - src/Mod/Path/PathTests/TestPathCore.py Diff File

Issue History

Date Modified Username Field Change
2019-11-21 02:27 mlampert New Issue
2019-11-22 16:41 openBrain Tag Attached: #post-to-forum
2019-11-22 16:42 openBrain Note Added: 0013828
2019-11-26 20:38 Kunda1 Steps to Reproduce Updated View Revisions
2020-01-11 12:48 Kunda1 Tag Detached: #post-to-forum
2020-01-11 12:49 Kunda1 Note Added: 0014048
2020-01-11 12:49 Kunda1 Tag Attached: #pending-forum
2020-01-17 06:51 mlampert Assigned To => mlampert
2020-01-17 06:51 mlampert Status new => assigned
2020-01-17 06:57 mlampert Note Added: 0014092
2020-01-17 11:47 Kunda1 Note Added: 0014093
2020-01-17 11:48 Kunda1 Note Edited: 0014093 View Revisions
2020-01-19 18:45 mlampert Status assigned => closed
2020-01-19 18:45 mlampert Resolution open => fixed
2020-01-19 18:45 mlampert Fixed in Version => 0.19
2020-01-19 18:45 mlampert Note Added: 0014098
2020-01-24 11:32 Kunda1 Note Added: 0014105
2020-01-24 11:32 Kunda1 Changeset attached => FreeCAD master 099d06a2
2020-01-24 11:33 Kunda1 Tag Detached: #pending-forum
2020-01-24 11:35 Kunda1 Note Edited: 0014105 View Revisions