summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-12-27 14:45:44 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-12-27 14:45:44 (GMT)
commitbac9c604350794d531640c4f38428e0b7f4bbfc9 (patch)
tree1b6d8a652a4cae1eb0894413d5634852378be30d
parent3ea4f69cd800235887998eef16eedce92911f09d (diff)
downloadmisc-bac9c604350794d531640c4f38428e0b7f4bbfc9.zip
misc-bac9c604350794d531640c4f38428e0b7f4bbfc9.tar.gz
misc-bac9c604350794d531640c4f38428e0b7f4bbfc9.tar.bz2
spacer/spacer.py, cad.py: FreeCAD renamed Line to LineSegment
-rwxr-xr-xspacer/cad.py16
-rwxr-xr-xspacer/spacer.py2
2 files changed, 9 insertions, 9 deletions
diff --git a/spacer/cad.py b/spacer/cad.py
index ffa78ca..a8f459d 100755
--- a/spacer/cad.py
+++ b/spacer/cad.py
@@ -31,10 +31,10 @@ def extrude_shape(shape, z):
def rect(x, y, z):
- bottom = Part.Line(v(0, 0, 0), v(x, 0, 0))
- top = Part.Line(v(0, y, 0), v(x, y, 0))
- left = Part.Line(v(0, 0, 0), v(0, y, 0))
- right = Part.Line(v(x, 0, 0), v(x, y, 0))
+ bottom = Part.LineSegment(v(0, 0, 0), v(x, 0, 0))
+ top = Part.LineSegment(v(0, y, 0), v(x, y, 0))
+ left = Part.LineSegment(v(0, 0, 0), v(0, y, 0))
+ right = Part.LineSegment(v(x, 0, 0), v(x, y, 0))
s = Part.Shape([ bottom, top, left, right ])
return extrude_shape(s, z)
@@ -63,10 +63,10 @@ def move(obj, x, y, z):
#
def isotrap(x, y, z):
- bottom = Part.Line(v(0, 0, 0), v(x, 0, 0))
- top = Part.Line(v(-y, y, 0), v(x + y, y, 0))
- left = Part.Line(v(0, 0, 0), v(-y, y, 0))
- right = Part.Line(v(x, 0, 0), v(x + y, y, 0))
+ bottom = Part.LineSegment(v(0, 0, 0), v(x, 0, 0))
+ top = Part.LineSegment(v(-y, y, 0), v(x + y, y, 0))
+ left = Part.LineSegment(v(0, 0, 0), v(-y, y, 0))
+ right = Part.LineSegment(v(x, 0, 0), v(x + y, y, 0))
s = Part.Shape([ bottom, top, left, right ])
return extrude_shape(s, z)
diff --git a/spacer/spacer.py b/spacer/spacer.py
index 94b7357..f9423c2 100755
--- a/spacer/spacer.py
+++ b/spacer/spacer.py
@@ -142,7 +142,7 @@ def line(a, b):
def line(a, b):
- return Part.Line(v(a[0], a[1], 0), v(b[0], b[1], 0))
+ return Part.LineSegment(v(a[0], a[1], 0), v(b[0], b[1], 0))
def arc_2pr(a, b, r):