SoilFoundationPlotter(structure_info: Optional[dict] = None, soil_info: Optional[dict] = None, foundation_info: Optional[dict] = None, pile_info: Optional[dict] = None, info_file: Optional[str] = None, server_name: str = 'soil_foundation_plotter', port: int = 8080, title: str = 'Soil/Foundation Plotter')
Browser-based GUI for fast visualization of soil layers, foundation blocks,
and piles using PyVista + trame. Based on reliable patterns from test.py.
Attributes
_actual_soil
instance-attribute
_actual_pile
instance-attribute
_actual_foundation
instance-attribute
_actual_foundation = None
_scalars
instance-attribute
_scalars = ['Mesh', 'Core', 'Region', 'ElementTag', 'MaterialTag']
_discretized_exists
instance-attribute
_discretized_exists = False
_axes_actor
instance-attribute
_grid_actor
instance-attribute
_mesh_file
instance-attribute
plotter
instance-attribute
plotter = Plotter(off_screen=True, notebook=False, window_size=(1000, 700))
objects
instance-attribute
state_defaults
instance-attribute
state_defaults = {'show_soil': True, 'soil_opacity': 0.35, 'show_foundation': True, 'foundation_opacity': 0.55, 'show_piles': True, 'piles_opacity': 1.0, 'show_mesh': bool(mesh_file), 'mesh_opacity': 1.0, 'discretized': _discretized_exists, 'show_axes': False, 'show_grid': False, 'selected_scalar': 'Mesh'}
Methods:
_setup_server
_setup_server(server_name: str)
Setup the trame server and UI
quick_plot
Fast scene build: soil/foundation as boxes, piles as cylinders.
_add_soil_layers
Add soil layers to the scene
_add_foundation_blocks
Add foundation blocks to the scene
_add_piles
Add piles to the scene (supports single and grid definitions)
_add_pile_grid
_add_pile_grid(pile, pidx)
_add_single_pile
_add_single_pile(pile, pidx)
_add_mesh_file
Add mesh file to the scene
clear_all
Clear all objects from the plotter
reset_camera
Reset the camera to default position
_apply_visibility
Apply visibility settings based on current state
_apply_opacity
Apply opacity settings based on current state
_load_infos
_load_infos(structure_info: Optional[dict], soil_info: Optional[dict], foundation_info: Optional[dict], pile_info: Optional[dict], info_file: Optional[str])
Load configuration from file or use provided dicts
get_object_list
Get a list of all objects in the scene
get_object_info
Get information about a specific object
remove_object
Remove a specific object by name
actual_plot
Build and render the actual meshes returned by the model builder.
_compute_actual_meshes
Compute the actual meshes using the model builder.
_check_discretized_exists
_check_discretized_exists() -> bool
Check if meshes are cached in memory (no disk).
_save_discretized
_save_discretized(pile_mesh, foundation_mesh, soil_mesh)
No-op: we keep meshes in memory only based on user request.
_load_discretized
Return already-cached meshes from memory.
discretize_and_save
One-time discretization: compute and cache in memory, then disable the button forever.