Curve generation from a data of points
Hello, I am conducting a simulation for shaft surfaces and I am not able to generate the surface curve of shaft using gmsh. I have a set of datapoints which will constitute a curve. I want to make a curve using gmsh by taking the minimum or the first point and the last or maximum point and make a line out of it. Also I want to make a curve from all the points using BsplineSurface from OCC. Can anyone help me with the problem I am facing. This is how the syntax looks in python occ
pts = TColgp_Array1OfPnt(1, np.size(data['x'], 0))
for i in np.arange(0, np.size(data['x'], 0)):pts.SetValue(int(i+1), gp_Pnt(data['x'][i], data['y'][i], 0))
bspl_builder = GeomAPI_PointsToBSpline(pts, 3, 8, GeomAbs_C2, 1e-6)
curve1 = bspl_builder.Curve()
knots_v = TColStd_Array1OfReal(1, curve1.LastUKnotIndex())
curve1.Knots(knots_v)
v_min = knots_v.Value(curve1.FirstUKnotIndex())
v_max = knots_v.Value(curve1.LastUKnotIndex())
edge185 = BRepBuilderAPI_MakeEdge(curve1, v_min, v_max)
p85 = curve1.LocalValue(v_max, curve1.LastUKnotIndex() - 1,curve1.LastUKnotIndex())
p1 = curve1.LocalValue(v_min, 1, 2)
When I try to access p85 and p1 through gmsh commands it gives me the error - "an integer is required (got type gp_Pnt)"
Edited by Sai Sumanth Moturu