Something I observed today.
Code: Select all
sf = FreeCADGui.Selection.getSelectionEx()[0]
edge=sf.SubObjects[0]
param=edge.getParameterByLength(edge.Length/4)
pt=edge.valueAt(param)
split_edge=edge.split(param)
split_edge.Edges[0].Length
split_edge.Edges[1].Length
edge.Length/4
>>> split_edge.Edges[0].Length
3.4396291030641475
>>> split_edge.Edges[1].Length
16.380574078167562
>>> edge.Length/4
4.955050795307929
In my opinion this methods should yield the same result. Obvious there is a difference of 1.5mm. Any explanation for this behaviour or which method is correct? My edge is a <BSplineCurve object>.
I tested also with a straight edge and there the results are correct (both methods yielding the same result).
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 32-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17