| |
- DisplayblackBackGround(show=True)
- Switch background color of screen, black or white
input: True(black) or False(white)
- addDestination(id=-1)
- add node as destination(s)
input: node id
return: number of total destinations
- addDestinations(ids=[])
- add node(s) as destination(s)
input: list of node id[node id, node id, ....]
return: number of total destinations
add all nodes as destinations
input: empty list []
return: number of total destinations
- addEdge(id1, id2, midpoints=[], ratio=1.0, oneway=False, layername='1', len1=-1, len2=-1)
- input: id1 of node(connect from) , id2 of node(connect to), point list[[x,y,z],[x,y,z],] between node(id1 and id2), ratio of length(0>=, it sets weight of this edge, 1.0 set the edge weight as 1.0 * edge length, 0.5 set the edge weight as 0.5 * edge length), oneway set the edge oneway id1 -> id2, if you set len1 it force to set id1->id2 weight, if you set len2 it force to set id2->id1 weight,
return: number of active edges
- addNode(poses=[[]])
- input: list of coordinates [[x,y,z],[x,y,z],[x,y,z],......]
return: number of active nodes
- addOrigin(id=-1)
- add node as origin(s)
input: node id
return: number of total origins
- addOrigins(ids=[])
- add node(s) as origin(s)
input: list of node id[node id, node id, ....]
return: number of total origins
add all nodes as origins
input: empty list []
return: number of total origins
- addWeightedDestination(id_and_weight=[])
- add node with weight as destination
input: pair of node id and weight [node id, weight]
return: number of total destinations
- addWeightedDestinations(id_weight_list=[])
- add node(s) with weight as destination(s)
input: list of pair of node id and weight [[node id, weight], [node id, weight], [node id, weight], ....]
return: number of total destinations
- addWeightedOrigin(id_and_weight=[])
- add node with weight as origin
input: pair of node id and weight [node id, weight]
return: number of total origins
- addWeightedOrigins(id_weight_list=[])
- add node(s) with weight as origin(s)
input: list of pair of node id and weight [[node id, weight], [node id, weight], [node id, weight], ....]
return: number of total origins
- captureCurrentScreen(filepath='')
- Save the screen capture(.png)
input: filepath (absolute path only)
- clear()
- clear all nodes and edges
return: number of active nodes, should be always 0
- clearDestinations()
- remove all destinations
return: number of total destinations, should be 0
- clearOrigins()
- remove all origins
return: number of total origins, should be 0
- compute_MST()
- input:
return: list of g_raph_edge
Origins or destinations have to be set before calling this function
- compute_between()
- find nodes which has high number of passes
return: list of [node id, passing count]
- compute_minmax()
- find minmax node from origins or to destinations
return: list of [node id, sum weighted distance from origin ro to destination, sum reach time in hour]
- compute_minsum()
- find minsum node from origins or to destinations
return: list of [node id, sum weighted distance from origin ro to destination, sum reach time in hour]
- compute_voronoi(sec=0)
- input: sec (>0)
return: [] empty list,
input: sec (=0)
return: [[node id,node id,....],[node id,node id,....],....]
- compute_ward(num=2)
- input: desired number of clusters
return: list of [[center node id, [node id, node id, ]],[center node id, [node id, node id, ]],,,,]
Origins or destinations have to be set before calling this function
- edgeDisplayMode(mode='')
- input: string of mode
'hide' = It does not show any edge
'category' = show edges in color of layer
'evaluation' = show edges in spectrum color of evaluation/calculation
'weight' = show edges in spectrum color of weight
- findfurthest()
- find furthest node paths from origin(s)
find furthest node paths to destination(s)
return: list of g_raph_route
- findshortestpaths()
- find shortest paths from origin(s) to destination(s)
return: list of g_raph_route
- fitCamera()
- all nodes and edges displaying fit in screen
- getCamera()
- return: list of coordinates [eye[x,y,z],look[x,y,z],updir[x,y,z]]
- getDestinationNum()
- return: number of total destinations
- getDestinations()
- return: node id list of destinations
- getEdge(id_pairs=[])
- input: list of paired node id[[node id, node id],[node id, node id],....]
return: id specified list of g_raph_edge
input: empty list
return: list of all active g_raph_edge
- getEdgeNum()
- return number of active edges
- getElementNum()
- return number of total elements
- getElementSetNum()
- return number of element set
- getElementSets()
- return list of element dictionary
[{node id: weight, name},....]
- getNode(ids_node=[])
- input: list of node id[]
return: id specified list of g_raph_node
input: empty list
return: list of all active g_raph_node
- getNodeDistanceFromOD()
- return dict of {node id: [weighted distance, reach time in hour]}
from origin or to destination
- getNodeNum()
- return number of active nodes
- getNodeTemparature()
- return dict of {node id: temparature = 0.0~1.0}
spectrum color
- getOriginNum()
- return: number of total origins
- getOrigins()
- return: node id list of origins
- getShortestBuffer()
- return: buffer of shortestpath finding
- getShortestK()
- return: k rank of shortestpath finding
- getTimeCircle()
- in mode of time distance map
return: time range circle interval in sec
- getWalkSpeed()
- return: walk distance unit in hour
- importRhino3dmFile(filepath='', fitelements3D=False)
- Import a Rhinoceros file(.3dm)
input: filepath (absolute path only)
- init(address='127.0.0.1', port=313)
- just simply establish tcp/ip connection with g-raph main application
port setting must be paired with g-raph main application
menu -> Server -> port
- loadCamera(filepath='')
- input: filepath to .ini file of camera setting
- open_g_raphFile(filepath='')
- Open a g-raph file(.graph)
input: filepath (absolute path only)
- saveCamera(filepath='')
- input: filepath to .ini file of camera setting
- save_g_raphFile(filepath='')
- Save a g-raph file(.graph)
input: filepath (absolute path only)
- setCamera(eye=[], look=[], updir=[], zoom=1.0)
- input: eye: camera position [x,y,z], look: position of looking at [x,y,z], updir: head up direction [x,y,z]
return: number of active edges
- setDisplayAnnotationAngle(angle=1)
- It changes the angle of leader line of annotation to node(s)
input: angle (o ~ 359)
- setDisplayHeatLegend(blue, red)
- Setting the min/max value of legend
input: blue , red (of spectrum)
- setDisplayHeightScale(scale=1.0)
- It changes the scale of z direction. Basically used to amplify undulating. It does not effect to evaluating.
input: scale
- setDisplayLengthAnnotationLine(length=200)
- It changes the length of leader line of annotation to node(s)
input: length (in pixel unit)
- setDisplayNodeColorTemparature(temps=[])
- Setting node colors temparature of spectrum on screen
input: list of [[node id, temparature], [node id, temparature], [node id, temparature], ,,,]
temparature(0.0 ~ 1.0)
- setDisplayNodeColorTemparatureEX(index=-1, temps=[])
- Setting node colors temparature of spectrum on screen
input: list of [index, [[node id, temparature], [node id, temparature], [node id, temparature], ,,,] ]
index(setting index of node.doubles[index])
temparature(0.0 ~ 1.0)
- setDisplayOpacityBackground(opac=0.3)
- It changes the opacity of backgroud image on screen
input: opac (1.0: 100%, 0.0: 0% invisible)
- setDisplayOpacityEdge(opac=0.5)
- It changes the opacity of edge(s) on screen
input: opac (1.0: 100%, 0.0: 0% invisible)
- setDisplayOpacityGrid(opac=0.3)
- It changes the opacity of grid lines on screen
input: opac (1.0: 100%, 0.0: 0% invisible)
- setDisplayOpacityNode(opac=1.0)
- It changes the opacity of node(s) on screen
input: opac (1.0: 100%, 0.0: 0% invisible)
- setDisplayOpacityRoute(opac=0.5)
- It changes the opacity of Route(s) on screen
input: opac (1.0: 100%, 0.0: 0% invisible)
- setDisplaySizeFontElement(size=9.0)
- It changes the size of font of element information(at element position) on screen
input: size (in pixel unit)
- setDisplaySizeFontGeneral(size=8.0)
- It changes the size of font of general information on screen
input: size (in pixel unit)
- setDisplaySizeFontNode(size=10.0)
- It changes the size of font of node information(at node position) on screen
input: size (in pixel unit)
- setDisplaySizeFontRank(size=16.0)
- It changes the size of font of ranking on screen
input: size (in pixel unit)
- setDisplaySizeMark(size=12)
- It changes the size of Marks (Origins / Destinations) on screen
input: size (in pixel unit)
- setDisplaySizeNode(size=6)
- It changes the size of Node on screen
input: size (in pixel unit)
- setDisplaySizeNodeMax(size=6)
- It changes the maximum size of Node on screen
input: size (in pixel unit)
- setDisplaySizeRouteArrow(size=9.0)
- It changes the size of Route(s) arrow on screen
input: size (in pixel unit)
- setDisplayWidthAnnotationLine(width=2)
- It changes the width of leader line of annotation to node(s)
input: length (in pixel unit)
- setDisplayWidthEdge(width=3)
- It changes the width of Mark line (Origins / Destinations) on screen
input: width (in pixel unit)
- setDisplayWidthMarkLine(width=2)
- It changes the width of Mark line (Origins / Destinations) on screen
input: width (in pixel unit)
- setDisplayWidthRoute(width=4)
- It changes the width of Route(s) on screen
input: width (in pixel unit)
- setEdgeColorIndex(index)
- It sets the edge color index. It is for setting the edge color differently from the color of node.
input: index (of node value list)
- setLayerEdgeWeight(layername, ratio)
- input: layername, ratio(of edge weight, default 1.0)
return: ratio of edge weight
- setLengthUnit(unit_str='Meters')
- input: string of unit name (Kilometers ,Meters, Centimeters, Millimeters, Miles, Yards, Feet, Inches)
return: strings of unit name
- setNodeDeformedPos(poses=[[]])
- input: list of coordinates [[node_id,x,y,z],[node_id,x,y,z],[node_id,x,y,z],......]
return: number of modified nodes
- setNodeSizeIndex(index)
- It sets the node size index. It is for setting the node size differently from the color of node.
input: index (of node value list)
- setNodeTextInfo(id_info_list=[])
- input: [[nod id, 'textinfo'],[nod id, 'textinfo'],[nod id, 'textinfo'],......]
return: number of nodes which are modified
- setScreenSize(w, h)
- Setting the size of screen
input: w , h (in pixel unit)
- setShortestBuffer(buffer=0)
- input: buffer of shortestpath finding
return: buffer of shortestpath finding
- setShortestK(k=1)
- input: k of shortestpath finding
return: k of shortestpath finding
- setTimeCircle(sec=600)
- in mode of time distance map
input: sec (time range circle interval)
return: time range circle interval in sec
- setUserDisplayHeatLegend(blue, red, x, y)
- Setting the min/max value of legend
input: blue , red (of spectrum), x(position) , y(position)
- setUserDisplaySizeFontLegend(size)
- It changes the size of font of user heat legend on screen
input: size (in pixel unit)
- setUserDisplaySizeFontText(size)
- It changes the size of font of user text on screen
input: size (in pixel unit)
- setUserDisplayText(text, x, y)
- Setting the min/max value of legend
input: blue , red (of spectrum)
- setWalkSpeed(wph=4)
- input: walk distance unit in hour
return: walk distance unit in hour
- showDisplayGeneralnfo(show=True)
- Switch showing general info on screen
input: True(on) or False(off)
- showDisplayLegend(show=True)
- Switch showing Legend screen
input: True(on) or False(off)
- showDisplayNodeID(show=True)
- Switch showing node id at every node position on screen
input: True(on) or False(off)
- showDisplayNodeInfo(show=True)
- Switch showing node text information at every node position on screen
input: True(on) or False(off)
- showDisplayRank(show=True)
- Switch to show evaluation ranking of node(s)
input: True(on) or False(off)
- showDisplayRankAt(rank=1)
- Switch to show ranked node(s) until specified rank
input: number of rank (1 means ranked top shows only top rank)
- showDisplayRoutes(show=True)
- Switch showing route(s) on screen
input: True(on) or False(off)
- showDisplayWholeRank(show=True)
- Switch showing whole ranking of node(s)
input: True(on) or False(off)
- showUserDisplayElement(index)
- It shows the element info which embededd node
input: index (of element)
- showUserDisplayLegend(show=True)
- Switch showing Legend screen
input: True(on) or False(off)
- timeDistance()
- calc time distance
return: reach time of furthest node from origin, in hour
- timeDistanceMap()
- calc time distance and show time distance map from origin
return: reach time of furthest node from origin, in hour
|