8000 The extras can't work in Bspline · Issue #147 · orbingol/NURBS-Python · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
The extras can't work in Bspline #147
Open
@Im-fengyin

Description

@Im-fengyin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThere is a problem with the code or documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0