(SOLVED) Curve Offset Rhino Common Python(Grasshopper) Problem

Hi all,
I use
Rhino.Geometry.Curve.Offset
to create closed offset curves but they are always open and looks like
The base curve is a closed planar curve.


but if i use grasshopper curve offset node or the rhino command line or pufferfisch i get the wished result.

Offset Curve or Polycurve seems not the correct code.
Any Help is very welcome

What corner style did you use? Default is “None” which means not extending/connecting corners.

Ups… shame on me.
big thanks to you

St = rh.Geometry.CurveOffsetCornerStyle.Sharp
Os.append(rh.Geometry.Curve.Offset(j,PlaneO,OfDis,0.01,St))

Problem solved