I have lots of curves like this from a photo tracing program, it does a good job with the smoothly curved parts but I need to add the sharp corners back & ideally straighten out the flat sides which get lost during fitting / smoothing.
InsertKink would be the command to do this manually. Otherwise, you can use Split>Point, split the curve at all the points you want to fix, then use Connect or something similar to make sharp corners between the segments.
Thanks @Helvetosaur, InsertKink does work though its a little hard to find and select the kink on complex curves in order to move it to the corner, particularly when there are many control points.
I threw a command together which picks 2 pts on the curve and a corner point and splices in a sharp corner