Trim Surface With A Curve

I have no experience with STEP. But maybe you can use a similar procedure on the edge as it is done in triangulation according to E. Hartmann.

I have realized it for implicit surfaces and also explicit forms.

See

Addon for triangulation of implicit surfaces/ forms with holes

https://github.com/hofk/THREEi.js

Triangulation sphere with holes
Triangulation cylinder with holes
Inner Geometry (Triangulation)