|
40 | 40 | from typing import List, Union |
41 | 41 |
|
42 | 42 | from ansys.geometry.core import launch_modeler |
43 | | -from ansys.geometry.core.connection import GEOMETRY_SERVICE_DOCKER_IMAGE, GeometryContainers |
| 43 | +from ansys.geometry.core.connection import GeometryContainers |
| 44 | +import ansys.geometry.core.connection.defaults as pygeom_defaults |
44 | 45 | from ansys.geometry.core.math import Plane, Point2D, Point3D |
45 | 46 | from ansys.geometry.core.plotting import GeometryPlotter |
46 | 47 | from ansys.geometry.core.sketch import Sketch |
|
54 | 55 | # If you are running this script outside of a workflow, you can ignore this section. |
55 | 56 | # |
56 | 57 | image = None |
| 58 | +transport_mode = None |
57 | 59 | if "ANSYS_GEOMETRY_RELEASE" in os.environ: |
58 | 60 | image_tag = os.environ["ANSYS_GEOMETRY_RELEASE"] |
59 | 61 | for geom_services in GeometryContainers: |
60 | | - if image_tag == f"{GEOMETRY_SERVICE_DOCKER_IMAGE}:{geom_services.value[2]}": |
| 62 | + if image_tag == f"{pygeom_defaults.GEOMETRY_SERVICE_DOCKER_IMAGE}:{geom_services.value[2]}": |
61 | 63 | print(f"Using {image_tag} image") |
62 | 64 | image = geom_services |
| 65 | + transport_mode = "insecure" |
63 | 66 | break |
64 | 67 |
|
65 | 68 | # sphinx_gallery_start_ignore |
@@ -236,7 +239,7 @@ def naca_airfoil_4digits(number: Union[int, str], n_points: int = 200) -> List[P |
236 | 239 | # |
237 | 240 |
|
238 | 241 | # Instantiate the modeler |
239 | | -modeler = launch_modeler(image=image) |
| 242 | +modeler = launch_modeler(image=image, transport_mode=transport_mode) |
240 | 243 | print(modeler) |
241 | 244 |
|
242 | 245 | ############################################################################### |
|
0 commit comments