How to create solid circle ie. with surface ?
-
Hello,
I'm trying to make a circle as a solid 2D surface (ie. filled in) with the Python API using
s4l.model.CreateCircle(...)
But it's showing up as an empty ring (ie. a 1D line circle, no fill).
How can I fill it in so that it creates a solid circular surface (flat 2D, not like a 3D cylinder).
Thank you!
- Doug
-
Update: The intersection method didn't work:
Unable to assign '....' as a Waveguide Source in simulation 'EM'
- I'm not sure why it's trying to make it a waveguide (I intend to use Edge sources); but I'm assuming it's failing because of the curved geometry of the intersection with the arc of the circle... so... ideas? It would be perfect to connect the gaps in the circle with lines. I just need to be able to find the endpoints of each arc, to connect them.
-
This is the same behavior as in the GUI. To create a circular surface you can first create a circle loop, and then cover the loop. In python:
# create a circle loop circle = XCoreModeling.CreateCircle(Vec3(0, 0, 0), Vec3(0, 0, 1), 5.0) # cover the loop XCoreModeling.CoverWireBody(circle)
Note the
s4l_v1
api is a wrapper around the low-level API implemented in modules likeXCoreModeling
. We don't automatically add all functions tos4l_v1
. WhileCreateCircle
is wrapped/included ins4l_v1
, the functionCoverWireBody
is not (yet) wrapped. -