Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a material library for users to pick from #90

Open
stfnp opened this issue Feb 2, 2019 · 4 comments
Open

Add a material library for users to pick from #90

stfnp opened this issue Feb 2, 2019 · 4 comments

Comments

@stfnp
Copy link
Contributor

stfnp commented Feb 2, 2019

In GitLab by spfeifer on Jan 8, 2018, 17:17

@lleroy
Copy link
Contributor

lleroy commented Mar 20, 2019

(from issue gitlab-123)
wood selection

it would be nice to have a drop down to select the wood type, rather than to have to specify the Modulus of Elasticity, Rupture and Compression breakdown force (but still be able to override those, or add your own wood types to a local (json) database)

those numbers are a bit hard to find (in the correct units)

@stfnp
Copy link
Contributor Author

stfnp commented Jan 10, 2022

Some thoughts about this feature.

Requirements:

  • There is a database (either a single or multiple text files, maybe .json or .csv) with various pre-defined materials
  • Users need to be able to add their own materials or override existing materials in the database
  • Bow files need to be portable and not depend on the state of the local material library

Step 1: Support for materials (See #224)

  • In the model tree, add a new top-level item called "Materials"

  • Users can add materials there by specifying various properties

  • The materials and their properties are stored directly in the bow files for portability

  • Materials that were added to the model can be selected for the layers via comboboxes

Step 2: Material library

  • Materials can still be added manually like above, but also selected from a database
  • Selecting from the database just copies the material properties into the bow file, as if it were created manually. No external reference to the database.
  • The materials can be edited in two places:
    • After adding them to the bow file: Only changes the material in the bow file
    • In the database: Users can create new entries or modify existing ones. This does not change the behaviour of any bow files that previously added those materials (-> reproducible results).
  • The user interface should allow filtering and sorting the available materials
    • The main interface should probably be a table where the available materials can be sorted by various columns. Also allow filtering by name, keywords, ranges of properties, etc.
    • Idea: Add a second tab where the materials are shown as points in a configurable x-y-plot, e.g. elastic modulus vs density (ashby chart) and other combinations.
  • Open questions:
    • New versions of VirtualBow might expand or modify the default materials. Such updates must not change any materials that were added or modified by the users. Maybe have two files (or sets of entries), one with default materials that is updated and one with user materials that are left untouched? (When looking for materials, user materials have precedence, so they can override existing materials.)
    • Where should the database file(s) be located? In the installation directory they might be deleted when installing new versions of VirtualBow. The preferred place for such things also depends on the OS (see QStandardPaths::AppDataLocation). This should be documented so that users can find and backup their materials or exchange them with other users.
    • What to do about string materials? Selecting them from a database would be useful too, but they don't fit in with the rest of the materials, because very different properties are required.

@stfnp stfnp changed the title Add a "material library" for users to pick from Add a material library for users to pick from Jan 10, 2022
@stfnp
Copy link
Contributor Author

stfnp commented Jul 5, 2023

For the pre-defined materials we can take the data from the wood database (https://www.wood-database.com/).
Eric Meier, the creator of this site, has kindly given me the permission to do so as long as the original source is stated.

@stfnp
Copy link
Contributor Author

stfnp commented Aug 11, 2023

It would also be good to be able to group materials into categories and filter them. Maybe let each material definition have an arbitrary number of tags like "wood", "fiberglass", etc. ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants