Splines in pythonOCC
Question: This question is about how to use splines in general in pythonOCC, There are
two part to this question.

Have found out that I can create a spline by

    
    
    array = []
    array.append(gp_Pnt2d (0,0))
    array.append(gp_Pnt2d (1,2))
    array.append(gp_Pnt2d (2,3))
    array.append(gp_Pnt2d (4,3))
    array.append(gp_Pnt2d (5,5))
    
    pt2d_list = point2d_list_to_TColgp_Array1OfPnt2d(array)
    SPL1      = Geom2dAPI_PointsToBSpline(pt2d_list).Curve()
    display.DisplayShape(make_edge2d(SPL1) , update=True)
    

And I expect that the bspline can be calculated by

    
    
    BSPL1      = Geom2dAPI_PointsToBSpline(pt2d_list)
    

But how do I get:

  1. The derivative of the bspline?
  2. The knots of the bspline?
  3. Is the knots the pt2d_list?
  4. The control points of the bspline?
  5. The coefficients of the spline?

And how do i remove or add knots to the bspline?

When loading a CAD drawing .stp file in pythonOCC like this:

    
    
    from OCC import TopoDS, StlAPI
    shape = TopoDS.TopoDS_Shape()
    stl_reader = StlAPI.StlAPI_Reader()
    stl_reader.Read(shape,str(filename))
    display.DisplayShape(shape)
    

How do I get the data out of the shape like knot, bspline, and coefficients.

best regards,


Answer: I would take a look at [scipy documentation](http://docs.scipy.org/doc/) and
search there for the the functions you are trying to apply.

