Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The extras can't work in Bspline #147

Open
Im-fengyin opened this issue Mar 31, 2022 · 0 comments
Open

The extras can't work in Bspline #147

Im-fengyin opened this issue Mar 31, 2022 · 0 comments
Labels
bug There is a problem with the coding or algorithms

Comments

@Im-fengyin
Copy link

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 Im-fengyin added the bug There is a problem with the coding or algorithms label Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug There is a problem with the coding or algorithms
Projects
None yet
Development

No branches or pull requests

1 participant