Is it possible to produce an arc shape with given start and sweep angle? (Using Sketch 3.0 by bohemian.coding)
7 Answers
Thanks for your response; your solution is a considerable alternative to the one i've figured out. (subtract>scissors>rotate)
(Note: By half covering the circle by the rect you can also create an 180 deg circle.)
-
5For anyone confused on how to begin with this, like I was: Draw a circle. Draw a rectangle that overlaps the circle as shown in CodeMound's screenshot. Select both shapes. Click Subtract. You'll get a circle with a "twist" in it. Now go to the Scissors tool and click the straight lines that make up the "twist" to remove them.– stoneFeb 22, 2015 at 3:36
-
I don't understand. I get a circle with a square missing in the upper-right quadrant. dropbox.com/s/pv0u8lmg6z94ubh/…– chovyFeb 20, 2016 at 6:09
-
@chovy I had the same problem. Once you subtract the square, get the scissors and remove the remaining corners of the subtracted square, then add border to the resulted shape and the result will be of the answer above. Sep 29, 2016 at 17:09
Just updated this: brand new Segmented Circle 2.0 Sketch plugin.
Automatically create precise segmented circular graphics for diagrams, instrumentation and analytics. Huge update adds multi value pie chart styles, tick mark circles and perfectly dashed arcs.
You could fake it by using the Layer > Vector > Rotate Copies. Simply choose a rectangle shape and then create any number of copies. The more copies you create, the smoother the arc will be.
You can also create Two Circles, subtract them, and then subtract a rectangle in half:
Finally, you could draw it with the pen tool (though you'd lose some accuracy in the process.
Unfortunately, you won't be able to adjust the angle or the sweep. But if you manipulate shapes on top of shapes and use the Pathfinder or Transform tools, you should be able to achieve your desired effect.
-
1As much as I understand this method and have used it, it is extremely contrived for any angles which are not 90, 180 or 270. Jul 2, 2014 at 7:07
There is now a great sketch plugin for this:
"Create circles as areas or lines with a custom number of points/segments" https://github.com/design4use/gb-sketch-segmentcircle
There is even a better solution :-) First draw the circle then select the path and click open path in the inspector.
-
It's not that much better than the other answers, and it doesn't work well for angles other than 90º / 180º / 270º– LucianoJun 27, 2016 at 13:22
-
You can get around the 180, 270, etc by adding a new point into the path and then deleting the outside one. As long as you use the center position for the outline, things work pretty well. Oct 12, 2016 at 15:22
Another way is to draw a circle, double click on it to edit it (there will be 4 little dots equally spread over the circle), and click where you wish to end the shape so you have another small dot appearing there. Use the scissors to remove any unwanted part, the part to remove will change its shape when you mouse over it. You can finish you arc shape with different ending such as rounded, this is done in the border section, click on the related COG to show this section.
While you can fake an arc in Sketch, it does not appear to be possible to make an actual "arc" as described by the svg standards: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Arcs
This is because the vector tool does exclusively Bezier curves (https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths#Bezier_Curves) or straight lines from both sides of a vector.
If you ever feel the need to be able to make an arc for real, it may be best to just write your svg code by hand. I've had to do it more than a few times.