def self.create( frequency = nil, primitive = :octahedron, radius = 36 )
if !frequency
prompts = [ 'Primitive:', 'Radius (in "):', 'Subdivisions:' ]
values = [ primitive.to_s, radius, 2 ]
primitive_types = ['tetrahedron|octahedron|icosahedron']
results = inputbox prompts, values, primitive_types, 'Create Geodesic'
return unless results
primitive, radius, frequency = results
primitive = primitive.to_sym
end
raise "The Geodesic class does not support the primitive type '#{primitive}'" unless PRIMITIVES[primitive]
model = Sketchup.active_model
model.start_operation "Create Geodesic"
group = model.active_entities.add_group
PRIMITIVES[primitive].each{ |face|
self.expand_face( face, frequency.to_i, radius.to_f, group.entities )
}
model.commit_operation
group
end