xBimTeam / XbimWebUI

Web components for xBIM Toolkit
http://xbimteam.github.io/XbimWebUI/
Other
190 stars 119 forks source link

How to convert ifc file to 2d file and show with wexbim file on Viewer #402

Open umarone opened 1 year ago

umarone commented 1 year ago

Hi Everyone. I have created the wexbim file from ifc file. but my requirement is how to create 2d file from IFC file and how to show 2d file on XbimViewer along with wexbim file... If someone has some code he can share with me ... Urgent help is needed.

martin1cerny commented 1 year ago

Hi @umarone, this is not straightforward. What kind of 2D would you like to get? This is not supported as part of the open source Toolkit. But we have been looking at this a few times in past and have developed some functionality in our Flex platform:

Both of these require server side post-processing of the geometry. What it produces is still not a floor plan because it doesn't contain symbols for entities (like doors, toilets, lights etc.) We will work on this in the future.

Another option is to cut the model at certain height, set camera to orthographic mode and lock the navigation in XY plane. That is very close to plan viewing experience.

Orthographic vertical view: image

Clipping caps: image

SVG for custom interactions: chimni-dev_70192_149

umarone commented 1 year ago

svg+bim

hi @martin1cerny please see the attached image and tell me can we get this please...

umarone commented 1 year ago

In this picture i have a wexbim file , on the top left corner we have svg or 2D file and after that when we click on SVG file, a big dialogue is coming in front of us and we select parts of SVG then on the basis of selection we move to wexbim specific part. please guide

andyward commented 1 year ago

Sounds like two features in play here:

  1. Generate a 2D 'drawing' / footprint file from the 3D model using levels defined in the model. This would really be a 2D projection rather than a fully-fledged drawing so will be missing details as well as title blocks, scale, annotations etc.
  2. Render coordinated 2D files in the 3D viewer space e.g. https://github.com/xBimTeam/XbimWebUI/issues/294

These are linked but should be treated separately - your example above shows a drawing sheet that's clearly come from a BIM authoring tool (rather than generated) which you want to place in 3D space. So you'd only need the 2nd feature for this.

Can you be clearer on the use case (and the urgency)?

umarone commented 1 year ago

sir @andyward actually I have been given task to generate wexbim file and its spatial structure which I have done almost. but now i have to show svg or 2d drawing on viewer along with wexbim as i attached image. as well as urgency is concerned I have to complete this task as soon as possible...means may be in 1 week or 2 weeks

umarone commented 1 year ago
  1. 2D 'dra

sir any code example for generating 2D Drawing/footprint file from 3D Model using levels

andyward commented 1 year ago

Not in open Source. We have a commercial service to generate SVGs from levels in xbim Flex. See Martin's post.

There's a lot of work in what you're suggesting. You're probably going to need some help to achieve anything like this in 1-2 weeks as this capability just isn't in the webUI codebase. Is it a demo or a commercial product you're working on?

GeorgDangl commented 1 year ago

We've had a similar use case in a project once. The solution was basically exactly what @andyward mentioned, we generated SVG floorplans with metadata in the SVG elements, then overlayed that to the viewer (let the user choose between 2d and 3d) and basically just listened to click events on the SVG.

If there's a service in xBIM Flex, maybe check that out😀

andyward commented 1 year ago

I'd like to see a 2D overlay plugin in xbim WebUI open source - That shouldn't be a lot of work given the right WebGL knowhow (compared to drawing creation) and would open up a lot of use cases.

umarone commented 1 year ago

Not in open Source. We have a commercial service to generate SVGs from levels in xbim Flex. See Martin's post.

There's a lot of work in what you're suggesting. You're probably going to need some help to achieve anything like this in 1-2 weeks as this capability just isn't in the webUI codebase. Is it a demo or a commercial product you're working on?

Sir I am working in a software company and so preparing solution for their client...

umarone commented 1 year ago

project

Sir how you generate Svg Floorplanes, if you can guide me in detail or share some code for that please...

martin1cerny commented 1 year ago

This functionality is available as part of our platform: https://xbim.net/flex/