Skip to content

Commit f13ebf9

Browse files
authored
Merge pull request #142 from ToFuProject/Issue141_SampleMesh3d
[#141] Better debugging of sample3d func
2 parents 2565571 + 6d7983c commit f13ebf9

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

bsplines2d/_class01_sample3d.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,11 @@ def func(
370370
if debug is True:
371371

372372
# coordinates
373-
rr, zz, pp, dV = func_RZphi_from_ind(ind)
373+
rr, zz, pp, dV = func_RZphi_from_ind(
374+
indr=ind[0, :],
375+
indz=ind[1, :],
376+
indphi=ind[2, :],
377+
)
374378

375379
# title
376380
tit = (
@@ -425,8 +429,12 @@ def func(
425429
ax1.fill(phor0, phor1, fc=(0.5, 0.5, 0.5, 0.5))
426430

427431
# points
428-
ax0.plot(rr, zz, '.')
429-
ax1.plot(rr*np.cos(pp), rr*np.sin(pp), '.')
432+
if rr.size == 0:
433+
msg = f"\n\t- ind.size = {ind.size}\n\t- rr.size = rr.size\n"
434+
print(msg)
435+
else:
436+
ax0.plot(rr, zz, '.')
437+
ax1.plot(rr*np.cos(pp), rr*np.sin(pp), '.')
430438

431439
return ind[0, :], ind[1, :], ind[2, :]
432440

0 commit comments

Comments
 (0)