File indexing completed on 2026-04-10 07:50:27
0001
0002 from np.fold import Fold
0003 import os, numpy as np
0004
0005 try:
0006 import pyvista as pv
0007 except ImportError:
0008 pv = None
0009 pass
0010
0011 SIZE = np.array([1280, 720])
0012
0013 if __name__ == '__main__':
0014 f = Fold.Load("$FOLD/$SOLID", symbol="f")
0015 print(repr(f))
0016 title = os.environ.get("TITLE", "U4Mesh_test.sh")
0017
0018 if pv == None:
0019 print("SKIP plotting as no pyvista")
0020 else:
0021
0022 pd = pv.PolyData(f.vtx, f.tpd)
0023
0024 pl = pv.Plotter(window_size=SIZE*2)
0025 pl.add_text(title, position="upper_left")
0026 pl.add_mesh(pd, opacity=1.0, show_edges=True, lighting=True )
0027 pl.show()
0028 pass
0029 pass
0030
0031