Hi,
I have the same problem. I solve a part of this problem giving a law and a face. With the face and the evolution law, the MakePipeShell create the pipe with the last face parallel to the start face and this is a problem for me, I want the last face perpendicular to the path.
Here under some code I've made (Win2000 / MFC). I hope it will help you.
Regards
Commenter-1.
/// Generate a shell having base section wbase along curve along
/// k is the parameter value at the end of the curve
//--------------------------------------------------------------------------------
TopoDS_Shape MyPipe( const TopoDS_Wire &wbase, const TopoDS_Wire &along, const double k )
{
ASSERT( ! along.IsNull() && ! wbase.IsNull() );
/// Calculate the length of the path
//----------------------------------
GProp_GProps lp;
BRepGProp::LinearProperties( along, lp );
double length( lp.Mass() );
/// Prepare the shell
//-------------------BRepOffsetAPI_MakePipeShell ps( along );
/// Create a linear law
//---------------------
Handle( Law_Linear ) ll = new Law_Linear;
ll->Set( 0.0, 1.0, length, k );
/// Create the section center point
//---------------------------------
//BRepBuilderAPI_MakeVertex MV( gp::Origin() );
/// Get the first and last point of the path
//------------------------------------------
TopoDS_Vertex pfirst, plast;
TopExp::Vertices( along, pfirst, plast );
/// Update the law parameters
//---------------------------
ps.SetLaw( wbase, ll, pfirst, Standard_False, Standard_False );
ps.Build();
return( ps.Shape() );
};