Hi, if the slope is the same for all corners, you can create a custom segment for the straight sections, and select it with a Conditional operator.
Unfortunately i don't see any way to select it automatically (there is not any condition to check the Z angle), so in this case you assign in the spline a specific ID for the straight sections. Also, depending of the path, a condition based on Spline->Length->of Current Section would work as well.
I've attached a sample. I hope that helps.