コード例 #1
0
ファイル: render3dms.py プロジェクト: localcode/localcode
def bakeRaw( data, attributes = None, transVect=None):
    if type(data) not in (list, tuple):
        data = [data]
    elif type(data[0]) in (list, tuple, List):
        data = data[0]
    if attributes:
        att = attributes
    else:
        att = Rhino.DocObjects.ObjectAttributes()
    for thing in data:
        bakeMany(thing, att, transVect)
    doc.Views.ActiveView.Redraw()
コード例 #2
0
ファイル: make2d.py プロジェクト: localcode/localcode
def bakeRaw(data, attributes=None, transVect=None):
    if type(data) not in (list, tuple):
        data = [data]
    elif type(data[0]) in (list, tuple, List):
        data = data[0]
    if attributes:
        att = attributes
    else:
        att = Rhino.DocObjects.ObjectAttributes()
    for thing in data:
        bakeMany(thing, att, transVect)
    doc.Views.ActiveView.Redraw()
コード例 #3
0
ファイル: make2d.py プロジェクト: localcode/localcode
def make2D(sid):
    # create frustum X
    frustumLines = frustumX()
    att = LayerTools.layerAttributes("viewportFramework", System.Drawing.Color.Cyan )
    bakeMany( frustumLines, att)
    cmds = [
        'SelAll',
        'Make2D Enter',
        'Invert Delete SetView World Top',
        'SelNone',
        'SelLayer Make2D::visible::lines::viewportframework',
        'SelLayer Make2D::hidden::lines::viewportframework',
        'ZS',
        'Delete',
        ]
    rcmds( cmds )
コード例 #4
0
ファイル: make2d.py プロジェクト: localcode/localcode
def make2D(sid):
    # create frustum X
    frustumLines = frustumX()
    att = LayerTools.layerAttributes("viewportFramework",
                                     System.Drawing.Color.Cyan)
    bakeMany(frustumLines, att)
    cmds = [
        'SelAll',
        'Make2D Enter',
        'Invert Delete SetView World Top',
        'SelNone',
        'SelLayer Make2D::visible::lines::viewportframework',
        'SelLayer Make2D::hidden::lines::viewportframework',
        'ZS',
        'Delete',
    ]
    rcmds(cmds)
コード例 #5
0
ファイル: make2d.py プロジェクト: localcode/localcode
                        ]
                importPath = '/amigos/dump/%s-terrain.3dm' % sid
                data = getModelLayers( importPath, layers )
                print ', '.join(['%s:%s' % (k, len(data[k])) for k in data])
            else:
                data = {}
                if len(scene) > 1:
                    layers = scene[1:]
                else:
                    layers = scene
                for layer in layers:
                    fmask = '/amigos/db/%s%s' % (sid, layer)
                    f = open(fmask, 'rb')
                    data[layer] = pickle.load(f)
                    f.close()
            # bake data
            for key in data:
                layerAtt = LayerTools.layerAttributes( key )
                bakeMany( data[key], layerAtt )
            # do make2d or export AI file of current view
            exportPerspective( outPath )

            #make2D(sid)
            #cmds = [
                    #'SelAll',
                    #'Export "%s" Enter' % outPath,
                    #]



コード例 #6
0
ファイル: make2d.py プロジェクト: localcode/localcode
                layers = [
                    'bigcontours',
                    'smallcontours',
                ]
                importPath = '/amigos/dump/%s-terrain.3dm' % sid
                data = getModelLayers(importPath, layers)
                print ', '.join(['%s:%s' % (k, len(data[k])) for k in data])
            else:
                data = {}
                if len(scene) > 1:
                    layers = scene[1:]
                else:
                    layers = scene
                for layer in layers:
                    fmask = '/amigos/db/%s%s' % (sid, layer)
                    f = open(fmask, 'rb')
                    data[layer] = pickle.load(f)
                    f.close()
            # bake data
            for key in data:
                layerAtt = LayerTools.layerAttributes(key)
                bakeMany(data[key], layerAtt)
            # do make2d or export AI file of current view
            exportPerspective(outPath)

            #make2D(sid)
            #cmds = [
            #'SelAll',
            #'Export "%s" Enter' % outPath,
            #]