From e597771c5f5f33f3fbcd19795b6b7f7e0e61e2e3 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Fri, 2 Dec 2016 12:31:33 -0800 Subject: [PATCH 1/2] Fixed SoBrepEdgeSet error (thanks to wmayer). --- src/Mod/Path/Gui/ViewProviderPath.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Mod/Path/Gui/ViewProviderPath.cpp b/src/Mod/Path/Gui/ViewProviderPath.cpp index 325faa8b0..fe4b0ad9c 100644 --- a/src/Mod/Path/Gui/ViewProviderPath.cpp +++ b/src/Mod/Path/Gui/ViewProviderPath.cpp @@ -107,6 +107,7 @@ ViewProviderPath::ViewProviderPath() pcLines = new PartGui::SoBrepEdgeSet(); pcLines->ref(); + pcLines->coordIndex.setNum(0); pcLineColor = new SoMaterial; pcLineColor->ref(); From 9ef90366a5880a6eca9936394304cd62cb42ad73 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sat, 3 Dec 2016 02:00:11 -0800 Subject: [PATCH 2/2] Fixed Path creation with new Line/LineSegment semantics. --- src/Mod/Path/PathScripts/PathKurveUtils.py | 2 +- src/Mod/Path/PathScripts/PathUtils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathKurveUtils.py b/src/Mod/Path/PathScripts/PathKurveUtils.py index 0afda40f7..ccdca4489 100644 --- a/src/Mod/Path/PathScripts/PathKurveUtils.py +++ b/src/Mod/Path/PathScripts/PathKurveUtils.py @@ -43,7 +43,7 @@ def makeAreaVertex(seg): segtype = int(seg.Curve.Axis.z) # 1=ccw arc,-1=cw arc vertex = area.Vertex(segtype, area.Point(seg.valueAt(seg.LastParameter)[0], seg.valueAt( seg.LastParameter)[1]), area.Point(seg.Curve.Center.x, seg.Curve.Center.y)) - elif isinstance(seg.Curve, Part.LineSegment): + elif isinstance(seg.Curve, Part.LineSegment) or isinstance(seg.Curve, Part.Line): point1 = seg.valueAt(seg.FirstParameter)[ 0], seg.valueAt(seg.FirstParameter)[1] point2 = seg.valueAt(seg.LastParameter)[ diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 3d4dee172..6754f4a7e 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -247,7 +247,7 @@ def reverseEdge(e): arcendpt = e.valueAt(e.LastParameter) arcofCirc = Part.ArcOfCircle(arcendpt, arcmid, arcstpt) newedge = arcofCirc.toShape() - elif geomType(e) == "LineSegment": + elif geomType(e) == "LineSegment" or geomType(e) == "Line": stpt = e.valueAt(e.FirstParameter) endpt = e.valueAt(e.LastParameter) newedge = Part.makeLine(endpt, stpt)