Hi,
I have a solid imported via step. Is there a way to change color of a face? I know a way for doing this for the whole solid via IMaterial_DG. How do I get    material for a face?
Thank you for your insights!
			
			
									
						
										
						Set face color
- 
				Dave Thomas
- Posts: 1
- Joined: Wed Aug 28, 2024 1:27 am
Re: Set face color
This was added in v7.0, I think.
You need to query IBRepShape_DG out of IBRepFace_DG. and use the IBRepShape_DG.GetAppearance, which is actually an IMaterial_DG. (query/cast).
It is in the Shape Explorer sample: Click 'More Face Properties' at the bottom. In the popped-up dialogue there is Per Face Color button.
			
			
									
						
										
						You need to query IBRepShape_DG out of IBRepFace_DG. and use the IBRepShape_DG.GetAppearance, which is actually an IMaterial_DG. (query/cast).
It is in the Shape Explorer sample: Click 'More Face Properties' at the bottom. In the popped-up dialogue there is Per Face Color button.