I don’t know if this is possible with KiCad (I couldn’t find an option) so I wrote a Python program to do it. It is handy to do stuff like this (setting aside for now whether an oval shape is appropriate for MOSFETs or not!):
Hello,
They are polylines, since I could not find a way to combine arcs and lines into a single shape.
The degrees between points is configurable in the Python code, for finer granularity on the curve.
The value to change is called degrees_per_step in the code, I set it to 15 degrees since that looks almost curved on a component the size of a MOSFET etc., but for a much larger shape, maybe it would be good to change that value to (say) 5 degrees.
Essentially, the program is drawing one polyline, that is composed of the top and bottom horizontal lines, plus all the finer lines that make the curve, at either one end (for a half oval), or at both ends for the full oval.
Edit: @shabaz It was by no means my intention to criticize your method. My only intention was to make an amendment with an alternative method, so others who search this forum later can decide for themselves which method is best for their situation.
The oval and half-oval are slightly different, in that there is a straight length at the top and bottom (disconnected at the left side for the so-called “half-oval”, and connected with another symmetrical shape at the other end. I couldn’t see how to achieve that with the semi-circle primitive.
Oh, no offence taken. I appreciated the comments.
I didn’t realize it was possible to have the fill and no border. That’s actually a much better solution, since then the user can just draw the straight lines at just the top and bottom of the rectangular shape.
Edit: Confirmed that your method works well. The screenshot below shows the method you mention for the top two shapes, and the Python line segments method at the bottom.
I was a bit curious about the hollow arc in the 4001, so I also took it apart in the symbol editor. It is a polygon without border, and some “guessed” points along the arc. The arc makes the end nice and smooth, while the jagged polygon edge is covered by the width of the line from the arc.
A polygon or the line function can be used, in the Symbol Editor only, to create a filled segment.
A line consisting of two or more sections will fill using the Right Mouse Button then select Properties. See the top two illustrations. Two independent but connected lines will not work.
To create arcs: Draw an Arc between two points. (green arrows).
Close Arc function.
Left click highlight that arc (which will then show the radius point; red arrow).
Place cursor on radius point.
Left mouse button hold down to change radius.
To avoid the “guessed” points, draw the arc and the top & bottom lines first, then draw a multipart line (with no border) on a finer grid over the top of the border lines and arc.
If any reader, especially new to Kicad people, are unsure how a symbol or footprint is created, just open a suitable example in either the Footprint or Symbol Editor and pull the item apart to see how it was constructed. When you have finished exploring the item, close the Editor.
Permanent harm cannot occur to Kicad library items as they are “Read only”.
The comment was for all those people who avoid the Footprint and Symbol Editors because they think they are too hard and time consuming.
First drawing an arc and then placing a series of joined lines over the top of that arc requires little guesswork or brain power; as both you and I know.
It would make drawing easier if the intersection snapping code of kicad nightly in PCB editor could be ported to the symbol and footprint editors. Or allow copy pasting form pcb editor into symbol editor with some layer logic.