Skip to content

Conversation

@jmwright
Copy link
Member

@jmwright jmwright commented Oct 22, 2025

This is a smaller PR which wraps Graphic3d_MaterialAspect XCAFDoc_Material and XCAFDoc_VisMaterial from OCC and leaves open the possibility of adding in physical visualization properties later.

@codecov
Copy link

codecov bot commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.82%. Comparing base (505a18d) to head (a0c45c3).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1923      +/-   ##
==========================================
+ Coverage   95.74%   95.82%   +0.07%     
==========================================
  Files          29       29              
  Lines        7827     7943     +116     
  Branches     1179     1202      +23     
==========================================
+ Hits         7494     7611     +117     
  Misses        192      192              
+ Partials      141      140       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jmwright jmwright marked this pull request as ready for review October 23, 2025 14:53
Copy link
Member

@adam-urbanczyk adam-urbanczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the intent of this PR correctly, you actually want to use XCAFDoc_Material

@jmwright
Copy link
Member Author

@adam-urbanczyk I need to better understand what you are thinking. The current Material class wraps Graphic3d_MaterialAspect and so it is more visualization based, but my thought was to add things like density as properties later. XCAFDoc_Material does not seem to gain us much in the way is physical properties. My intention is to create a more general-purpose material class that can be used for multiple purposes, including export. It could be possible to wrap multiple classes and have the properties be interfaces to each of those properties. So the "diffuse color" would get/set on Graphic3d_MaterialAspect, and "density" would be get/set on XCAFDoc_Material.

@adam-urbanczyk
Copy link
Member

adam-urbanczyk commented Oct 23, 2025

In the end this class should wrap XCAFDoc_VisMaterial and XCAFDoc_Material (thus not Graphic3d_*). I assume that the first (main) use case is not vis related, so XCAFDoc_Material should be prioritized.

NB: it can be used for now to simply store a name.

@jmwright
Copy link
Member Author

@adam-urbanczyk How about this?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants