1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0031631: Modeling Algorithms - Invalid result of Pipe builder

Added the ability to operate the algorithm with different types of curves.
This commit is contained in:
abulyche
2021-09-16 09:29:49 +03:00
parent 812ee2c9be
commit 296dbe8cc8
3 changed files with 63 additions and 8 deletions

View File

@@ -207,6 +207,20 @@ static Standard_Integer tuyau (Draw_Interpretor& di,
Pipe.Init(path, firstS, lastS);
}
else {
if (narg == 6 && !Option_NS && Draw::Atof(a[5]) != 0)
{
Handle(Geom_Curve) lastS = DrawTrSurf::GetCurve(a[isect + 1]);
Cont = GeomAbs_C2;
Pipe = GeomFill_Pipe(path, firstS, lastS, Draw::Atof(a[5]));
Pipe.Perform(Standard_True);
Handle(Geom_Surface) aSurface;
if (Pipe.IsDone())
{
aSurface = Pipe.Surface();
}
DrawTrSurf::Set(a[1], aSurface);
return 0;
}
// tuyau a N sections, N>=2
TColGeom_SequenceOfCurve Seq;
Seq.Clear();
@@ -399,12 +413,12 @@ void GeometryTest::SurfaceCommands(Draw_Interpretor& theCommands)
theCommands.Add("tuyau",
"tuyau [-NS] result Path Curve/Radius [Curve2] [Curve3] ... \n the option -NS is used only with 2 sections.\n With it, <result> is going from the first section to the last section \n Without, <result> is a pipe by evolutive section ",
"tuyau [-NS] result Path Curve/Radius [Curve2] [Curve3] ... [Radius]\n the option -NS is used only with 2 sections.\n With it, <result> is going from the first section to the last section \n Without, <result> is a pipe by evolutive section ",
__FILE__,
tuyau,g);
theCommands.Add("partuyau",
"tuyau result Path Curve/Radius [Curve2]\n the parametrization of the surface in the V direction will be as the Path",
"tuyau result Path Curve/Radius [Curve2] [Radius]\n the parametrization of the surface in the V direction will be as the Path",
__FILE__,
tuyau,g);