Пример #1
0
def squareWithHole() -> Outline:
    outline = Outline(None)
    outline.addLinesFromCoordinateList([[0, 0], [50, 0], [50, 50], [0, 50],
                                        [0, 0]])
    circle = a.Arc(Point(35, 25), Point(35, 25), c.CW, Point(25, 25))
    outline.addLineGroup(circle)
    return outline
Пример #2
0
def rightGrip():# ->Outline:
    outline = Outline(None)
    outline.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5], [49.642, 9.5]])
    arc = a.Arc(Point(49.642, 9.5), Point(28.5, 6.5), c.CW, Point(28.5, 82.5), 20)
    outline.addLineGroup(arc)
    outline.addLinesFromCoordinateList([[28.5, 6.5], [28.5, 0]])
    outline.addLineGroup(outline.mirror(c.X)) 
    return outline.translate(82.5, 9.5)
Пример #3
0
def testSimpleDogBone():# ->Outline:
    temp = Outline(None)
    temp.addLinesFromCoordinateList([[82.5,0],[82.5,9.5],[49.642, 9.5], [28.5,6.5],[0,6.5]])
    temp.addLineGroup(temp.mirror(c.Y))
    temp.addLineGroup(temp.mirror(c.X))
    temp = temp.translate(82.5, 9.5)
    temp.finishOutline()
    return temp
Пример #4
0
def rightGrip() -> Outline:
    outline = Outline(None)
    outline.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5], [49.642, 9.5]])
    arc = a.Arc(Point(49.642, 9.5), Point(28.5, 6.5), c.CW, Point(28.5, 82.5),
                20)
    outline.addLineGroup(arc)
    outline.addLinesFromCoordinateList([[28.5, 6.5], [28.5, 0]])
    outline.addLineGroup(outline.mirror(c.X))
    return outline.translate(82.5, 9.5)
Пример #5
0
def testSimpleDogBone() -> Outline:
    temp = Outline(None)
    temp.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5], [49.642, 9.5],
                                     [28.5, 6.5], [0, 6.5]])
    temp.addLineGroup(temp.mirror(c.Y))
    temp.addLineGroup(temp.mirror(c.X))
    temp = temp.translate(82.5, 9.5)
    temp.finishOutline()
    return temp
Пример #6
0
def regularDogBone() ->Outline:    
    dogBone = Outline(None)
    dogBone.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5], [49.642, 9.5]])
    arc = a.Arc(Point(49.642, 9.5), Point(28.5, 6.5), c.CW, Point(28.5, 82.5), 20)
    dogBone.addLineGroup(arc)
    dogBone.addLinesFromCoordinateList([[28.5, 6.5], [0, 6.5]])
    dogBone.addLineGroup(dogBone.mirror(c.Y))
    dogBone.addLineGroup(dogBone.mirror(c.X))
    dogBone = dogBone.translate(82.5, 9.5)
    dogBone.finishOutline()
    return dogBone
Пример #7
0
def regularDogBone() -> Outline:
    dogBone = Outline(None)
    dogBone.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5], [49.642, 9.5]])
    arc = a.Arc(Point(49.642, 9.5), Point(28.5, 6.5), c.CW, Point(28.5, 82.5),
                20)
    dogBone.addLineGroup(arc)
    dogBone.addLinesFromCoordinateList([[28.5, 6.5], [0, 6.5]])
    dogBone.addLineGroup(dogBone.mirror(c.Y))
    dogBone.addLineGroup(dogBone.mirror(c.X))
    dogBone = dogBone.translate(82.5, 9.5)
    dogBone.finishOutline()
    dogBone._name = 'regularDogBone'
    return dogBone
Пример #8
0
def wideDogBone(gageWidth: float) ->Outline:
    halfWidth = gageWidth / 2.0    
    wideDogBone = Outline(None)
    wideDogBone.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5 + halfWidth],
                                            [49.642, 9.5 + halfWidth]])
    wideArc = a.Arc(Point(49.642, 9.5 + halfWidth),
                    Point(28.5, 6.5 + halfWidth), c.CW,
                    Point(28.5, 82.5 + halfWidth), 20)
    wideDogBone.addLineGroup(wideArc)
    wideDogBone.addLinesFromCoordinateList([[28.5, 6.5 + halfWidth], [0, 6.5 + halfWidth]])
    wideDogBone.addLineGroup(wideDogBone.mirror(c.Y))
    wideDogBone.addLineGroup(wideDogBone.mirror(c.X))
    return wideDogBone.translate(82.5, 9.5 + halfWidth)
Пример #9
0
def wideDogBone(gageWidth: float) -> Outline:
    halfWidth = gageWidth / 2.0
    wideDogBone = Outline(None)
    wideDogBone.addLinesFromCoordinateList([[82.5, 0], [82.5, 9.5 + halfWidth],
                                            [49.642, 9.5 + halfWidth]])
    wideArc = a.Arc(Point(49.642, 9.5 + halfWidth),
                    Point(28.5, 6.5 + halfWidth), c.CW,
                    Point(28.5, 82.5 + halfWidth), 20)
    wideDogBone.addLineGroup(wideArc)
    wideDogBone.addLinesFromCoordinateList([[28.5, 6.5 + halfWidth],
                                            [0, 6.5 + halfWidth]])
    wideDogBone.addLineGroup(wideDogBone.mirror(c.Y))
    wideDogBone.addLineGroup(wideDogBone.mirror(c.X))
    return wideDogBone.translate(82.5, 9.5 + halfWidth)
Пример #10
0
def typeVDogBone(scale: float) -> Outline:
    typeV = Outline(None)
    typeV.addLinesFromCoordinateList([[31.75, 0], [31.75, 3.77]])
    arc = a.Arc(Point(31.75, 3.77), Point(30.75, 4.77), c.CCW,
                Point(30.75, 3.77), 5)  #1mm fillet
    typeV.addLineGroup(arc)
    typeV.addLinesFromCoordinateList([[30.75, 4.77], [13.17, 4.77]])
    arc = a.Arc(Point(13.17, 4.77), Point(4.77, 1.59), c.CW,
                Point(4.77, 14.29))
    typeV.addLineGroup(arc)
    typeV.addLinesFromCoordinateList([[4.77, 1.59], [0, 1.59]])
    typeV.addLineGroup(typeV.mirror(c.Y))
    typeV.addLineGroup(typeV.mirror(c.X))
    typeV = typeV.translate(31.75, 4.77)
    typeV.finishOutline()
    typeV = typeV.scale(scale)
    typeV._name = 'typeVDogBone'
    return typeV
Пример #11
0
def regularDogBoneFillet(scale: float) -> Outline:
    dogBoneF = Outline(None)
    dogBoneF.addLinesFromCoordinateList([[82.5, 0], [82.5, 4.5]])
    arc = a.Arc(Point(82.5, 4.5), Point(77.5, 9.5), c.CCW, Point(77.5, 4.5),
                6)  #5mm fillet
    dogBoneF.addLineGroup(arc)
    dogBoneF.addLinesFromCoordinateList([[77.5, 9.5], [49.642, 9.5]])
    arc = a.Arc(Point(49.642, 9.5), Point(28.5, 6.5), c.CW, Point(28.5, 82.5),
                20)
    dogBoneF.addLineGroup(arc)
    dogBoneF.addLinesFromCoordinateList([[28.5, 6.5], [0, 6.5]])
    dogBoneF.addLineGroup(dogBoneF.mirror(c.Y))
    dogBoneF.addLineGroup(dogBoneF.mirror(c.X))
    dogBoneF = dogBoneF.translate(82.5, 9.5)
    dogBoneF.finishOutline()
    dogBoneF = dogBoneF.scale(scale)
    dogBoneF._name = 'regularDogBoneFillet'
    return dogBoneF
Пример #12
0
def center() -> Outline:
    outline = Outline(None)
    outline.addLinesFromCoordinateList([[28.5, 6.5], [-28.5,
                                                      6.5], [-28.5, -6.5],
                                        [28.5, -6.5], [28.5, 6.5]])
    return outline.translate(82.5, 9.5)
Пример #13
0
def squareWithHole() ->Outline:
    outline = Outline(None)
    outline.addLinesFromCoordinateList([[0,0], [50,0], [50,50], [0,50], [0,0]])
    circle = a.Arc(Point(35,25), Point(35,25), c.CW, Point(25,25))
    outline.addLineGroup(circle)
    return outline
Пример #14
0
def center():# ->Outline:
    outline = Outline(None)
    outline.addLinesFromCoordinateList([[28.5, 6.5], [-28.5, 6.5], [-28.5, -6.5],
                                      [28.5, -6.5], [28.5, 6.5]])
    return outline.translate(82.5, 9.5)