NURBS-Python icon indicating copy to clipboard operation
NURBS-Python copied to clipboard

The extras can't work in Bspline

Open Im-fengyin opened this issue 2 years ago • 0 comments

Describe the bug Load a bspline json file and set a set of points on it, render it using extras param. Only the spline surface is ploted.

To Reproduce surf = exchange.import_json(spline_path)[0] plot_lines = [] m,n,_ = toolPath.shape eval_uv = toolPath.reshape(-1,2) toolPts = surf.evaluate_list(eval_uv.tolist()) toolPts = np.array(toolPts).reshape(m,n,3) for x in range(m): pts = toolPts[x,:,:].tolist() line = dict(color='red',name='u-line',size=10,points=pts) plot_lines.append(line) for y in range(n): pts = toolPts[:,y,:].tolist() line = dict(color='blue',name='v-line',size=10,points=pts) plot_lines.append(line) surf.delta = 0.01 surf.evaluate()

Plot the control point grid and the evaluated surface

vis_comp = vis.VisSurface() surf.vis = vis_comp surf.render(extras=plot_lines)

toolPath is numpy array with size m,n,2 I have check the pts value correctly. But I can't see the lines in rander window.

Configuration: win10,python3.8

Im-fengyin avatar Mar 31 '22 05:03 Im-fengyin