You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was taking a look at how selection does work, in order to understand how switching material is done in XbimExplorer.
The goal I'm trying to achieve is to be able to set whatever material I want to whatever IfcRepresentationItem I want.
I guess I'm something like mid-way to achieve something like that, but no matter what I try, I can't figure what is missing in my code.
Here what I thought would let me get the result I want, but in fact it doesn't :
`
WpfMaterial mat = new WpfMaterial();
mat.CreateMaterial(new XbimColour("RED", 1,0,0,0.3));
var ifcSiteRepr = ifcSite.Representation.Representations.FirstOrDefault();
var m = WpfMeshGeometry3D.GetGeometry(ifcSiteRepr, Collection[ifcSiteRepr.Model].Transform, mat);
`
Problem is : I don't now what to do after.
When selecting an item in XbimExplorer, m is then passed to the "content" property of an ObservableMeshVisual3D, but I really didn't understood that part.
Hope someone can tell me the right way ?
The text was updated successfully, but these errors were encountered:
mwymwy
changed the title
Can't get WpfMaterial / XbimColour to work properly
Can't get WpfMaterial / XbimColour to work on a IfcRepresentationItem
Mar 2, 2018
Hi everybody,
I was taking a look at how selection does work, in order to understand how switching material is done in XbimExplorer.
The goal I'm trying to achieve is to be able to set whatever material I want to whatever IfcRepresentationItem I want.
I guess I'm something like mid-way to achieve something like that, but no matter what I try, I can't figure what is missing in my code.
Here what I thought would let me get the result I want, but in fact it doesn't :
`
WpfMaterial mat = new WpfMaterial();
mat.CreateMaterial(new XbimColour("RED", 1,0,0,0.3));
var ifcSiteRepr = ifcSite.Representation.Representations.FirstOrDefault();
var m = WpfMeshGeometry3D.GetGeometry(ifcSiteRepr, Collection[ifcSiteRepr.Model].Transform, mat);
`
Problem is : I don't now what to do after.
When selecting an item in XbimExplorer, m is then passed to the "content" property of an ObservableMeshVisual3D, but I really didn't understood that part.
Hope someone can tell me the right way ?
The text was updated successfully, but these errors were encountered: