Exemple #1
0
 def drawPolygons(self , blocks):
     from loadDataTools import Block
     p = plane.getRotation()
     pts = []
     for block in blocks:
         pts.extend(block.vertices)
     Base.initPolygonSets()
     Base.addPolygons2Document(pts, placement=p, fname='Block')
     Base.polygonsAddedDone()
Exemple #2
0
    def drawPolygon(self , points , shapeType , materialIndex = 0):
        p = plane.getRotation()
        vertices = range(len(points))
        for i in range(len(points)):
#            vertices[i] = (points[i].x , points[i].y , -1)
            vertices[i] = (points[i][1] , points[i][2] , -1)
            
#        import checkConcave_and_triangulate as triangulate
#        assert triangulate.IfConcave(vertices)
                
        if shapeType == 'Block':
            Base.addPolygons2Document(vertices , placement=p , fname = 'Block' )#, materialIndex = 1)#materialIndex)