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

Can't get WpfMaterial / XbimColour to work on a IfcRepresentationItem #76

Open
mwymwy opened this issue Mar 2, 2018 · 0 comments
Open
Assignees

Comments

@mwymwy
Copy link

mwymwy commented 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 ?

@mwymwy 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
@CBenghi CBenghi self-assigned this May 21, 2018
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

No branches or pull requests

2 participants