Trim with brep - inconsistent results

I am trying to trim curves with breps and getting terribly inconsistent results and I can not figure out why???
sometimes it works … other times not?? and then when I flip the curves it does work? curious
Including a file with one example of each…
Any advice?trim with brep (15.5 KB)

Well in all three cases there’s null brep assigned , In my canvas in each of your example the trim component doesn’t operate as it has not to ( null brep casted ) .

thanks for looking into it Habibi !
… that’s interesting as I internalized the geometry… not sure why it didn’t take…
Here’s some files with the geometry in rhino and referenced to gh…
let me know if it works thanks!

trim with brep question2.3dm (62.3 KB)
trim with brep (7.2 KB)

my workaround is to do both trims with the normal curve and the flipped curve then compare length and dispatch to get the shorter one but still it bothers me not knowing why…!

It’s weird to me though , If that (special curve) is a referenced-polyline-curve , grasshopper trim component do not operates correctly !?!

BTW : reparameterizing , fliping , closing and whatever operation you implement on it in grasshopper canvas it’ll be converted to polyline curve and y,ll use as the way all polylines u use .