Soft Edges with Follow Me

When I extrude a profile with the followme method using the API I’m getting soft edges. I’ve never noticed this before but I’m wondering if anyone else has encountered a similar result. My code is fairly simple:

group0b = Sketchup.active_model.active_entities.add_group
entities0b = group0b.entities
edges0b = entities0b.add_curve @pts_aligned
			
group2 = Sketchup.active_model.active_entities.add_group
entities2 = group2.entities
new_face2 = entities2.add_face ftg_profile

status_ftg = new_face2.followme(edges0b)

The only thing I’m doing different here from previous code is generating the path with the add_curve method, but I don’t see why that would create this behavior.

The @pts_aligned array is an ordered set of points. The ftg_profile is also an ordered set of points in an array. It all works great other than I’m getting soft edges.

The workaround seems to be this little function/method:

def unsoften_group(grp)
    grp.entities.each { |e|
      if (e.kind_of? Sketchup::Edge)
		e.soft = false
		e.smooth = false
      end
    }
end 

However I would rather not to have to do more work (computationally) if it can be avoided.

The stemwall footing had the unsoften_group method applied to it whereas the stemwall itself has not in the image below:

curves always produce smoothed ‘extruded’ edges, so you either use edges, explode the curve or unsoften as you create them…

john

1 Like

That was my suspicion all along with the curve entity since this was the only thing different between other chunks of code that did not create a smoothed solid. Thank-you for the solution and explanation.

2 Likes

The addition of this one line of code eliminated the workaround and softening method:

edges0b[0].explode_curve

2 Likes