Skip to content

Add 'angle' argument when creating ground for primitives circuit. #1275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pyaedt/modeler/PrimitivesCircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,15 @@ def create_page_port(self, name, location=[], angle=0):
return self.components[id]

@pyaedt_function_handler()
def create_gnd(self, location=[]):
def create_gnd(self, location=[], angle=0):
"""Create a ground.

Parameters
----------
location : list, optional
Position on the X and Y axis. The default is ``None``.
angle : optional
Angle rotation in degrees. The default is ``0``.

Returns
-------
Expand All @@ -313,7 +315,7 @@ def create_gnd(self, location=[]):

name = self.oeditor.CreateGround(
["NAME:GroundProps", "Id:=", id],
["NAME:Attributes", "Page:=", 1, "X:=", xpos, "Y:=", ypos, "Angle:=", 0, "Flip:=", False],
["NAME:Attributes", "Page:=", 1, "X:=", xpos, "Y:=", ypos, "Angle:=", angle, "Flip:=", False],
)
id = int(name.split(";")[1])
self.add_id_to_component(id)
Expand Down