Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)

src/a/e/Aerospace-Simulations-HEAD/morse/src/morse/geolandloader/geoShapefileLoader.py   Aerospace-Simulations(Download)
            # for j = TODO
            # Extend the vertices of the current building's mesh
            buildingMesh.verts.extend(groundCoverage[i][0]   - hostObject.UTMXOrigin,
                                        groundCoverage[i][1] - hostObject.UTMYOrigin ,
                                        thisBuildingZ)
        #--- Creating the walls
        for i in range(N-1):
            buildingMesh.verts.extend(groundCoverage[i][0]   - hostObject.UTMXOrigin,
                                        groundCoverage[i][1] - hostObject.UTMYOrigin ,
                                        thisBuildingZ + BHeight)
                xroof = ((buildingMesh.verts[0]).co[0] + (buildingMesh.verts[N-2]).co[0]) / 2.0
                yroof = ((buildingMesh.verts[0]).co[1] + (buildingMesh.verts[N-2]).co[1]) / 2.0
                buildingMesh.verts.extend(xroof, yroof, thisBuildingZ + RoofHeight)
                xroof = ((buildingMesh.verts[1]).co[0] + (buildingMesh.verts[2]).co[0]) / 2.0
                yroof = ((buildingMesh.verts[1]).co[1] + (buildingMesh.verts[2]).co[1]) / 2.0
                buildingMesh.verts.extend(xroof, yroof, thisBuildingZ + RoofHeight)
                xroof = ((buildingMesh.verts[0]).co[0] + (buildingMesh.verts[1]).co[0]) / 2.0
                yroof = ((buildingMesh.verts[0]).co[1] + (buildingMesh.verts[1]).co[1]) / 2.0
                buildingMesh.verts.extend(xroof, yroof, thisBuildingZ + RoofHeight)
                xroof = ((buildingMesh.verts[2]).co[0] + (buildingMesh.verts[3]).co[0]) / 2.0
                yroof = ((buildingMesh.verts[2]).co[1] + (buildingMesh.verts[3]).co[1]) / 2.0

src/p/y/PyPRP-HEAD/PyPRP/prp_Functions.py   PyPRP(Download)
def alcCreateMesh(name,vertices,faces):
    obj = Blender.Mesh.New(name)
    obj.verts.extend(vertices)
    obj.faces.extend(faces)
    scene = Blender.Scene.GetCurrent()
def alcCreateBox(name,size,x=0,y=0,z=0,bReverse=False):
    obj = Blender.Mesh.New(name)
    coords = [ [x,y,z], [size+x,y,z], [x,size+y,z], [x,y,size+z], [size+x,size+y,size+z], [size+x,size+y,z], [size+x,y,size+z], [x,size+y,size+z] ]
    obj.verts.extend(coords)
    if bReverse:
def alcCreatePlane(name,size,x=0,y=0,z=0):
    obj = Blender.Mesh.New(name)
    coords = [ [x,y,z], [size+x,y,z], [x,size+y,z], [size+x,size+y,z] ]
    obj.verts.extend(coords)
    face = [0,1,3,2]

src/m/a/mavsim-HEAD/blender/import_freecad.py   mavsim(Download)
def drawmesh(meshdata,sce):
    "draws meshes in blender"
    mes = Mesh.New()
    mes.verts.extend(meshdata['verts'])
    if meshdata['edges']: mes.edges.extend(meshdata['edges'])