Giter Club home page Giter Club logo

Comments (2)

chrysn avatar chrysn commented on May 23, 2024

An even better example might be the "angle" setting. The angle between two parts is not something the user configures, but it is a property of the model (eg. ABox is always at 90° angles; in models such as AngledBox it's configurable but even then it's not constant across all joints). In that example, the settings are deepcopied and applied to a new set of edge objects. That works even with the letter short-cuts because the angles are constant. (But it'd even work for non-constant angles because instead of letters the actual objects can be passed).

Is that the generally recommended pattern? If so, should options that can't be practically set (or are always set by the model) be hidden from the web UI and the command line? Should there be a helper function for "take these settings but adjust some details and create a new edge type out of it"?

from boxes.

florianfesti avatar florianfesti commented on May 23, 2024

OK, after thinking about this for a while I guess the right way is making this a property of the Settings class without using the parameter mechanics. So the angle should not be in absolute_params but a simple property . That way the user can meddle with it and one can still create a copy of the settings to create a new set of edges - or change it in the code.

from boxes.

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.