pythonCascade Sample Problems
Geometry: Pipes

array1 = []
array1.append(gp_Pnt(-4,0,2 ))
array1.append(gp_Pnt(-5,1,0 ))
array1.append(gp_Pnt(-6,2,-2))
array1.append(gp_Pnt(-5,4,-7))
array1.append(gp_Pnt(-3,5,-12))
SPL1 =
GeomAPI_PointsToBSpline(array1).Curve()
aPipe =
GeomFill_Pipe(SPL1,1)
aPipe.Perform(0,0)
aSurface=
aPipe.Surface()
E =
GC_MakeEllipse( gp().XOY() ,3,1).Value()
aPipe2 =
GeomFill_Pipe(SPL1,E,GeomFill_IsCorrectedFrenet)
aPipe2.Perform(0,0)
aSurface2=
aPipe2.Surface()
aSurface2.Translate(gp_Vec(5,0,0))
TC1 =
GC_MakeSegment(gp_Pnt(1,1,1),gp_Pnt(5,5,5)).Value()
TC2 =
GC_MakeSegment(gp_Pnt(1,1,0),gp_Pnt(4,5,6)).Value()
aPipe3 =
GeomFill_Pipe(SPL1,TC1,TC2)
aPipe3.Perform(0,0)
aSurface3=
aPipe3.Surface()
aSurface3.Translate(gp_Vec(10,0,0))
self.DisplayCurve(SPL1,0,Quantity_NOC_RED)
self.DisplaySurface(aSurface,1,color = Quantity_NOC_YELLOW)
self.DisplaySurface(aSurface2,1,color = Quantity_NOC_YELLOW)
self.DisplaySurface(aSurface3,1,color = Quantity_NOC_YELLOW)