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: Support for IFC as a further 3D model managed by MapStore #9908

Merged
merged 16 commits into from
Feb 19, 2024

Conversation

mahmoudadel54
Copy link
Collaborator

Description

This PR includes these points below:

1 - Adding IFC model layer to the catalog so IFC Model is included as layer now in catalog.
2 - Handling Workflow for import and visualize an ifc on map
3 - Handling Identify workflow for IFC objects
4 - Handling some panel settings options like:

  • Visibility
  • General tab (title and description)
  • Possibility to change position of the center of the model in Style tab in TOC menu

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?
#9830

What is the new behavior?
IFC Model support is added for 3d map as a layer

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

allyoucanmap and others added 8 commits December 19, 2023 09:47
Description:
- Handle import ifc model to the 3d map
- Adding ifc model layer to catalog
Description:
- Creating ModelTransformation component that handle moving the model center via display TOC settings for 'model' layers
- Add translations
- Handle show/hide the model layers via TOC
- Handle logic on show/hide 'model' layers based on  max/min scale in display TOC settings
Description:
- Doing some Refactors in ModelLayer
- Write unit tests
- Edit translations
Description:
- Edit testConfig file by adding a proxies property in testConfig to enable using web-ifc test
- Replace fetch with axios in fetching ifc file via url
- Edit unit test of "Model-test" file due to testConfig edits
Description:
- Remove the dummy ifc layers from new.json file
Description:
- Hide opacity from display tab for ifc model
- Write unit tests
- Update copyright year for the new created files
Copy link
Contributor

@allyoucanmap allyoucanmap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine, some inline requested changes and the following task to complete:

  • Take a look to this commit 4715e57 where some properties changes has been introduced
// sample configuration
{
  "id": "model-01",
  "type": "model",
  "url": " /models/example.ifc",
  "name": "Model",
  "title": "Model",
  "visibility": true,
  "features": [
      {
          "type": "Feature",
          "id": "model-origin",
          "properties": {
              "heading": 45,
              "pitch": 0,
              "roll": 0,
              "scale": 10
          },
          "geometry": {
              "type": "Point",
              "coordinates": [8.9463, 44.4056, 0]
          }
      }
  ]
}
  • Add dev documentation related to model layer in maps-configuration.md file

@tdipisa

  • [TBD] Verify if it's possible to get information related to the projection from IFC files (Do we have some examples?)
  • [TBD] At the moment adding opacity could be complex so we excluded opacity property similar to 3d tiles. Could this work?
  • [TBD] Interaction with the map to adjust the model are not currently implemented. My proposal is to verify the feasibility in a separate issue

Nice to have in UI, to discuss:

  • Add input settings fields to update rotations: heading, roll and pitch
  • Add input settings field to change the scale
  • Add an options to visualize the origin of the model with a marker
web/client/api/Model.js Outdated Show resolved Hide resolved
web/client/components/map/cesium/Map.jsx Outdated Show resolved Hide resolved
web/client/plugins/widgetbuilder/CatalogServiceEditor.jsx Outdated Show resolved Hide resolved
@allyoucanmap allyoucanmap marked this pull request as ready for review January 30, 2024 16:56
Description:
- Resolve review comments includes:
*  edit in translation files
* remove unused comments
@tdipisa
Copy link
Member

tdipisa commented Jan 31, 2024

[TBD] Verify if it's possible to get information related to the projection from IFC files (Do we have some examples?)

Let's check with a georeferenced IFC file, then manage the functionality to automatically zoom to the IFC file if georeferenced or place the model in the center of the viewport for now that's enough

[TBD] At the moment adding opacity could be complex so we excluded opacity property similar to 3d tiles. Could this work?

no for now

[TBD] Interaction with the map to adjust the model are not currently implemented. My proposal is to verify the feasibility in a separate issue

let's create a dedicated issue

Nice to have in UI, to discuss:
Add input settings fields to update rotations: heading, roll and pitch
Add input settings field to change the scale
Add an options to visualize the origin of the model with a marker

no for now, we can maybe open an issue anyway for future improvements.

mahmoudadel54 and others added 2 commits February 5, 2024 13:52
Description:
- Add dev documentation related to model layer in maps-configuration.md file
- Manage the functionality to automatically zoom to the IFC file if georeferenced or place the model in the center of the viewport
- edit unit cases based on changes
Copy link
Contributor

@allyoucanmap allyoucanmap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new logic for the projected IFC4 model is good, I introduced some logic to complete and there are some failing tests to check.
There is still a misalignment with the rotation but the computation seems correct

web/client/api/Model.js Show resolved Hide resolved
web/client/api/Model.js Show resolved Hide resolved
web/client/epics/catalog.js Show resolved Hide resolved
…ommnets)

- double check of setting COORDINATE_TO_ORIGIN by false to avoid translating the model to the origin
- Showing warning messages if user add non-referenced ifc model or ifc model with non supported projection
- Add translations
- Write unit tests
…ommnets)

- edit in  translations
- Add refactor code for getting ifc data by using cache approach
@allyoucanmap allyoucanmap merged commit b64ec57 into geosolutions-it:master Feb 19, 2024
6 checks passed
@allyoucanmap
Copy link
Contributor

@ElenaGallo please test this feature on dev, thanks

@ElenaGallo
Copy link
Contributor

@mahmoudadel54 I noticed that when adding the model to the map, the map is not zoomed correctly. See the video below:

center.mp4

I use this map with this model url

@tdipisa
Copy link
Member

tdipisa commented Feb 20, 2024

@ElenaGallo @mahmoudadel54 (FYI @allyoucanmap)
It is possible to test also in DEV now. The only think is that I need to configure also the CRS support

image

@mahmoudadel54 @allyoucanmap is it possible to indicate it in the popup when this kind of error occurs? I think it would make the MS notification more useful.

@tdipisa
Copy link
Member

tdipisa commented Feb 20, 2024

@ElenaGallo @allyoucanmap @mahmoudadel54 now also that CRS is supported in DEV.

I noticed that when adding the model to the map, the map is not zoomed correctly. See the video below:

Does it maybe depend on the model origins @mahmoudadel54 @allyoucanmap?

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