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

[FEATURE] StoreyViewsPlugin sort on IfcBuildingStorey elevation #1710

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

xeolabs
Copy link
Member

@xeolabs xeolabs commented Oct 24, 2024

This PR improves the way StoreyMaps are ordered in StoreyViewsPlugin.storeysList.

Ordinarily we sort each StoreyMap by the lowest point of the 3D boundary of its IfcBuildingStorey.

This is a problem when the IfcBuildingStorey contains an element, such as a stairwell or drainpipe, that overlaps with the boundaries of other IfcBuildingStoreys. In this case, the correct spatial ordering is unclear.

This PR makes sorting more robust by sorting the Storeys on the IfcBuildingStorey elevation attribute, if provided in the data.

If not provided, then sorting will fall back on using the boundaries as just described.

Usage example here, with an XKT file that contains metadata that has the elevation attributes on the IfcBuildingStoreys: https://github.com/xeokit/xeokit-sdk/blob/master/examples/navigation/StoreyViewsPlugin_Minimap_Duplex.html

@xeolabs xeolabs merged commit 6035d42 into master Oct 24, 2024
3 of 4 checks passed
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>xeokit Example</title>
<link href="../css/pageStyle.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
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

Successfully merging this pull request may close these issues.

1 participant