Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request : delete line intersection #14

Open
Ulf3000 opened this issue Feb 18, 2023 · 4 comments
Open

feature request : delete line intersection #14

Ulf3000 opened this issue Feb 18, 2023 · 4 comments

Comments

@Ulf3000
Copy link

Ulf3000 commented Feb 18, 2023

Hi your addon is really great. It helps alot for creating fills and silhuette/shapes in general.

i wanted to ask if your algorithms could recreate the intersection eraser from clip studio paint

2023-02-18.22-47-04.mp4

heres a demo video , its an eraser tool which can automatically detect intersections of lines and lets you erase just that section of the line with great ease and precision.

@chsh2
Copy link
Owner

chsh2 commented Feb 19, 2023

image

Blender has a cutter tool in Draw mode that has similar functionality to Clip Studio Paint's eraser.

I also tried to use a different method for this problem. In the new version (v0.3.3) there is a new operator "Pinch Together" which can eliminate small overlaps or gaps of selected strokes by slightly moving them.

@Ulf3000
Copy link
Author

Ulf3000 commented Feb 24, 2023

ohh damn its right there , sometimes im blind. i expected this tool under the eraser and never used the cutter before. its not perfect like clipstudios but good enough.


the pinch together tool is good for merging strokes into one and corners , but doesnt really work if lines cross in the middle of a stroke, thats would be awesome if it stretched to the crossing.

also the transform is distributed through the whole stroke, a whole outline of a characters face could shift in the process, it would be amazing if the pich together tool would use a smooth falloff through the stroke.

amazing addon man! really outstanding.

@Ulf3000
Copy link
Author

Ulf3000 commented Mar 2, 2023

Hey man, i want to detect the line crossings like the cutter and segment selection in edit mode do. is there any internal function for it which i can use ? or do i need to write one from scratch ?

@chsh2
Copy link
Owner

chsh2 commented Mar 3, 2023

Hey man, i want to detect the line crossings like the cutter and segment selection in edit mode do. is there any internal function for it which i can use ? or do i need to write one from scratch ?

There is a function mathutils.geometry.intersect_line_line_2d that judges if two line segments intersect with each other. But I do not find higher-level functions, e.g., getting the crossing of two GPencil strokes directly.

I am improving my pinch operator according to your feedback. However, I do not know how to improve the Blender's built-in tools such as the eraser and cutter without changing the source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants