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
Selection representation context #1201
base: v0.7.0
Are you sure you want to change the base?
Selection representation context #1201
Conversation
Oh wow! I've been looking for a way to run create_shape or the iterator that only targets a particular context + subcontext + target_view - does this solve that problem? |
In case you mean to export a shape of an IFC file, which has a specific context, then you can try this. You can select multiple contexts. Just run I haven't worked with target views, yet. Maybe you can provide some information about that? |
I see in IfcConvert, I was hoping that this could also affect the Python bindings for create_shape or geometry iterator.
|
Thank for that information. I'm working at my PhD currently and such information is very helpful 🙂. Regarding the python bindings: many changes are in classes, which are not specified to IfcConvert, maybe you check the changes and ask again if necessary. |
Hi @Noranius thanks for this. Sorry for the delays in replying. This is great. We kind of already had --plan and --model but it mixed various things and I think it's good to have more control over rep context. Did you have a look at the logs on Travis: https://travis-ci.org/github/IfcOpenShell/IfcOpenShell/builds/751025974 It appears that the PR introduced some issues on files:
Token 2325 in acad_2010_walls.ifc is
And indeed IfcGeometricRepresentationContext.ContextIdentifier is optional, so you better first check with Also instead of
It would for iterator (more or less automatically I think, for that purpose maybe we should change the signature from |
Hi Aothms, Greetings |
Bump on this PR :) I wonder if the new functionality in set_context_ids has any relevance on this? |
Yes @Moult you're right. There is quite a bit of overlap. I forgot about this. @Noranius see 514c5eb I like how @Moult used the settings to store the context ids. So that the iterator signature doesn't need to change. Maybe better would even be a designated IfcGeom::filter for it. I actually like the strings a bit better as an interface because that would mean the same settings can be reused for different models. But obviously strings are a bit more difficult to represent all criteria such as scale and targetview. So I can also understand the approach @Moult took. I would propose we adapt this PR to interface with 514c5eb Basically just in IfcConvert to a quick resolve of the arguments passed from the command line to settings context_ids. From there on we can evaluate how we proceed. Edit: are the volunteers to take this on? otherwise I'll work on it. |
Bump :) |
For the translation of ifc files to others, the selection of the geometry context would be helpful. The idea is to select the geometry representation context(s) by their ID(s). Hence, I have added this option to the
IfcConverter
.In short, I have extended the
initialize
methodIfcGeom:Iterator
with an overload that it takes a set of strings as argument. During the initialization this set of geometry representation names is respected to select related representations.