Comments (10)
I think it would be best to do a completely clean break here rather than keeping it inside the CADmium repo, so I've created https://github.com/CADmium-Co/ISOtope
I picked "ISOtope" because it's an Iterative SOlver and because it sorta fits the naming scheme of elemental things. Also "tope" like topography, and how it's all based on gradient descent? IDK, we'll workshop it.
Don't worry about matching the existing API too much--it was whipped up super fast as a proof of concept and it may well be bad. Build the right API for a standalone 2D Sketch Solver and CADmium will adapt to meet it.
from cadmium.
I was able to make some progress in the repo https://github.com/CADmium-Co/ISOtope.
There is still room for improvement, but I think we can start working on integrating it into the software before the codebases diverge too far.
from cadmium.
Yeah, you can open up an issue for this in the new isotope repo
from cadmium.
Thank you Tobias, what a great writeup!
I have no attachment to the second-order nature of the current approach--it was just easy to think about during prototyping. I think the first order formulation is likely to be much better!
I strongly support the idea of breaking out the 2D constraint solver into its own standalone crate and giving it as few dependencies as possible. I also love the idea of trying out a few different approaches to the gradient descent step so we can weigh the pros and cons.
If you feel confident to lead this effort, I will support you however I can!
from cadmium.
Hi @MattFerraro ,
Thanks, great to hear. I think I can start working on refactoring the code to use gradient descent. I can also document the maths behind it in a readme. This shouldnt be too much of a change.
Refactoring the code into a separate crate will probably be a big pullrequest leading to merge conflicts with other braches, so I'm not sure how to deal with this.
You wrote on Discord that you are working on settigung up a Github Organization anyways, which would make it easier to move the code around.
I guess suddenly coordinating 800+ people puts a bit of unexpected stress on you 😅 so yeah, just let me know what you think a good way forward
from cadmium.
This is fantastic work, Tobias! Unbelievable job
I pulled it locally and ran cargo test
. On my m1 mac I'm seeing:
point_a: Point2 { data: [[0.5700834586643445, -0.06745530512562747]], gradient: [[-25.709630952671287, -3.5250742668599533]] }
point_b: Point2 { data: [[-1.3913236621093832, -0.33256804099923265]], gradient: [[-0.03432845891903502, -0.13300160678809736]] }
point_c: Point2 { data: [[-1.7858823110455389, 2.616758693265621]], gradient: [[0.04124606881310794, -0.04022156009781125]] }
point_d: Point2 { data: [[0.17054457073731163, 2.8818523972647134]], gradient: [[0.02043760840499649, -0.022759707622775023]] }
point_reference: Point2 { data: [[0.5592929825521086, -0.06193753782611579]], gradient: [[25.811662378731278, 3.5916709580860164]] }
thread 'examples::test_rectangle_rotated::tests::test_rectangle_rotated' panicked at src/examples/test_rectangle_rotated.rs:113:9:
assertion failed: (point_a.as_ref().borrow().data() - Vector2::new(0.0, 0.0)).norm() < 0.001
failures:
examples::test_rectangle_rotated::tests::test_rectangle_rotated
test result: FAILED. 17 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.30s
Do you get the same?
from cadmium.
Yes, one test case is not yet working, its written down in the Todos of the Readme.
from cadmium.
PS: Some of the constraints could be improved still, but I think the overall structure shouldnt change too much anymore.
Also having UI would help a lot for debugging, thats why integrating it into the code base would be helpful.
from cadmium.
have you considered a wasm build aswell ? for folks that would like to use this directly ?
from cadmium.
Excellent work @TobiasJacob! I'm marking this done and we can have other tickets for integrating into the UI more fully
from cadmium.
Related Issues (20)
- Implement Operation Log and Evolution Log HOT 1
- Rectangle Tool does not stop after finishing Rectangle HOT 3
- Escape Key should exit sketch tool without escaping full screen mode (Firefox only bug) HOT 2
- Remove unused UI components HOT 2
- Extrusions not working on main branch
- Pan speed is too fast HOT 2
- Include Discord Link in UI HOT 1
- Add a Favicon HOT 5
- Gradual Transitions when resetting View HOT 2
- Cylindrical Mesh Looks Terrible HOT 1
- web: Spurious points showing when sketching
- Sometimes Gizmo gets clipped by Scene Contents
- The referenced faces problem HOT 2
- Show version or commit in Frontend HOT 1
- Support Dark Mode HOT 2
- Add CLA and write a FAQ about the chosen license HOT 1
- Dark Mode Improvements
- remove the /CADmium suffix from the URL HOT 4
- Add button to Gizmo to reset camera
- Docs: Remove all references to SvelteKit now that we use vanilla Svelte
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cadmium.