Skip to content

Commit

Permalink
Fixed Path creation with new Line/LineSegment semantics.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert committed Dec 3, 2016
1 parent e597771 commit 9ef9036
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 9ef9036

Please sign in to comment.