Skip to content

Commit

Permalink
clean create_reion method
Browse files Browse the repository at this point in the history
  • Loading branch information
gmalinve committed Oct 23, 2023
1 parent 54efbab commit d748921
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pyaedt/modeler/cad/Primitives2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit d748921

Please sign in to comment.