View Issue Details

IDProjectCategoryView StatusLast Update
0003671SketcherFeaturepublic2021-02-06 05:55
Reporterabdullah Assigned Toabdullah  
PrioritynormalSeverityminorReproducibilityN/A
Status assignedResolutionopen 
Product Version0.18 
Target Version0.20 
Summary0003671: Sketcher Analysis interface improvements
Description
Werner's comments on PR 0001554:

It's indeed a bit odd to have many new methods added to SketchObject just to have a convenient Python interface. Since the "analyser" member doesn't do anything else and to keep things a bit cleaner you can:

    keep the functions of SketchObjectPy but create each time a new instance of SketchAnalysis when one of these Python functions is invoked. This way you can remove the analyser member from SketchObject and all the methods. Also, this reduces possible side-effects in case of consecutive calls of validation functions unless you explicitly need this. But then it suffices to add a single method to SketchObject to return the SketchAnalysis instance.

    instead of putting the validation functions to SketchObjectPy you can create the class SketchAnalysisPy. In the long term this might be the better option since many new methods could be added. In order to invoke the validation functions from Python we have to add a single method to SketchObject(Py) to create and return a SketchAnalysis instance.

Nevertheless, I am going to merge the PR now and things can still be changed at a later time.
TagsNo tags attached.
FreeCAD Information

Activities

yorik

2022-03-03 13:55

administrator   ~0016665

This ticket has been migrated to GitHub as issue 5830.

Issue History

Date Modified Username Field Change
2018-11-05 19:03 abdullah New Issue
2018-11-05 19:03 abdullah Status new => assigned
2018-11-05 19:03 abdullah Assigned To => abdullah
2020-11-09 18:09 abdullah Target Version 0.19 => 0.20
2021-02-06 05:55 abdullah Target Version => 0.20