I'll post the code here, because it's where I searched for a solution first and couldn't find one...
[image: 8ARS_working_edges_centre.gif]
I striped out the colouring but left the selection add, as a progress bar substitute...
# with Tig's advice from PM ...
model = Sketchup.active_model
sel = model.selection
ents = model.active_entities
view = model.active_view
mats = model.materials
# cylindrical sine wave pair on a unit radius with 24 sides...
wave = [[1.0, 0.0, 0.0], [0.9659258262890683, 0.25881904510252074, 0.050799999999999984], [0.8660254037844387, 0.49999999999999994, 0.08798818102449896], [0.7071067811865476, 0.7071067811865475, 0.1016], [0.5000000000000001, 0.8660254037844386, 0.08798818102449898], [0.25881904510252096, 0.9659258262890682, 0.05080000000000003], [6.123233995736766e-17, 1.0, 1.2442411479337108e-17], [-0.25881904510252063, 0.9659258262890683, -0.05079999999999998], [-0.4999999999999998, 0.8660254037844388, -0.08798818102449893], [-0.7071067811865475, 0.7071067811865476, -0.1016], [-0.8660254037844385, 0.5000000000000003, -0.087988181024499], [-0.9659258262890682, 0.258819045102521, -0.050800000000000047], [-1.0, 1.2246467991473532e-16, -2.4884822958674216e-17], [-0.9659258262890684, -0.25881904510252035, 0.05079999999999989], [-0.8660254037844388, -0.4999999999999998, 0.08798818102449892], [-0.7071067811865479, -0.7071067811865471, 0.1016], [-0.5000000000000004, -0.8660254037844384, 0.08798818102449903], [-0.25881904510252146, -0.9659258262890681, 0.05080000000000014], [-1.8369701987210297e-16, -1.0, 3.267705224142925e-17], [0.2588190451025203, -0.9659258262890684, -0.050799999999999915], [0.4999999999999993, -0.866025403784439, -0.08798818102449889], [0.7071067811865475, -0.7071067811865477, -0.1016], [0.8660254037844384, -0.5000000000000004, -0.08798818102449901], [0.9659258262890681, -0.2588190451025215, -0.05080000000000014], [1.0, 0.0, -0.0]]
# waves have an additional point to complete the circle...
segments = wave.length - 1
# single undo
model.start_operation('wave')
# Make the empty 'container' group.
container = ents.add_group()
cont_ents = container.entities
# add the empty surf_grp() to cont_ents
surf_grp = cont_ents.add_group()
surf_ents = surf_grp.entities
# Add Surface soft edges and faces using offset points...
i = 0
segments.times do
f = surf_ents.add_face(ORIGIN, wave[i], wave[i + 1])
view.refresh
f.edges.each{|e|
e.soft="true"
e.smooth="true"
sel.add(e)
}
i += 1
view.refresh
end
# add the wave to cont_ents...
cont_ents.add_curve(wave)
# and explode the surface faces...
surf_grp.explode
sel.clear
model.commit_operation
EDIT: after getting the other working using add_face I made a few adjustment to this code...
john