Relocate starting point of curves and define orientation of curves

After nesting and before to export the result as DXF file to send to my CAM software I need to make some adjustments to the curves so I do worked to a definition that will allow-me to change the starting point of a curve. The starting point it is the position in which the CNC cutter will plunge in material to cut and from the same position will retract.

I do need to move the starting point on the Top (if the piece is longer on Length) or Right (if the piece is longer on Wide) side of the material depending on the orientation for the ouside shapes and I need to relocate the starting point in Bottom or Left of the shapes for the interior ones.

Also I do need to change the direction of the contours to be CCW for the external ones and CW for the interior ones.

Unfortunately I don’t know how I can remove the duplicate starting points that I do have into my shapes and how to change the orientation of the shapes.

ClosedCurve_NewStart_Center_Top_Right.gh (16.7 KB)

P.S. The small circles like 3, 5, 8, 10, 35mm I don’t need a starting point because that will be drilled and the drills are always picking the center of the circles. I found a solution to remove them from the selection of the curves that needs to have changed the starting point and direction.