Hi, I'm pretty new to ruby coding in sketchup so i'm just trying to get my head around a few bits of basic code. I'm trying to make a face from two straight edges and a curve.... the edges are drawing fine but i'm getting an error when I try to make a face from the edges??
this is my code atm...
%(#004080)[radius =10
startangle =90.degrees
endangle =0.degrees
centerpoint = Geom::Point3d.new
vector = [0,0,1]
vector2 = [1,0,0]
vector3 = vector.normalize!
model = Sketchup.active_model
entities = model.active_entities
curve = entities.add_arc centerpoint, vector2, vector3, radius, endangle, startangle
edge1 = entities.add_edges [0,0,0],[0,radius,0]
edge2 = entities.add_edges [0,0,0], [radius,0,0]
face = entities.add_face (edge1,curve,edge2)]
In the API documentation it says I should be able to make a face from a bunch of edges...
%(#0000BF)[entities.add_face(edge1, edge2, edge3, ...)
entities.add_face(edgearray)
entities.add_face(pt1, pt2, pt3, ...)
entities.add_face([pt1, pt2, pt3,...])
entities.add_face(curve)]
Does anyone know why this won't work?
Thanks in advance
Matt