In attachment there are two standard cylinders, I want to use one cylinder to trim another one, but failed. My method is firstly use BRepAlgo_Section to get intersection curves(here I got 7 intersection curves ), and I try to group some of them into a wire (the pcurve will be kept during making wire) and use BRepFeat_SplitShape to split the cylinder. I think that's typical trimming method for face trim face in OCC, but it's so hard to trim this simple case. I have used this method for a long time to do lots of trimming, but blocked by this simple case.
Currently, I have to use another stupid method to solve this, I create four planes to fill the top and bottom of the cylinder to make them as SOLID cylinder, and use Boolean Union operation to get what I want.
Why OCC doesn't provide APIs to trim face by face? How to trim the cylinder in this case?
Any suggestion is welcome, thanks in advance.