GraphiteEditor / GraphiteEditor/Graphite

Add other boolean modes to the Boolean Operation node

Đang mở
#4,103 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
27.2k
Fork
1.3k
Merge trung bình
20 giờ 5 phút
Pull request đã merge (30 ngày)
57

Mô tả

On [discord](https://discord.com/channels/731730685944922173/731738914812854303/1499412005428396122) boldline suggested to implement the following feature:
Would you consider adding a "merge" option to the boolean tools? Specifically one that functions like in Illustrator and in Vectorstyler? Essentially, if the two objects are the same color, it will merge them together, if they are different colors, it will cookie-cutter them but leave both pieces there. And also @Keavon suggested to add the other boolean modes that can be constructed out of the existing boolean ops algorithm from the Linesweeper library that would be expected in other vector graphics apps.

So far Graphite implemented: Union, Subtract front, Subtract back, Intersect, Difference (this one is equivalent to Illustrator's Exclude, VectorStyler's Remove Overlaps, Inkscape's Exclusion. But maybe a better name can be used for this?)

My proposal is to add the following operators to the Boolean Operation Node:

- Merge: Apply union for all the objects that share the same fill property, removes strokes from all objects (Equivalent of Illustrator's Merge, VectorStyler's Merge functionality)
- Divide/Fracture: Calculates all the overlapping and non overlapping parts (Equivalent of Illustrator's Divide, VectorStyler's Divide, Inkscape's Fracture)
- Trim: Subtracts top objects from the objects below them and keeps the remainder of the operation and also the top objects, removes stroke from all objects (Equivalent of Illustrator's Trim, VectorStyler's Trim functionality)

Reference material:
How to Use the Pathfinder Panel in Adobe Illustrator (Full Overview)
https://www.youtube.com/watch?v=mkNnyDEVKUY
The Pathfinder Tool Explained // Adobe Illustrator Tutorial
https://www.youtube.com/watch?v=tJLMnaP3VyM
https://helpx.adobe.com/illustrator/desktop/manage-objects/reshape-transform-objects/pathfinder-panel-overview.html

Boolean Operations Reference Guide
https://vectorstyler.com/forum/topic/1758/boolean-operations-reference-guide/2

All Boolean Path Operations in Inkscape Explained (with Examples)
https://www.youtube.com/watch?v=Xr8HqSwqn2E
https://inkscape-manuals.readthedocs.io/en/latest/boolean-operations.html

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Bắt đầu với node Boolean Operation và thuật toán các phép toán boolean hiện có từ thư viện Linesweeper. So sánh ngữ nghĩa được đề xuất của Merge, Divide/Fracture và Trim với các tài liệu tham chiếu được liên kết của Illustrator, VectorStyler và Inkscape. Công việc được xem là hoàn tất khi node hỗ trợ các chế độ được đề xuất với hành vi tô màu và nét vẽ được chỉ định, đồng thời khớp với các kết quả vector mong đợi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
computer-graphics
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.