View Issue Details

IDProjectCategoryView StatusLast Update
0001272FreeCADBugpublic2021-02-06 06:32
Reporterpkoning Assigned Towandererfan  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.13 
Target Version0.20 
Summary0001272: BezierCurve is not documented and not intuitive
DescriptionI'm trying to use Part.BezierCurve. There is no meaningful documentation, and the Python help isn't very helpful either. I fed it a list of vectors, thinking those would be the nodes. It was accepted (no error message) but it didn't have that effect.
I then did some setPole and insertPole operations. Those work. But the indexing is wrong for Python, it needs to count from zero, not one.
Tagsdocumentation
FreeCAD Information

Relationships

related to 0001355 closedyorik Draft Cubic Bezier Curve Tool For Draft Workbench 

Activities

wandererfan

2013-10-15 15:35

manager   ~0003748

OCC class Geom_BezierCurve expects poles to be numbered 1 to numberofpoles. Making it Pythonic would mean a lot of little changes to C++ and macro code.

Does this help at all?

def makeBCurve(Points):
    '''makeBCurve(Points): Make a Part.BezierCurve Geo obj from these
    (FreeCAD.Vector) Points'''
    c = Part.BezierCurve()
    c.setPoles(Points)
    return(c)

wandererfan

2013-10-15 15:54

manager   ~0003749

Added an entry to "Topological data scripting"

pkoning

2013-10-15 17:36

reporter   ~0003750

It would be preferable to hide the incorrect design decisions of OCC from the Python programmer. But that little wrapper certainly helps. Thanks.

wmayer

2013-10-28 12:29

administrator   ~0003824

> Those work. But the indexing is wrong for Python, it needs to count from zero, not one.
Even worse than a bad design decision is to change the semantic of the API because this breaks all existing code out there.

wandererfan

2014-02-05 15:28

manager   ~0004152

should be linked to:
0001355: Cubic Bezier Curve Tool For Draft Workbench
http://www.freecadweb.org/tracker/view.php?id=1355

wandererfan

2014-11-13 00:54

manager   ~0005309

Documentation updated: http://www.freecadweb.org/wiki/index.php?title=Topological_data_scripting#Creating_a_Bezier_curve

Issue History

Date Modified Username Field Change
2013-10-12 16:29 pkoning New Issue
2013-10-15 15:35 wandererfan Note Added: 0003748
2013-10-15 15:54 wandererfan Note Added: 0003749
2013-10-15 17:36 pkoning Note Added: 0003750
2013-10-28 12:29 wmayer Note Added: 0003824
2014-02-05 15:28 wandererfan Note Added: 0004152
2014-02-05 16:26 yorik Relationship added related to 0001355
2014-09-22 13:28 shoogen Tag Attached: documentation
2014-11-13 00:54 wandererfan Note Added: 0005309
2014-11-13 00:56 wandererfan Status new => closed
2014-11-13 00:56 wandererfan Assigned To => wandererfan
2014-11-13 00:56 wandererfan Resolution open => fixed
2021-02-06 06:32 abdullah Target Version => 0.20