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()
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()
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 )
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)
] 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, #]
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, #]