-
Notifications
You must be signed in to change notification settings - Fork 322
Add materials to assemblies #1620
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
Comments
This would be interesting. What is your main use case? |
One is mass calculation, where the density is necessary. The other is, that you can export with the visualization settings, for example you can visualize metal nicely with gltf. |
I'm also interested in this. Maybe it's also possible to add textures? My main case is that I'm creating a structure and want to create an (rendered, would it be possible?) image of it to be added to a printed document. Also the 3D model is exported for visualization in a viewer. |
This would be very useful for calculating load! |
@Jopie01 Textures should be possible, XCAFDoc_VisMaterialPBR has fields for that, but I don't know yet how those work. |
Alright, let's give it a try @adrianschneider94 ! I did take a look at your branch and AFAICT you did some reformatting/reordering of imports. I will kindly ask to revert this. Our README contains instructions regarding which black version to use. Please do not apply other formatting fixes. Regarding the PR I see the following tasks. First two are MVP, the rest would be nice to have but can ba via other PRs.
|
Yes, so far I have not set up everything, just got everything working for my project. Some points:
|
[I updated your comment with numbers to be able to refert to the points] [I updated your comment with numbers to be able to refer to the points] Alright, here are my answers
Long story short, I’d propose to keep the scope small and for now “just” implement materials up to the CAF part. |
Has there been any movement on this? I'd also like to use this feature for loads, and generating geometries with nice textures |
Not yet, but I have this on my task list for the comming weeks. |
I created a pull request #1815. |
As far as I can see, it's only possible to add colors so far.
That could be extended to handling materials by using
XCAFDoc_Material
for physical properties andXCAFDoc_VisMaterial
for visualization.I implemented a first working approach:
https://github.com/sangl-spezialtransformatoren/cadquery/tree/materials
The syntax is at the moment:
I wanted to use this issue as a discussion entrypoint, a pull request could follow later.
Links to OCCT documentation:
The text was updated successfully, but these errors were encountered: