Replies: 1 comment 3 replies
-
Hello Once we have modified the region , we need to use set_region method to visualise the changes in Motor-CAD. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to create my own geometries in MotorCAD. The geometries consist of lines and arcs. So far I have only worked with Maxwell. Is this also possible in MotorCAD?
I have found some information in the documentation, but my code does not produce any usable output. Can you help me?
`
import ansys.motorcad.core as pymotorcad
from ansys.motorcad.core.geometry import Arc, Coordinate, Line, rt_to_xy
if "QT_API" in os.environ:
os.environ["QT_API"] = "pyqt"
if pymotorcad.is_running_in_internal_scripting():
# Use existing Motor-CAD instance if possible
mc = pymotorcad.MotorCAD(open_new_instance=False)
else:
mc = pymotorcad.MotorCAD(keep_instance_open=True)
# Disable popup messages
mc.set_variable("MessageDisplayState", 2)
if not "PYMOTORCAD_DOCS_BUILD" in os.environ:
mc.set_visible(True)
`
Beta Was this translation helpful? Give feedback.
All reactions