Rib structure from brep

Hello everyone,

I'm trying to create ribs structure from general surface,here is what i made.

At first I just wanted to make it simple...but then found lots of bugs to deal with...and finally mess things up.

I would like to make it capable of dealing with brep but fail(the offest problem is really annoying!), so end up with 2 cluster(mostly the same).

It's not fully tested...I really get enough all of these ...should works for most of time.

Hope it will be helpful(and actually works)for you.