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

#9830: enhance Support for IFC 3d model in MS #9987

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

mahmoudadel54
Copy link
Collaborator

Description

  • indicate the projection code into the warning popup in case adding ifc model with non-supported projection

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

#9830

What is the current behavior?
#9908 (comment)

What is the new behavior?
Showing the non supported projection in the warning popup in case of adding an ifc model with non supported projection.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

I have investigated with how to get the bbox of the model to zoom to the model instead of the origin of the model.
I found out that there is an IFC Entity called 'IFCBOUNDINGBOX' but it is starting from IFC4.3 schema.
And this is a sample of code to get the corner bottom-left bbox point, it may help in this.

const hasBBox = ifcApi.GetLineIDsWithType(modelID, WebIFC.IFCBOUNDINGBOX).size(); 
            let coordinates = [];    // this is the left-bottom corner coordinates of the bbox
            if (hasBBox) {
                for (let index = 0; index < hasBBox; index++) { 
                    let ifcBBoxLineID = ifcApi.GetLineIDsWithType(modelID, WebIFC.IFCBOUNDINGBOX).get(index);   
                    let ifcBBoxEntity = ifcApi.GetLine(modelID, ifcBBoxLineID);  
                    let corner = ifcApi.GetLine(modelID,ifcBBoxEntity.Corner.value);   
                    coordinates.push([
                        corner.Coordinates[0]?.value || 0, corner.Coordinates[1]?.value || 0, corner.Coordinates[2]?.value || 0
                    ]);
                }
            } 
- indicate the projection code into the warning popup in case adding ifc model with non-supported projection
@allyoucanmap allyoucanmap marked this pull request as ready for review February 26, 2024 10:08
@allyoucanmap allyoucanmap merged commit 5261361 into geosolutions-it:master Feb 26, 2024
6 checks passed
@allyoucanmap
Copy link
Contributor

@ElenaGallo please test this on dev, thanks. Note we improved the computation of bounding box even if sometimes it is not correct 100% because of different height or origin not aligned with the actual model ( cc @tdipisa )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment