sweeping a face along a wire

Is there any option that when a face is sweeping along a wire, the normal of the face can either 1) follow the the tangent of the wire or 2) follow the original face normal? Please see the attached picture.



Cauchy Ding's picture

Hi Sean,
Using sweep API, the default is the case 1. The local coordinate system changes according to the position in the sweep path.
To realize case 2, you have to use BRepOffsetAPI_MakePipeShell and define fixed local coordinate system.
gp_Ax2 ax2(gp_Pnt(0,0,0), gp_Dir(0,0,1), gp_Dir(1,0,0));
BRepOffsetAPI_MakePipeShell pipeShell(wire);
pipeShell.SetMode (ax2);
pipeShell.Add(profileShape, withContact, withCorrection);
resultShape = pipeShell.Shape();
However, you can't use the face as the profile shape directly, you can use the outer wire from the face to generate a shell, and finally stitch it with raw face.


seanliu's picture

Hi Ding:
It works. Thanks.
I have another question related to BRepOffsetAPI_MakePipeShell.
What's the steps I should do for BRepOffsetAPI_MakePipeShell so that I can have the same result by using BRepOffsetAPI_MakePipe (follow the the tangent of the wire)?