Coder Social home page Coder Social logo

Simple Constraint/Relation API about manifold HOT 9 OPEN

elalish avatar elalish commented on July 20, 2024
Simple Constraint/Relation API

from manifold.

Comments (9)

pentacular avatar pentacular commented on July 20, 2024

It sounds technically interesting, but I think I'd start by considering the kinds of problem you see this approach solving, and the potential impact.

from manifold.

pca006132 avatar pca006132 commented on July 20, 2024

The idea is to add some simple constraint solving without making the system too complicated (#118). This also keeps the reasoning local, previous constraints will not affect future operations. The use case for this (only considering rigid transformation) is mainly for assembly and making joints, which I have to calculate the required transformation manually.

from manifold.

elalish avatar elalish commented on July 20, 2024

I'm not sure there's such thing as "simple" constraint solving; it's all pretty nonlinear and commonly results in no solution. This is the basis of any CAD program, but they mostly get around this by giving immediate UX feedback when the solution doesn't exist so it can be immediately fixed by the user. I'm not sure how to make it work in a "headless" library like manifold. I think this is why @rsaccon suggested integrating an existing constraint engine, probably along with a UI.

Basically, is there an advantage to having a constraint engine integrated into our internals, over just having one above us handing down the appropriate transforms? I'd still love to work on it though - now that the manifold library is looking pretty stable I'd love to play with building higher-level and user-facing abstractions on top. Especially now that we have a WASM build, it would be great to link up with other JS projects to build some powerful web apps.

from manifold.

pca006132 avatar pca006132 commented on July 20, 2024

is there an advantage to having a constraint engine integrated into our internals, over just having one above us handing down the appropriate transforms

Probably no. The idea of this issue is to compute the transform by solving a simple linear system, but perhaps this is a bit too naive.

I am interestes in linking up with other JS projects, do you know if there is any JS projects that does constraint solving?

from manifold.

pentacular avatar pentacular commented on July 20, 2024

I'm interested in the use-cases for automatic constraint solving for code-based systems.

I think that the main challenge here is that a shift from sufficiently to insufficiently constrained system may come from potentially very many, potentially quite remote changes to a system, making parametric design much less reliable, and generally would force significant over-constraint.

So I've been working on simpler approaches, such as generating a hinge assembly along a geometric edge of an existing shape, or placing one object at a specific position in the local frame of reference of another so that they mate correctly.

I'd try to come up with 4-5 examples of problems that you think would be best solved by the proposed constraint resolution system.

from manifold.

pca006132 avatar pca006132 commented on July 20, 2024

So I've been working on simpler approaches, such as generating a hinge assembly along a geometric edge of an existing shape, or placing one object at a specific position in the local frame of reference of another so that they mate correctly.

Yeah, I'm thinking about something similar to this, ideally users can use this to mate parts with minimal constraint rules.

from manifold.

pentacular avatar pentacular commented on July 20, 2024

Note that this doesn't involve any constraint solution -- just the ability to organize things with respect to one another.

So I'd think more about the problems that do require constraint solution. :)

from manifold.

NodeGuy avatar NodeGuy commented on July 20, 2024

I am interestes in linking up with other JS projects, do you know if there is any JS projects that does constraint solving?

Hey look at this: https://www.npmjs.com/package/slvs/v/3.1.0-dev.22

from manifold.

elalish avatar elalish commented on July 20, 2024

@NodeGuy Cool! We can't incorporate them here since they're non-commercial, but others could certainly use these libraries together. Looks like their C code is more stable than the npm version too.

from manifold.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.