diff --git a/doc/changelog.d/1345.documentation.md b/doc/changelog.d/1345.documentation.md new file mode 100644 index 0000000000..56cadd2708 --- /dev/null +++ b/doc/changelog.d/1345.documentation.md @@ -0,0 +1 @@ +Doc: change example default colors diff --git a/examples/gallery/05_pcb_stacker.py b/examples/gallery/05_pcb_stacker.py index c36dc8d13b..3114a8624b 100644 --- a/examples/gallery/05_pcb_stacker.py +++ b/examples/gallery/05_pcb_stacker.py @@ -64,7 +64,7 @@ import tempfile import ansys.meshing.prime as prime -from ansys.meshing.prime.graphics import PrimePlotter +from ansys.meshing.prime.graphics.plotter import ColorByType, PrimePlotter prime_client = prime.launch_prime() model = prime_client.model @@ -92,6 +92,7 @@ display = PrimePlotter() display.plot(model) +display.set_color_by_type(ColorByType.CONNECTIVITY) display.show() sizing_params = prime.GlobalSizingParams(model=model, min=0.5, max=1.0) @@ -170,6 +171,7 @@ display = PrimePlotter() display.plot(model, update=True) +display.set_color_by_type(ColorByType.CONNECTIVITY) display.show() ############################################################################### diff --git a/examples/gallery_beta/11_solder_ball.py b/examples/gallery_beta/11_solder_ball.py index 1cce386f54..365eed7a21 100644 --- a/examples/gallery_beta/11_solder_ball.py +++ b/examples/gallery_beta/11_solder_ball.py @@ -71,7 +71,7 @@ import tempfile import ansys.meshing.prime as prime -from ansys.meshing.prime.graphics import PrimePlotter +from ansys.meshing.prime.graphics.plotter import ColorByType, PrimePlotter ############################################################################### # Launch Ansys Prime Server @@ -124,6 +124,7 @@ display.plot( model, scope=prime.ScopeDefinition(model=model, label_expression="solder_cyl*,pad*,layer*") ) +display.set_color_by_type(ColorByType.CONNECTIVITY) display.show() ############################################################################### @@ -168,6 +169,7 @@ display = PrimePlotter() display.plot(model, update=True) +display.set_color_by_type(ColorByType.CONNECTIVITY) display.show() ###############################################################################