Action:

Adds a vertex to a graph.


Filename:

kern/kern_scm/graph_scm.cxx


Syntax:

(graph:addvertex ingraph inname)


Arg Types:

ingraph

graph


inname

string


Returns:

graph


Description:

This adds the
inname string as a vertex in
ingraph.



ingraph specifies a graph.



inname is a string specifying the vertex that has to be added to the
ingraph.


Example:

; graph:addvertex


; Create a simple example


(define g1 (graph "meyou usthem"))


;; g1


; Add a vertex.


(define g2 (graph:addvertex g1 "NEW_ONE"))


;; g2


; CAREFUL: The order of the graph output may


; not be the same each time.


; Create an example using entities.


(define b1 (solid:block (position 5 10 20)



(position 5 10 15)))


;; b1


(define faces1 (entity:faces b1))


;; faces1


; Turn the block faces into vertices of the graph.


(define g3 (graph faces1))


;; g3


; Add a vertex.


(define g4 (graph:addvertex g3 "NEW_ONE"))


;; g4
