Maybe you know it already but I'd like to report that setting the weight of Part.BSpline() to any value other than 1 doesn't work (e.g. rational BSplines don't work). Take for example the following code:
Code: Select all
from FreeCAD import Vector
import Part
poles = [Vector(0,0),Vector(0.5,1),Vector(1,0)]
bsplinecurve = Part.BSplineCurve()
bsplinecurve.buildFromPoles(poles)
bsplinecurve.setWeight(2,0.5)
Part.show(bsplinecurve.toShape())
Code: Select all
Exception: ACCESS VIOLATION at address 0xFFFFFFFFFFFFFFFF during 'READ' operation
Code: Select all
from FreeCAD import Vector
import Part
poles = [Vector(0,0),Vector(0.5,1),Vector(1,0)]
beziercurve = Part.BezierCurve()
beziercurve.setPoles(poles)
beziercurve.setWeight(2,0.5)
Part.show(beziercurve.toShape())
OS: Windows 7
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0