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

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

Open
umarone opened this issue Nov 25, 2022 · 12 comments
Open

Comments

@umarone
Copy link

umarone commented Nov 25, 2022

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
Copy link
Member

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:

  • Plain 3D cut at certain height - this is just single colour and we use it to cover the top of 3D cut so that walls don't have holes in them. This is just another wexbim file, so it can be used in the same way as 3D wexbim
  • Semantical cut - we consider IFC semantic in this case and produce SVG which contains all the identities of elements, so it can be used for user interactions.

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
Copy link
Author

umarone commented Nov 25, 2022

svg+bim

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

@umarone
Copy link
Author

umarone commented Nov 25, 2022

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
Copy link
Member

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. Possibility to load the 2D diagrams in XBIM Viewer #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
Copy link
Author

umarone commented Nov 25, 2022

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
Copy link
Author

umarone commented Nov 25, 2022

  1. 2D 'dra

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

@andyward
Copy link
Member

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
Copy link
Contributor

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
Copy link
Member

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.

@andyward andyward changed the title How to convert ifc file to 2d file and show with wexbim file on Viewer. Urgent help needed How to convert ifc file to 2d file and show with wexbim file on Viewer Nov 25, 2022
@umarone
Copy link
Author

umarone commented Nov 25, 2022

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
Copy link
Author

umarone commented Nov 25, 2022

project

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

@martin1cerny
Copy link
Member

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

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

No branches or pull requests

4 participants