-
Notifications
You must be signed in to change notification settings - Fork 131
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
Sort levels by height for exploding tool #93
Comments
Hi @agviegas I write to ask you if there is a chance to solve this issue for the official release. Thanks! |
We'll try! Otherwise, we'll fix it after September 20. Cheers! |
Hi @agviegas. I send you the IFC file. It could be useful if you want to do some tests. Thanks! |
Hi @RASRC! I'm just following up this issue. Are still experiencing the same problems when updating to openbim-components@1.1.5? |
Hi @HoyosJuan! Yes I have that version running and the issue is still there. I left the ifc file in a previous message if you want to do some tests. |
Hi @HoyosJuan! I'm using the 1.2.0 version of the library now and still have the same issue |
Hi @HoyosJuan! |
Hey! After the big refactor of the library, this milestone we are checking and solving issues. We have also updated the exploder. Now, you can classify the model like this: const classifier = components.get(OBC.Classifier);
await classifier.bySpatialStructure(model); That won't sort the storeys by default because it's generic to any kind of relationship, but you can easily sort them by getting all the storeys and using its elevation information. Good thing about this approach is that even in those files where the elevation information is somewhere else, a custom sort method can be established for the exploder: const storeys = await model.getAllPropertiesOfType(WEBIFC.IFCBUILDINGSTOREY);
if (storeys) {
const storeyList = Object.values(storeys);
storeyList.sort((a, b) => a.Elevation.value - b.Elevation.value);
const sortedIds = storeyList.map((item) => item.Name.value);
const newClassifiedStories: typeof classifier.list.spatialStructures = {};
for (const id of sortedIds) {
const classifiedStories = classifier.list.spatialStructures;
newClassifiedStories[id] = classifiedStories[id];
}
classifier.list.spatialStructures = newClassifiedStories;
} This should be possible from |
Describe the bug 📝
I'm having some problems with the explode tool.
It appears to don't work well with levels that have negative elevation (I mean that this levels are positioned below the IFC origin). The elements are displayed in an incorrect position above the origin when you explode the model like in the screen captures.
There is something I can do to fix it? Thanks!
Reproduction▶️
https://github.com/RASRC/FrontEnd_Course.git
Steps to reproduce 🔢
Activating the explode tool in the bottom menu of the app
System Info 💻
Used Package Manager 📦
npm
Error Trace/Logs 📃
No response
Validations ✅
The text was updated successfully, but these errors were encountered: