compas icon indicating copy to clipboard operation
compas copied to clipboard

unify meshplotter within geometryplotter (artist) framework

Open tkmmark opened this issue 3 years ago • 4 comments

Designers often need to simultaneously visualise stand-alone geometries with COMPAS datastructures like Meshes or Networks (e.g. seeing the results of trimesh_pull_points). Would be great to bring the older plotter setup under the newer geometry artist framework, so that the workflow for developers can be simplified into something closer to...

plotter = GeometryPlotter() plotter.add(mesh) plotter.add(lines) plotter.show()

tkmmark avatar Nov 10 '20 15:11 tkmmark

As a quick fix, even some mesh_plot_instance.to_geometry_artists() would be helpful.

tkmmark avatar Nov 10 '20 15:11 tkmmark

it is indeed the goal to allow all types of COMPAS objects to be added to plots in the style supported by the geometry plotter. in the meantime, can you not use the methods draw_points, draw_lines, draw_... of the MeshPlotter?

tomvanmele avatar Nov 10 '20 17:11 tomvanmele

yes, I can, which brings me to a suggestion I have forgotten to include in my last comment: "'it would also be helpful, as a quick interim fix, to introduce some methods like geom_artist.to_plotter_dict()"

tkmmark avatar Nov 10 '20 17:11 tkmmark

The preference for geometry plotter is due to its ability to handle styles in a model-scale-invariant way... (see figure) image top row: mesh plotter bottom row: geom plotter left col: scale factor 1 right col: scale factor 3

tkmmark avatar Nov 10 '20 17:11 tkmmark

@tomvanmele || @gonzalocasas bump

jf--- avatar Apr 22 '24 21:04 jf---

I think this should be closed, the plotters don't exist anymore

gonzalocasas avatar Apr 22 '24 22:04 gonzalocasas

re-open if i'm wrong though :)

gonzalocasas avatar Apr 22 '24 22:04 gonzalocasas