Page MenuHome

GP: Draw Mode: Add Arc Primitive
ClosedPublic

Authored by Charlie Jolly (charlie) on Mon, Dec 3, 3:56 PM.

Details

Summary

This adds an elliptical arc primitive.
Press CKEY for toggling closed/open arc.
Press FKEY key for flipping arc.

Additional changes to gpencil primitives.
Increases default edges of circle to 64.
Keymap changes to allow primitives to be drawn with Shift or Alt key.
Allow Plus/Minus key to adjust number of edges.

Missing: Toolbar icon

Diff Detail

Repository
rB Blender

Event Timeline

@Charlie Jolly (charlie) I like the additions you are doing, maybe add arrows would be great... and text will be awesome too.

About this primitive, I only noticed a small bug.... when you use the wheel mouse to increase/decrease the segments, the arc flip... try to draw an arc, press flip and then use wheelmouse.

As soon as you solve this small bug, we can commit.

Also, we need a new icon. @William Reynish (billrey) can you provide it?

I am testing the patch and it looks very good. Thank you.
I do not know if you know MyPaint and Lines and Curves tool (or continuous lines and curves tool). I am missing here the possibility of changing the position and curvature of the curve, as Shift key works in MyPaint. I'm not sure if I can put the link here, but MyPaint wiki explains it well. Perhaps those modifications are planned to do it in Edit or Sculpt mode with GP, and not while curve is drawn? It would be nice to be able to modify these things of the curve while you draw in Draw mode, but anyway it looks good as it is now.

@YAFU (YAFU)
I checked the MyPaint curve tool and I see what you mean, That's a bezier curve which remains active after creation. This is an arc which is a different sort of curve.

@Antonio Vazquez (antoniov)
I'll check on the bug. I swapped C and F around and still get the same issue with flip.!? Puzzling.
Also, what do you think different types of curve, I could add bezier but should it be an option or a separate curve tool?

@Charlie Jolly (charlie) About Bezier curves, I think is good idea add this feature but not now.

Adding Beziers need to make an analysis of the tools we want, how manage all details/workflow and how define the UI, so I think this is too much to do in the beta period. Now, the priority is to get a "bug free" version.

I think @Matias Mendiola (mendio) and @Daniel Lara (Pepeland) (pepeland) can add their thoughts about this too, but a good idea could be to start with a design document to discuss with all team members.

Charlie Jolly. Oh, I can see. Sorry for the misunderstanding and thanks to all of you.

Charlie Jolly. Oh, I can see. Sorry for the misunderstanding and thanks to all of you.

I am testing the patch and it looks very good. Thank you.
I do not know if you know MyPaint and Lines and Curves tool (or continuous lines and curves tool). I am missing here the possibility of changing the position and curvature of the curve, as Shift key works in MyPaint. I'm not sure if I can put the link here, but MyPaint wiki explains it well. Perhaps those modifications are planned to do it in Edit or Sculpt mode with GP, and not while curve is drawn? It would be nice to be able to modify these things of the curve while you draw in Draw mode, but anyway it looks good as it is now.

Yes, I love this maypaint feature, in fact are in my wish list and I have some ideas to improve this but as Antonio said is too much for beta stage, need a good desing and testing.

Daniel

Daniel. Great! Good to know. Thank you.

Fix issue with flip and wheelmouse.

Only one concern... not sure if we must wait for the new icon before commit the new feature.

@William Reynish (billreynish) what do you think about Icon?

This revision is now accepted and ready to land.Mon, Dec 3, 6:55 PM

@Antonio Vazquez (antoniov) Sure, icon is not a problem. You can commit without icon and we can then add that after the fact, I can make it tomorrow - it's trivial to do.

@Charlie Jolly (charlie) You can commit, icon will be added later.

This revision was automatically updated to reflect the committed changes.

I found some jitter effect in the arcs

They’re drawn in the same way as the circle, as a series of points. It might be a limitation of the way gp strokes are drawn. I’ll investigate.

The Arc icon has been added. It's in the SVN.

@William Reynish (billreynish) thank you, assuming I just add it as a commit

@Daniel Lara (Pepeland) (pepeland) it's a precision issue as the shape is drawn in screenspace. I'll try and fix both the curve and circle.

@Daniel Lara (Pepeland) (pepeland) it's a precision issue as the shape is drawn in screenspace. I'll try and fix both the curve and circle.

@Charlie Jolly (charlie) Maybe this is related. When you use the Simplify fixed operator (4 step in the image) on circles and arcs, the result shows that the way primitives are built is not symmetrical or consistent

See D4030 for proposed fix to precision issue.

@Matias Mendiola (mendio) I think that might be an issue with the simplify operator

@Matias Mendiola (mendio) I think that might be an issue with the simplify operator

Ok, I see, so it's another task.
Could you take a look at this @Antonio Vazquez (antoniov) ?

About simplify, I need to know what mode you used, fixed? if you used fixed, the stroke points are removed alternated points and keep extremes, so maybe the final result is not perfect, really this algorithm is not done to simplify arcs.

yes, I used simplify fixed

Charlie Jolly. Oh, I can see. Sorry for the misunderstanding and thanks to all of you.

I am testing the patch and it looks very good. Thank you.
I do not know if you know MyPaint and Lines and Curves tool (or continuous lines and curves tool). I am missing here the possibility of changing the position and curvature of the curve, as Shift key works in MyPaint. I'm not sure if I can put the link here, but MyPaint wiki explains it well. Perhaps those modifications are planned to do it in Edit or Sculpt mode with GP, and not while curve is drawn? It would be nice to be able to modify these things of the curve while you draw in Draw mode, but anyway it looks good as it is now.

Yes, I love this maypaint feature, in fact are in my wish list and I have some ideas to improve this but as Antonio said is too much for beta stage, need a good desing and testing.

Daniel

FYI I've created a Bezier tool, see here for further discussion: T58777