Path.Area: respect zero start point when generating path

This commit is contained in:
Zheng, Lei
2018-01-22 16:36:40 +08:00
committed by wmayer
parent 66f29c52ad
commit 004f82b3e7
5 changed files with 14 additions and 10 deletions

View File

@@ -362,7 +362,7 @@ private:
try {
gp_Pnt pend;
std::unique_ptr<Toolpath> path(new Toolpath);
Area::toPath(*path,shapes,&pstart, &pend,
Area::toPath(*path,shapes,start?&pstart:0, &pend,
PARAM_PY_FIELDS(PARAM_FARG,AREA_PARAMS_PATH));
if(!PyObject_IsTrue(return_end))
return Py::asObject(new PathPy(path.release()));
@@ -415,7 +415,7 @@ private:
try {
bool need_arc_plane = arc_plane==Area::ArcPlaneAuto;
std::list<TopoDS_Shape> wires = Area::sortWires(shapes,&pstart,
std::list<TopoDS_Shape> wires = Area::sortWires(shapes,start!=0,&pstart,
&pend, 0, &arc_plane, PARAM_PY_FIELDS(PARAM_FARG,AREA_PARAMS_SORT));
PyObject *list = PyList_New(0);
for(auto &wire : wires)