示例#1
0
文件: shapes.py 项目: aaps/MCmotions
 def make_default_x_block(self):
     pointops = PointList()
     pointops.append([Point3D(0.5, 0.5, -0.5), Point3D(0.5, 0.5,
                                                       0.5), Point3D(-0.5, -0.5, 0.5), Point3D(-0.5, -0.5, -0.5)])
     pointops.append([Point3D(-0.5, 0.5, -0.5), Point3D(-0.5, 0.5,
                                                        0.5), Point3D(0.5, -0.5, 0.5), Point3D(0.5, -0.5, -0.5)])
     return pointops
示例#2
0
文件: shapes.py 项目: aaps/MCmotions
 def make_default_flat_block_shape(self):
     pointops = PointList()
     pointops.append([Point3D(0.4, 0.4, -0.5), Point3D(-0.4, 0.4, -0.5), Point3D(-0.4, -0.4, -0.5), Point3D(0.4, -0.4, -0.5)])
     pointops.append([Point3D(0.4, 0.4, -0.4), Point3D(-0.4, 0.4, -0.4), Point3D(-0.4, -0.4, -0.4), Point3D(0.4, -0.4, -0.4)])
     pointops.append([Point3D(-0.4, -0.4, -0.5), Point3D(-0.4, -0.4, -0.4), Point3D(0.4, -0.4, -0.4), Point3D(0.4, -0.4, -0.5)])
     pointops.append([Point3D(-0.4, 0.4, -0.5), Point3D(-0.4, 0.4, -0.4), Point3D(0.4, 0.4, -0.4), Point3D(0.4, 0.4, -0.5)])
     pointops.append([Point3D(-0.4, -0.4, -0.5), Point3D(-0.4, 0.4, -0.5), Point3D(-0.4, 0.4, -0.4), Point3D(-0.4, -0.4, -0.4)])
     pointops.append([Point3D(0.4, -0.4, -0.5), Point3D(0.4, 0.4, -0.5), Point3D(0.4, 0.4, -0.4), Point3D(0.4, -0.4, -0.4)])
     return pointops
示例#3
0
文件: shapes.py 项目: aaps/MCmotions
 def make_default_ladder_shapes(self):
     pointops = PointList()
     pointops.append([Point3D(0.5, -0.5, -0.5), Point3D(-0.5, -0.5, -0.5), Point3D(-0.5, -0.4, -0.5), Point3D(0.5, -0.4, -0.5)])
     pointops.append([Point3D(0.5, -0.4, 0.5), Point3D(-0.5, -0.4, 0.5), Point3D(-0.5, -0.5, 0.5), Point3D(0.5, -0.5, 0.5)])
     pointops.append([Point3D(-0.5, -0.4, -0.5), Point3D(-0.5, -0.4, 0.5), Point3D(0.5, -0.4, 0.5), Point3D(0.5, -0.4, -0.5)])
     pointops.append([Point3D(0.5, -0.5, -0.5), Point3D(0.5, -0.5, 0.5), Point3D(-0.5, -0.5, 0.5), Point3D(-0.5, -0.5, -0.5)])
     pointops.append([Point3D(-0.5, -0.5, 0.5), Point3D(-0.5, -0.4, 0.5), Point3D(-0.5, -0.4, -0.5), Point3D(-0.5, -0.5, -0.5)])
     pointops.append([Point3D(0.5, -0.5, -0.5), Point3D(0.5, -0.4, -0.5), Point3D(0.5, -0.4, 0.5), Point3D(0.5, -0.5, 0.5)])
     return pointops
示例#4
0
 def make_default_x_block(self):
     pointops = PointList()
     pointops.append([
         Point3D(0.5, 0.5, -0.5),
         Point3D(0.5, 0.5, 0.5),
         Point3D(-0.5, -0.5, 0.5),
         Point3D(-0.5, -0.5, -0.5)
     ])
     pointops.append([
         Point3D(-0.5, 0.5, -0.5),
         Point3D(-0.5, 0.5, 0.5),
         Point3D(0.5, -0.5, 0.5),
         Point3D(0.5, -0.5, -0.5)
     ])
     return pointops
示例#5
0
 def make_default_normal_stairs(self):
     pointops = PointList()
     pointops.append([
         Point3D(0.5, -0.5, -0.5),
         Point3D(-0.5, -0.5, -0.5),
         Point3D(-0.5, 0.5, -0.5),
         Point3D(0.5, 0.5, -0.5)
     ])
     pointops.append([
         Point3D(0, -0.5, 0.5),
         Point3D(0.5, -0.5, 0.5),
         Point3D(0.5, 0.5, 0.5),
         Point3D(0, 0.5, 0.5)
     ])
     pointops.append([
         Point3D(0, 0.5, 0),
         Point3D(-0.5, 0.5, 0),
         Point3D(-0.5, -0.5, 0),
         Point3D(0, -0.5, 0)
     ])
     pointops.append([
         Point3D(0, 0.5, 0),
         Point3D(0, -0.5, 0),
         Point3D(0, -0.5, 0.5),
         Point3D(0, 0.5, 0.5)
     ])
     pointops.append([
         Point3D(-0.5, 0.5, -0.5),
         Point3D(-0.5, -0.5, -0.5),
         Point3D(-0.5, -0.5, 0),
         Point3D(-0.5, 0.5, 0)
     ])
     pointops.append([
         Point3D(0.5, 0.5, 0.5),
         Point3D(0.5, -0.5, 0.5),
         Point3D(0.5, -0.5, -0.5),
         Point3D(0.5, 0.5, -0.5)
     ])
     pointops.append([
         Point3D(0, -0.5, 0.5),
         Point3D(0, -0.5, 0),
         Point3D(-0.5, -0.5, 0),
         Point3D(-0.5, -0.5, -0.5),
         Point3D(0.5, -0.5, -0.5),
         Point3D(0.5, -0.5, 0.5)
     ])
     pointops.append([
         Point3D(0.5, 0.5, 0.5),
         Point3D(0.5, 0.5, -0.5),
         Point3D(-0.5, 0.5, -0.5),
         Point3D(-0.5, 0.5, 0),
         Point3D(0, 0.5, 0),
         Point3D(0, 0.5, 0.5)
     ])
     return pointops
示例#6
0
 def make_default_flat_block_shape(self):
     pointops = PointList()
     pointops.append([
         Point3D(0.4, 0.4, -0.5),
         Point3D(-0.4, 0.4, -0.5),
         Point3D(-0.4, -0.4, -0.5),
         Point3D(0.4, -0.4, -0.5)
     ])
     pointops.append([
         Point3D(0.4, 0.4, -0.4),
         Point3D(-0.4, 0.4, -0.4),
         Point3D(-0.4, -0.4, -0.4),
         Point3D(0.4, -0.4, -0.4)
     ])
     pointops.append([
         Point3D(-0.4, -0.4, -0.5),
         Point3D(-0.4, -0.4, -0.4),
         Point3D(0.4, -0.4, -0.4),
         Point3D(0.4, -0.4, -0.5)
     ])
     pointops.append([
         Point3D(-0.4, 0.4, -0.5),
         Point3D(-0.4, 0.4, -0.4),
         Point3D(0.4, 0.4, -0.4),
         Point3D(0.4, 0.4, -0.5)
     ])
     pointops.append([
         Point3D(-0.4, -0.4, -0.5),
         Point3D(-0.4, 0.4, -0.5),
         Point3D(-0.4, 0.4, -0.4),
         Point3D(-0.4, -0.4, -0.4)
     ])
     pointops.append([
         Point3D(0.4, -0.4, -0.5),
         Point3D(0.4, 0.4, -0.5),
         Point3D(0.4, 0.4, -0.4),
         Point3D(0.4, -0.4, -0.4)
     ])
     return pointops
示例#7
0
 def make_default_ladder_shapes(self):
     pointops = PointList()
     pointops.append([
         Point3D(0.5, -0.5, -0.5),
         Point3D(-0.5, -0.5, -0.5),
         Point3D(-0.5, -0.4, -0.5),
         Point3D(0.5, -0.4, -0.5)
     ])
     pointops.append([
         Point3D(0.5, -0.4, 0.5),
         Point3D(-0.5, -0.4, 0.5),
         Point3D(-0.5, -0.5, 0.5),
         Point3D(0.5, -0.5, 0.5)
     ])
     pointops.append([
         Point3D(-0.5, -0.4, -0.5),
         Point3D(-0.5, -0.4, 0.5),
         Point3D(0.5, -0.4, 0.5),
         Point3D(0.5, -0.4, -0.5)
     ])
     pointops.append([
         Point3D(0.5, -0.5, -0.5),
         Point3D(0.5, -0.5, 0.5),
         Point3D(-0.5, -0.5, 0.5),
         Point3D(-0.5, -0.5, -0.5)
     ])
     pointops.append([
         Point3D(-0.5, -0.5, 0.5),
         Point3D(-0.5, -0.4, 0.5),
         Point3D(-0.5, -0.4, -0.5),
         Point3D(-0.5, -0.5, -0.5)
     ])
     pointops.append([
         Point3D(0.5, -0.5, -0.5),
         Point3D(0.5, -0.4, -0.5),
         Point3D(0.5, -0.4, 0.5),
         Point3D(0.5, -0.5, 0.5)
     ])
     return pointops
示例#8
0
    def make_default_vertical_plusblock(self):
        pointops = PointList()

        for fordir in xrange(0, 4):
            temperlist = PointList()
            temperlist.append([
                Point3D(0.5, 0.1, 0.5),
                Point3D(0.5, -0.1, 0.5),
                Point3D(0.5, -0.1, -0.5),
                Point3D(0.5, 0.1, -0.5)
            ])
            temperlist.append([
                Point3D(0.5, -0.1, -0.5),
                Point3D(0.1, -0.1, -0.5),
                Point3D(0.1, 0.1, -0.5),
                Point3D(0.5, 0.1, -0.5)
            ])
            temperlist.append([
                Point3D(0.5, 0.1, 0.5),
                Point3D(0.1, 0.1, 0.5),
                Point3D(0.1, -0.1, 0.5),
                Point3D(0.5, -0.1, 0.5)
            ])
            temperlist.append([
                Point3D(0.5, -0.1, -0.5),
                Point3D(0.5, -0.1, 0.5),
                Point3D(0.1, -0.1, 0.5),
                Point3D(0.1, -0.1, -0.5)
            ])
            temperlist.append([
                Point3D(0.1, 0.1, -0.5),
                Point3D(0.1, 0.1, 0.5),
                Point3D(0.5, 0.1, 0.5),
                Point3D(0.5, 0.1, -0.5)
            ])
            temperlist.rotate_points_z(90 * fordir)
            pointops.extend(temperlist)

        pointops.append([
            Point3D(-0.1, 0.1, -0.5),
            Point3D(0.1, 0.1, -0.5),
            Point3D(0.1, -0.1, -0.5),
            Point3D(-0.1, -0.1, -0.5)
        ])
        pointops.append([
            Point3D(-0.1, -0.1, 0.5),
            Point3D(0.1, -0.1, 0.5),
            Point3D(0.1, 0.1, 0.5),
            Point3D(-0.1, 0.1, 0.5)
        ])
        return pointops
示例#9
0
 def make_default_fence_shape(self):
     pointops = PointList()
     pointops.append([
         Point3D(0.1, 0.1, -0.5),
         Point3D(-0.1, 0.1, -0.5),
         Point3D(-0.1, -0.1, -0.5),
         Point3D(0.1, -0.1, -0.5)
     ])
     pointops.append([
         Point3D(0.1, 0.1, +0.5),
         Point3D(-0.1, 0.1, 0.5),
         Point3D(-0.1, -0.1, 0.5),
         Point3D(0.1, -0.1, 0.5)
     ])
     pointops.append([
         Point3D(-0.1, -0.1, -0.5),
         Point3D(-0.1, -0.1, 0.5),
         Point3D(0.1, -0.1, 0.5),
         Point3D(0.1, -0.1, -0.5)
     ])
     pointops.append([
         Point3D(-0.1, 0.1, -0.5),
         Point3D(-0.1, 0.1, 0.5),
         Point3D(0.1, 0.1, 0.5),
         Point3D(0.1, 0.1, -0.5)
     ])
     pointops.append([
         Point3D(-0.1, -0.1, -0.5),
         Point3D(-0.1, 0.1, -0.5),
         Point3D(-0.1, 0.1, 0.5),
         Point3D(-0.1, -0.1, 0.5)
     ])
     pointops.append([
         Point3D(0.1, -0.1, -0.5),
         Point3D(0.1, 0.1, -0.5),
         Point3D(0.1, 0.1, 0.5),
         Point3D(0.1, -0.1, 0.5)
     ])
     return pointops
示例#10
0
文件: shapes.py 项目: aaps/MCmotions
    def make_default_neg_corner_stairs(self):
        pointops = PointList()
        pointops.append([Point3D(0.5, -0.5, -0.5), Point3D(-0.5, -0.5, -0.5),
                         Point3D(-0.5, 0.5, -0.5), Point3D(0.5, 0.5, -0.5)])

        pointops.append([Point3D(0, -0.5, 0.5), Point3D(0, -0.5, 0), Point3D(-0.5, -0.5, 0), Point3D(-0.5, -0.5, -0.5), Point3D(0.5, -0.5, -0.5), Point3D(0.5, -0.5, 0.5)])
        pointops.append([Point3D(-0.5, 0.5, 0.5), Point3D(-0.5, 0.5, -0.5), Point3D(-0.5, -0.5, -0.5), Point3D(-0.5, -0.5, 0), Point3D(-0.5, 0, 0), Point3D(-0.5, 0, 0.5)])
        pointops.append([Point3D(0, -0.5, 0.5), Point3D(0.5, -0.5, 0.5), Point3D(0.5, 0.5, 0.5), Point3D(-0.5, 0.5, 0.5), Point3D(-0.5, 0, 0.5), Point3D(0, 0, 0.5)])
        pointops.append([Point3D(0, -0.5, 0.5), Point3D(0, 0, 0.5), Point3D(0, 0, 0), Point3D(0, -0.5, 0)])
        pointops.append([Point3D(-0.5, 0, 0), Point3D(0, 0, 0), Point3D(0, 0, 0.5), Point3D(-0.5, 0, 0.5)])
        pointops.append([Point3D(-0.5, -0.5, 0), Point3D(0, -0.5, 0), Point3D(0, 0, 0), Point3D(-0.5, 0, 0)])
        pointops.append([Point3D(0.5, -0.5, -0.5), Point3D(0.5, 0.5, -0.5), Point3D(0.5, 0.5, 0.5), Point3D(0.5, -0.5, 0.5)])
        pointops.append([Point3D(-0.5, 0.5, 0.5), Point3D(0.5, 0.5, 0.5), Point3D(0.5, 0.5, -0.5), Point3D(-0.5, 0.5, -0.5)])

        return pointops
示例#11
0
文件: shapes.py 项目: aaps/MCmotions
    def make_default_vertical_plusblock(self):
        pointops = PointList()

        for fordir in xrange(0, 4):
            temperlist = PointList()
            temperlist.append([Point3D(0.5, 0.1, 0.5), Point3D(0.5, -0.1, 0.5), Point3D(0.5, -0.1, -0.5), Point3D(0.5, 0.1, -0.5)])
            temperlist.append([Point3D(0.5, -0.1, -0.5), Point3D(0.1, -0.1, -0.5), Point3D(0.1, 0.1, -0.5), Point3D(0.5, 0.1, -0.5)])
            temperlist.append([Point3D(0.5, 0.1, 0.5), Point3D(0.1, 0.1, 0.5), Point3D(0.1, -0.1, 0.5), Point3D(0.5, -0.1, 0.5)])
            temperlist.append([Point3D(0.5, -0.1, -0.5), Point3D(0.5, -0.1, 0.5), Point3D(0.1, -0.1, 0.5), Point3D(0.1, -0.1, -0.5)])
            temperlist.append([Point3D(0.1, 0.1, -0.5), Point3D(0.1, 0.1, 0.5), Point3D(0.5, 0.1, 0.5), Point3D(0.5, 0.1, -0.5)])
            temperlist.rotate_points_z(90*fordir)
            pointops.extend(temperlist)

        pointops.append([Point3D(-0.1, 0.1, -0.5), Point3D(0.1, 0.1, -0.5), Point3D(0.1, -0.1, -0.5), Point3D(-0.1, -0.1, -0.5)])
        pointops.append([Point3D(-0.1, -0.1, 0.5), Point3D(0.1, -0.1, 0.5), Point3D(0.1, 0.1, 0.5), Point3D(-0.1, 0.1, 0.5)])
        return pointops
示例#12
0
文件: shapes.py 项目: aaps/MCmotions
 def make_default_fence_shape(self):
     pointops = PointList()
     pointops.append([Point3D(0.1, 0.1, -0.5), Point3D(-0.1, 0.1, -0.5), Point3D(-0.1, -0.1, -0.5), Point3D(0.1, -0.1, -0.5)])
     pointops.append([Point3D(0.1, 0.1, +0.5), Point3D(-0.1, 0.1, 0.5), Point3D(-0.1, -0.1, 0.5), Point3D(0.1, -0.1, 0.5)])
     pointops.append([Point3D(-0.1, -0.1, -0.5), Point3D(-0.1, -0.1, 0.5), Point3D(0.1, -0.1, 0.5), Point3D(0.1, -0.1, -0.5)])
     pointops.append([Point3D(-0.1, 0.1, -0.5), Point3D(-0.1, 0.1, 0.5), Point3D(0.1, 0.1, 0.5), Point3D(0.1, 0.1, -0.5)])
     pointops.append([Point3D(-0.1, -0.1, -0.5), Point3D(-0.1, 0.1, -0.5), Point3D(-0.1, 0.1, 0.5), Point3D(-0.1, -0.1, 0.5)])
     pointops.append([Point3D(0.1, -0.1, -0.5), Point3D(0.1, 0.1, -0.5), Point3D(0.1, 0.1, 0.5), Point3D(0.1, -0.1, 0.5)])
     return pointops