View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003671||Sketcher||Feature||public||2018-11-05 19:03||2018-11-05 19:03|
|Target Version||0.19||Fixed in Version|
|Summary||0003671: Sketcher Analysis interface improvements|
Werner's comments on PR #1554:
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.
|Tags||No tags attached.|