Points: show now returns an GeoFeature object
* Added one return statement into try-catch block which returns the appropriate object (instead of `None`). * Behaviour now in line with `Part.show`. Example: ```Python >>> import Points >>> pp = Points.Points() >>> pp.addPoints([(1,2,3),(4,5,6)]) >>> go = Points.show(pp) >>> go # Former behaviour was to return None <GeoFeature object> >>> go.ViewObject.ShapeColor = (1,0,0) >>> go.ViewObject.ShapeColor = (1.,0.,0.) >>> go.ViewObject.PointSize = 20 ```
This commit is contained in:
@@ -398,6 +398,7 @@ private:
|
||||
Points::Feature* pcFeature = static_cast<Points::Feature*>(pcDoc->addObject("Points::Feature", name));
|
||||
// copy the data
|
||||
pcFeature->Points.setValue(*(pPoints->getPointKernelPtr()));
|
||||
return Py::asObject(pcFeature->getPyObject());
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
throw Py::RuntimeError(e.what());
|
||||
|
||||
Reference in New Issue
Block a user