How to explode a one curve face into separate planar faces using Ruby API?
How to convert this:
into:
SKP: test1.skp (127.1 KB)
How to explode a one curve face into separate planar faces using Ruby API?
How to convert this:
SKP: test1.skp (127.1 KB)
Curves don’t exist as such in SketchUp, they are always series of straight edges. The difference between your two images is just whether or not the soft/smooth edges are visible.
There is one more difference: I can’t select one separate face on the first image
@slbaumgartner is there any way to switch from the first image into the second using Ruby API?
thanks!
Gather the edges and turn off their soft and smooth properties.
@slbaumgartner thanks! It works
Sketchup.active_model.entities.grep(Sketchup::Edge).each do |edge|
edge.soft = false
edge.smooth = false
end
And if it was selected …
Sketchup.active_model.selection.grep(Sketchup::Edge).each do |edge|
edge.soft = false
edge.smooth = false
end