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

Request: Automatic part selection after model loading via URL Argument #510

Open
pthomas-44 opened this issue Nov 14, 2024 · 0 comments
Open

Comments

@pthomas-44
Copy link

pthomas-44 commented Nov 14, 2024

Describe the solution you'd like
When loading the 3D model, it should be possible to automatically select a specific part identified by its name, passed as an argument in the URL. This feature will allow directing the user to a predefined view that highlights a particular part without requiring manual selection.

How I implemented it to meet my immediate need
In website.js, the OnModelLoad() function triggers after the model loads.
At its end, I added a call to PreselectMesh() (self implemented), which retrieves the URL argument using GetPartSettings() and StringToPartSetting() (self implemented) in parameterlist.js.
It then calls GetMeshIdByName() (self implemented) in model.js and finally invokes SetSelection() (already implemented) to select the desired mesh.

If you are interested in this feature i would gladly help implement it following your guidelines.

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

1 participant