From d748921f9afc513bc03ad9d753c7821d215e139a Mon Sep 17 00:00:00 2001 From: Giulia Malinverno Date: Mon, 23 Oct 2023 11:45:44 +0200 Subject: [PATCH] clean create_reion method --- pyaedt/modeler/cad/Primitives2D.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pyaedt/modeler/cad/Primitives2D.py b/pyaedt/modeler/cad/Primitives2D.py index 9c6a05428d6..a3c39c618af 100644 --- a/pyaedt/modeler/cad/Primitives2D.py +++ b/pyaedt/modeler/cad/Primitives2D.py @@ -283,16 +283,10 @@ def create_region(self, pad_percent=300, is_percentage=True): >>> oEditor.CreateRegion """ if not isinstance(pad_percent, list): - if self._app.design_type == "2D Extractor" or self._app.xy_plane: + if self._app.design_type == "2D Extractor" or self._app.design_type == "Maxwell 2D": pad_percent = [pad_percent, pad_percent, 0, pad_percent, pad_percent, 0] - else: - pad_percent = [pad_percent, 0, pad_percent, pad_percent, 0, pad_percent] - else: - if self._app.design_type == "2D Extractor" or self._app.xy_plane: + if self._app.design_type == "2D Extractor" or self._app.design_type == "Maxwell 2D": pad_percent = [pad_percent[0], pad_percent[1], 0, pad_percent[2], pad_percent[3], 0] - else: - pad_percent = [pad_percent[0], 0, pad_percent[1], pad_percent[2], 0, pad_percent[3]] - return Primitives.create_region(self, pad_percent, is_percentage)