mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 14:10:34 +05:00
Fix DrawGeo (requires webgui_jupyter_widgets update)
This commit is contained in:
parent
afa018049b
commit
9cd3c4ff14
@ -20,11 +20,11 @@ class WebGLScene(BaseWebGuiScene):
|
|||||||
d = self.mesh._webgui_data()
|
d = self.mesh._webgui_data()
|
||||||
bp = d['Bezier_trig_points']
|
bp = d['Bezier_trig_points']
|
||||||
for i in range(len(bp)):
|
for i in range(len(bp)):
|
||||||
bp[i] = encodeData(np.array(bp[i]))
|
bp[i] = encodeData(np.array(bp[i], dtype=np.float32))
|
||||||
|
|
||||||
ep = d['edges']
|
ep = d['edges']
|
||||||
for i in range(len(ep)):
|
for i in range(len(ep)):
|
||||||
ep[i] = encodeData(np.array(ep[i]))
|
ep[i] = encodeData(np.array(ep[i], dtype=np.float32))
|
||||||
|
|
||||||
if self.clipping is not None:
|
if self.clipping is not None:
|
||||||
d['clipping'] = True
|
d['clipping'] = True
|
||||||
@ -144,7 +144,7 @@ def BuildRenderData(mesh, func, order=2, draw_surf=True, draw_vol=True, deformat
|
|||||||
|
|
||||||
timer2list.Start()
|
timer2list.Start()
|
||||||
for i in range(og+1):
|
for i in range(og+1):
|
||||||
Bezier_points.append(encodeData(BezierPnts[i]))
|
Bezier_points.append(encodeData(BezierPnts[i], dtype=np.float32))
|
||||||
timer2list.Stop()
|
timer2list.Stop()
|
||||||
|
|
||||||
d['Bezier_points'] = Bezier_points
|
d['Bezier_points'] = Bezier_points
|
||||||
@ -160,7 +160,7 @@ def BuildRenderData(mesh, func, order=2, draw_surf=True, draw_vol=True, deformat
|
|||||||
edge_data = np.tensordot(iBvals.NumPy(), pmat, axes=(1,1))
|
edge_data = np.tensordot(iBvals.NumPy(), pmat, axes=(1,1))
|
||||||
edges = []
|
edges = []
|
||||||
for i in range(og+1):
|
for i in range(og+1):
|
||||||
edges.append(encodeData(edge_data[i]))
|
edges.append(encodeData(edge_data[i], dtype=np.float32))
|
||||||
d['edges'] = edges
|
d['edges'] = edges
|
||||||
|
|
||||||
ndtrig = int((og+1)*(og+2)/2)
|
ndtrig = int((og+1)*(og+2)/2)
|
||||||
@ -215,7 +215,7 @@ def BuildRenderData(mesh, func, order=2, draw_surf=True, draw_vol=True, deformat
|
|||||||
BezierPnts = np.tensordot(iBvals_trig.NumPy(), pmat, axes=(1,1))
|
BezierPnts = np.tensordot(iBvals_trig.NumPy(), pmat, axes=(1,1))
|
||||||
|
|
||||||
for i in range(ndtrig):
|
for i in range(ndtrig):
|
||||||
Bezier_points.append(encodeData(BezierPnts[i]))
|
Bezier_points.append(encodeData(BezierPnts[i], dtype=np.float32))
|
||||||
|
|
||||||
|
|
||||||
d['Bezier_trig_points'] = Bezier_points
|
d['Bezier_trig_points'] = Bezier_points
|
||||||
|
Loading…
Reference in New Issue
Block a user