Skip to content

Commit

Permalink
Merge pull request #362 from mlampert/Line2LineSegment
Browse files Browse the repository at this point in the history
Path: Fix Path creation for new Line/LineSegment semantics.
  • Loading branch information
wwmayer committed Dec 3, 2016
2 parents 8fc41bd + 9ef9036 commit c70d6f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Mod/Path/Gui/ViewProviderPath.cpp
Expand Up @@ -107,6 +107,7 @@ ViewProviderPath::ViewProviderPath()

pcLines = new PartGui::SoBrepEdgeSet();
pcLines->ref();
pcLines->coordIndex.setNum(0);

pcLineColor = new SoMaterial;
pcLineColor->ref();
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathKurveUtils.py
Expand Up @@ -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)[
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/PathScripts/PathUtils.py
Expand Up @@ -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)
Expand Down

0 comments on commit c70d6f8

Please sign in to comment.