Bezigon Tool
-
@Daniel Send me the code and the tables with click patterns
-
@Daniel Sorry i miss a little all the conversation, because my english: Is possible to do this examples with VS now, or it is a suggestion for future development?
I tried with sample 1, i got this:
I used click and alt+click.
-
@marce Should be possible to get those cases from the image.
I tested them, I will retest the final build and see if there might be some bugs.
Is there some reference app I can access to test these?
-
@VectorStyler: https://limewire.com/d/zsIgi#SZatmBEVLR - Here is the permutation table. You can see the exact curve that needs to be produced for all 16 click patterns. I've included screenshots from the algorithm I am working on as well as FreeHand's. You can compare results with VS, too. Code coming through. Just fixing API issues. Sorry for delay.
-
@Daniel Thanks, I will try to use this as a reference.
-
This is my giant, practical middle finger to Adobe! Fuck you, Adobe, for killing FreeHand.
It is here feckin' finally:
The Bezigon package is attached as Bezigon-packages.zip.
It contains two versions of the library and the documentation. You only need two files to integrate either version into Vectorstyler: bezigon.h and bezigon.cpp. Everything else is for testing, the demo, or reference.
Which version to use
Bezigon 4.2.0 has three node types: Corner, Smooth and Tangent.
Bezigon 2.2.0 has two: Corner and Smooth. It is about half the size.On paths made only of Corner and Smooth nodes, the two versions give identical handles. Use 4.2.0 if VectorStyler needs Tangent nodes. I highly recommend it. Otherwise 2.2.0 is the simpler choice.
The permutation documents appear in both version folders and in Technical Documentation. The copies are identical, and the duplication is deliberate so each folder stands alone.
What each file does
-
bezigon.h is the public interface: the node types, make_node, close_path, set_node_type, compute_handles, drag_handle, and in 4.2.0 segment_is_straight and handle_axis.
-
bezigon.cpp contains all the rules. It depends only on the standard C++ headers <vector> and <cmath>, and has no global state, I/O or exceptions.
-
main.cpp is an interactive demo that runs on Windows with the EGE graphics library. It shows how the functions are called and lets you test every gesture. It is not part of the product.
-
demo_scenes.h (4.2.0 only) holds seven example paths, used by the demo keys 1 to 7 and by the tests.
-
test_bezigon.cpp is the test program. It needs no window and checks the rules across thousands of cases. Build it with the same compiler and flags as VS to confirm the results match on your toolchain. Expected results are in the README.
-
The permutation documents show every combination of node types, closes and edits, with a picture for each case. The Corner, Smooth and Cusp document covers both versions. The Tangent document covers 4.2.0 only.
-
The Technical Reference is the document to read first. It covers the API, the rules, the VectorStyler integration steps, and how degenerate input is handled. The History and Derivation explains how each rule was reached: the formulas, the FreeHand and Xara comparisons, and where we overrode FreeHand for intuitiveness.
-
README.md is a short overview with the test commands and a manual checklist for the demo.
Further note: You will see PhotoLine addressed throughout because we wrote it with the intention of initially just giving it to PhotoLine, but then changed our minds. So ignore this. The code is software agnostic.
How we used AI: We used AI extensively to test and debug the code we wrote. The model used was Claude Opus 5.5. We used AI extensively to derive formulas from screenshots. This is well documented within the history and derivation document. AI was used to create permutation tables which we then checked against FreeHand. AI was also used to give structure to our original brain dump and produce read me files, and technical references. The code itself was hand written by two extremely patient human beings: Vira Daniel & his long-suffering mate Taras Vynnychenko who obliged me with this mammoth project. He wrote this while he and his neighbours are still under Russian occupation. I wrote zero code. But I provided the complete creative direction to the entire project.
Edit: Permutation tables will be updated with exhaustive screenshots: Its partially filled because I got tired and lazy. But I have checked every single instance in FreeHand.
-
-
I created a demo application of both versions for bezigon for those who want to try it: https://limewire.com/d/luGLt#jogenjIi9V - It works on Windows only. It also has demo instructions in the pdf. So you can play around with it. It might throw a warning when you open it because it has no digital signature. But it costs $$$ to get digital signature... so pardon me.
-
@Daniel Would you be able to give a brief overview/explanation of what you're working on with the bezigon code and how that related to what is currently installed in VS today? From what I gather, there are some behaviors found in Freehand that are not working as smoothly in VS? thanks!
-
@Daniel said in Bezigon Tool:
I created a demo application of both versions for bezigon for those who want to try it: https://limewire.com/d/luGLt#jogenjIi9V - It works on Windows only. It also has demo instructions in the pdf. So you can play around with it. It might throw a warning when you open it because it has no digital signature. But it costs $$$ to get digital signature... so pardon me.
This is good. Thanks a lot!
-
It is much easier to explain this in a video. I am going to record one tomorrow.
For both VS and PL devs.