Hi,

I tried to find a bit of information about how to generate Sweep2 and didnt really solve the problem. I know it is a bit of a hassle working with Argument classes and that everything has to fit perfectly, but I hope you will be able to tell me why my Sweep2 Function doesn`t work, and if there is a quick fix…thanks!

```
bool Sweep2( ON_Curve* rail1, ON_Curve* rail2, ON_SimpleArray<ON_Curve*> sectioncrvs, ON_SimpleArray<ON_Brep*> brep_arr)
{
CArgsRhinoSweep2 args;
int i,j;
CRhinoPolyEdge edge1,edge2;
edge1.Create( rail1 );
edge2.Create( rail2 );
args.m_rail_curves[0] = &edge1;
args.m_rail_curves[1] = &edge2;
for( i = 0; i < sectioncrvs.Count(); i++ )
{
args.m_shape_curves.Append( const_cast<ON_Curve*>(sectioncrvs[i]));
//find the parameters
ON_3dPointArray respts1, respts2;
IntersectCurveCurve(sectioncrvs[i], rail1, respts1); //THIS IS MY FUNCTION THAT WORKS PROPERLY - I CHECKED
IntersectCurveCurve(sectioncrvs[i], rail2, respts2); //THIS IS MY FUNCTION THAT WORKS PROPERLY - I CHECKED
if(respts1.Count() >0 )
{
double t;
sectioncrvs[i]->GetClosestPoint( respts1[0], &t );
args.m_rail_params[0].Append( t );
}
if(respts2.Count() >0 )
{
double t;
sectioncrvs[i]->GetClosestPoint( respts2[0], &t );
args.m_rail_params[1].Append( t );
}
}
args.m_bClosed = false;
args.m_bSimpleSweep = true;
args.m_simplify = 0; // Simplify method for shape curves
args.m_rebuild_count = -1; // Sample point count for rebuilding shapes
args.m_refit_tolerance = 0.01;
args.m_sweep_tolerance =0.01;
args.m_angle_tolerance =0.01;// RhinoApp().ActiveDoc()->AngleToleranceRadians();
RhinoSweep2(args, brep_arr );
return true;
}
```