For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

BRepOffsetAPI_ThruSections fails to generate surface

Joao Henriques's picture
Forums: 

I build two parametric periodic Bsplines in a conical surface and I create the corresponding
wire in the 3D space. When I use BRepOffsetAPI_ThruSections the ruled surface is not create.
Any ideias.
The code is the following:

Handle(TColgp_HArray1OfPnt2d) hub1 = new TColgp_HArray1OfPnt2d( 1, 200 );
Handle(TColgp_HArray1OfPnt2d) shroud1 = new TColgp_HArray1OfPnt2d( 1, 200 );

for( uint i = 0; i {
hub1->SetValue( i+1, gp_Pnt2d( hparam[i][0], hparam[i][1] ) );
shroud1->SetValue( i+1, gp_Pnt2d( sparam[i][0], sparam[i][1] ) );
}

Geom2dAPI_Interpolate hub1_spl(hub1, Standard_True, 0.000001);
hub1_spl.Perform();
Handle(Geom2d_BSplineCurve) C1H = hub1_spl.Curve();

Geom2dAPI_Interpolate shroud1_spl(shroud1, Standard_True, 0.000001);
shroud1_spl.Perform();
Handle(Geom2d_BSplineCurve) C1S = shroud1_spl.Curve();

const gp_Pnt ZH1( 0.0, 0.0, 561.0 );
const gp_Pnt ZH2( 0.0, 0.0, 960.0 );
const Standard_Real RH1 = 213.0;
const Standard_Real RH2 = 115.5;

Handle(Geom_ConicalSurface) HConeSurf = GC_MakeConicalSurface( ZH1, ZH2, RH1, RH2 ).Value();
TopoDS_Edge E1H = BRepBuilderAPI_MakeEdge( C1H, HConeSurf );
BRepLib::BuildCurve3d( E1H );
TopoDS_Wire W1H = BRepBuilderAPI_MakeWire( E1H );

const gp_Pnt ZS1( 0.0, 0.0, 561.0 );
const gp_Pnt ZS2( 0.0, 0.0, 960.0 );
const Standard_Real RS1 = 213.0*1.1;
const Standard_Real RS2 = 115.5*1.1;

Handle(Geom_ConicalSurface) SConeSurf = GC_MakeConicalSurface( ZS1, ZS2, RS1, RS2 ).Value();
TopoDS_Edge E1S = BRepBuilderAPI_MakeEdge( C1S, SConeSurf );
BRepLib::BuildCurve3d( E1S );
TopoDS_Wire W1S = BRepBuilderAPI_MakeWire( E1S );

BRepOffsetAPI_ThruSections generator( Standard_True, Standard_False );
generator.AddWire(W1H);
generator.AddWire(W1S);
generator.Build();
generator.Shape();