replace Part.Line with Part.LineSegment

This commit is contained in:
wmayer
2016-11-30 21:25:18 +01:00
parent 19237df7bf
commit c3fe2de155
40 changed files with 238 additions and 238 deletions

View File

@@ -17,8 +17,8 @@ def makeBottle(myWidth=50.0, myHeight=70.0, myThickness=30.0):
aPnt5=Base.Vector(myWidth/2.,0,0)
aArcOfCircle = Part.Arc(aPnt2,aPnt3,aPnt4)
aSegment1=Part.Line(aPnt1,aPnt2)
aSegment2=Part.Line(aPnt4,aPnt5)
aSegment1=Part.LineSegment(aPnt1,aPnt2)
aSegment2=Part.LineSegment(aPnt4,aPnt5)
aEdge1=aSegment1.toShape()
aEdge2=aArcOfCircle.toShape()
@@ -82,9 +82,9 @@ def makeBoreHole():
# and the second one
VC2 = Base.Vector(40,0,0)
C2 = Part.Arc(V2,VC2,V3)
L1 = Part.Line(V1,V2)
L1 = Part.LineSegment(V1,V2)
# and the second one
L2 = Part.Line(V4,V3)
L2 = Part.LineSegment(V4,V3)
S1 = Part.Shape([C1,C2,L1,L2])
W=Part.Wire(S1.Edges)

View File

@@ -33,10 +33,10 @@ import FreeCAD, FreeCADGui, os, sys, unittest, Part, PartGui
#
# def testBoxCase(self):
# self.Box = self.Doc.addObject('Part::SketchObject','SketchBox')
# self.Box.addGeometry(Part.Line(App.Vector(-99.230339,36.960674,0),App.Vector(69.432587,36.960674,0)))
# self.Box.addGeometry(Part.Line(App.Vector(69.432587,36.960674,0),App.Vector(69.432587,-53.196629,0)))
# self.Box.addGeometry(Part.Line(App.Vector(69.432587,-53.196629,0),App.Vector(-99.230339,-53.196629,0)))
# self.Box.addGeometry(Part.Line(App.Vector(-99.230339,-53.196629,0),App.Vector(-99.230339,36.960674,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,36.960674,0),App.Vector(69.432587,36.960674,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,36.960674,0),App.Vector(69.432587,-53.196629,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,-53.196629,0),App.Vector(-99.230339,-53.196629,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,-53.196629,0),App.Vector(-99.230339,36.960674,0)))
#
# def tearDown(self):
# #closing doc