ThatOpen / web-ifc-viewer

Graphics engine and toolkit for client applications.
MIT License
947 stars 235 forks source link

Connect to PowerBI #39

Closed ghost closed 2 years ago

ghost commented 3 years ago

Dear IFC.js maintainers,

One of the purposes for checking a model in a browser is for someone who is Non-BIM user to check the status.

Is it possible to link PowerBI and the browser model so that they can be used together?

I am not familiar with JS, so could you please show me a sample on how to do this and the procedure?

Thank you very much for your time.

agviegas commented 3 years ago

Hi @tenten0n!

Right know the library is under construction and I am not familiar with PowerBI. Nonetheless, this is a feature we will definitely implement in the example, so stay tuned for future updates. Thank you for your interest in the library and don't hesitate to ask us anything you need! 🙂

adrisanchu commented 3 years ago

Hi @tenten0n and @agviegas, I just came across IFC.js and it looks very promising! Regarding your Power BI question: an IFC model is just a bunch of text, so you can connect to an IFC file to extract data like you connect to a .txt or a .json file. But my guess is what you want to achieve is to display the IFC model in 3D (a Power BI visual object). Power BI is based on JS and you can create your custom visuals with 3rd party tools, and it could certainly be possible to embed web-ifc-viewer into a Power BI visual and put it in the Microsoft marketplace. I believe this is the way ESRI developped their 'ArcGIS for Power BI' visual that lets you import ArcGIS layers and enrich them with Power BI data. Another option will be to deploy both your Power BI report and IFC.js into a website. I must say I am also interested in this feature, specially if it is possible to highlight the components in the IFC through an ID!

agviegas commented 3 years ago

Hi @adrisanchu!

Yes, an IFC is a bunch of text, but (as you may know) parsing it is not trivial; in fact, this is what we are trying to archieve. We are finishing the API functions to fetch the properties of any item within the IFC as JS object. I have no prior experience with powerBI, but, based on what you say, it looks like this would be enough already to make some connections in a website. This should happen very soon.

As for the visual embedding, it sounds super interesting, but I'm not sure when are we going to be able to do such thing, as we have no one in the team with prior experience in this matter. I would do that myself, but now we have another things on the table.

Feel free to join the discord channel, add new ideas and contribute with PRs if you like. 😉

adrisanchu commented 3 years ago

Yes, an IFC is a bunch of text, but (as you may know) parsing it is not trivial; in fact, this is what we are trying to archieve

Yeah, indeed! It was probably too simplistic to just say "a bunch of text" 😂

I would do that myself, but now we have another things on the table.

I understand that these kind of things are the last of your priorities, specially at early stages of dev. I'll try to get a closer look at what you guys did so far and help you if I can! 👍

cesarecaoduro commented 2 years ago

Is there any update on this matter?

agviegas commented 2 years ago

Hi, we haven't advanced in this matter because we are not familiar with PowerBI. If someone that's familiar with it sets up a Three.js project inside PowerBI, we'll gladly help on the IFC.js part. 🙂

MichaelVictoriano commented 2 years ago

I believe that something like this, https://apps.provingground.io/docs/tracer-v1-0-documentation/tracer-ifc/

cesarecaoduro commented 2 years ago

It should be very straight forward to implement at least the viewer, but I’m facing some issues reported in this forum post

https://community.powerbi.com/t5/Developer/Adding-threejs-to-a-custom-visual/m-p/2179610#M32804

cesarecaoduro commented 2 years ago

I have managed to get three working...now i need to get the IFCLoader to work too :) image I am getting some compilation error image

cesarecaoduro commented 2 years ago

I have managed to fix it and to call the ifcloader. Now based on what the powerbi community is saying, there is a problem with cors call and we need to place the wasm and the IFC file on a server that allow cors from * origins... https://community.powerbi.com/t5/Developer/Adding-threejs-to-a-custom-visual/m-p/2181516/highlight/true#M32830 Is something you guys want to have a look at? maybe is just a matter of having your wasm to compile and deploy to an heroku backend (a bit dangerous thou). Another option that I still need to investigate, is the possibility to run a local webserver (express or aspnetcore) that serves only the static files.

I have managed to upload my testing environment on github on this repo https://github.com/cesarecaoduro/pbi-ifc

agviegas commented 2 years ago

@cesarecaoduro IFC.js is a JavaScript library, not a SaaS 🤔 The problem of CORS is something that is coupled to the infrastructure of each project, and IMO that would be going out of the scope of the library. As I mentioned in Discord, I think there are 2 options:

  1. You set up your infrastructure / backend so that it support cors.
  2. You try to use an iframe, which is what we did in the twitter example.
agviegas commented 2 years ago

You could perhaps try to get the wasm files from unpckg. Check out this comment. I'm closing this, as I believe that the remaining issue is a matter of serving the file, not with the library itself 🙂 cheers!

KEYPULL commented 2 years ago

Me las arreglé para hacer que tres funcionen... ahora necesito que el IFCLoader también funcione :) Recibo un error de compilación imagen imagen

Una pregunta, como puedo cargar y hacer pruebas con el Power BI

KEYPULL commented 2 years ago

Buenos días @cesarecaoduro estoy impresionado con el trabajo que has logrado, sobre PWBI + BIM, me gustaría saber como puedo cargarlo e intentar colaborar con lo que pueda. (no soy programador o desarrollador).

agviegas commented 2 years ago

Hey @KEYPULL , please keep the conversation in English so that everyone can follow it. You can use Deepl to make the translations.

PowerBI is out of the scope of this library. You can check out their documentation to see how it works. Please, if you have any issues, open a new issue. Keep in mind that IFC.js is a JS library: it means that it's meant to be used by developers, not by end-users. If you want to get started with it, maybe you want to take a look at the crash course we just released, or to some basic web-dev tutorials (examples are Mosh Hamedani and Maximilian Schwarzmuller). Cheers!

KEYPULL commented 2 years ago

good morning Antonio:

sorry for my clumsiness. If you could answer me I would appreciate it. I've been watching your webinar, you said that to program IFC.JS with the course you take, you don't need any programming knowledge. I have signed up (I have written my email, in the IFC.JS courses ($100), to be notified when there is one, but I have not had a response). I have also found one in which you teach in BIMRASS.($200) and I don't know if it is the same as the one you teach in IFC.JS.

Basically it is to know if with 0 knowledge I can learn, and which one is better.

El lun, 9 may 2022 a las 20:03, Antonio González Viegas (< @.***>) escribió:

Hey @KEYPULL https://github.com/KEYPULL , please keep the conversation in English so that everyone can follow it. You can use Deepl to make the translations.

PowerBI is out of the scope of this library. You can check out their documentation to see how it works. Please, if you have any issues, open a new issue. Keep in mind that IFC.js is a JS library: it means that it's meant to be used by developers, not by end-users. If you want to get started with it, maybe you want to take a look at the crash course we just released, or to some basic web-dev tutorials (examples are Mosh Hamedani and Maximilian Schwarzmuller). Cheers!

— Reply to this email directly, view it on GitHub https://github.com/IFCjs/web-ifc-viewer/issues/39#issuecomment-1121466918, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYEXPEM7E7N54P72IRPRNXTVJFOQTANCNFSM4XH75SMA . You are receiving this because you were mentioned.Message ID: @.***>

agviegas commented 2 years ago

Hi @KEYPULL. Please, can you write to me in Discord directly (my user is ansoni#0001) or send another email to ifc.js.contact@gmail.com? This github issue is not the right place to have this conversation. Thanks in advance. Cheers!

yash-td commented 1 year ago

Any Updates on the cors issue when using Ifc.js for a custom power bi visual? I get the same error like yours @cesarecaoduro. Were you able to solve this? I tried using the wasm files from unpkg, still the same error!

agviegas commented 1 year ago

Hey @yash-td the CORS problem is not a problem of our library: it depends on the way you serve the wasm files (e.g. did you try using a simple Firebase server?). Nevertheless, we are aware that this is a topic of general interest. We plan to release new documentation this summer with a lot of tutorials, and one of them should cover this.

In the meantime, let me ask the team, perhaps we can set up a simple example quickly to illustrate how to achieve this.

yash-td commented 1 year ago

An example on this would really help, thank you so much. @agviegas