I want to be able to filter my uploaded Revit buildings to display certain floors (e.g. basement, first floor, roof). I am aware that I can section the view from the toolbar but I want to section the view by tapping buttons (in my case, tree buttons: Basement - Floor - Roof).
I have been looking at this tutorial:
https://developer.autodesk.com/en/docs/viewer/v2/tutorials/basic-application/
But here I'd need to upload pre-sectioned models of all the tree views. Is there any other way, or would I go with the option from the tutorial?
You can control the section planes from the API, so you could create buttons that invoke the API and control how section planes are being set. Take a look at setCutPlanes method in the viewer API documentation.
Here is an article that illustrates how to use this method: Viewer setCutPlanes
You can also take a look at this blog post that expose how I used ThreeCSG (Constructive solid geometry) to perform boolean operations in the viewer and isolate walls specific to each floor: Boolean Operations in the Forge Viewer.
Hope that helps.
Related
I have an IFC file, with the model component located quite far from the origin (Due to using the correct actual coordinates of the project). After uploaded and translated to Forge, the viewer does not display properly at the location where the model is located. While the url thumbnail still shows the model fit to view. I attach 2 image as follow. Please help how to fix this.
Thumbnail when translation finished:
[1]: https://i.stack.imgur.com/lQTLR.png
Viewer result:
[2]: https://i.stack.imgur.com/hiqS5.png
Forge is usually able to handle BIM models "far away from the origin" quite well. I'd try the following:
check if this isn't just some strange camera preset; when the model is loaded, try double-clicking somewhere on the empty space; this should transition the camera so that it's covering the bounding box of the entire model
alternatively, open the Model Browser panel, and select one of the nodes in the tree to move the camera to it
the Forge Model Derivative service allows you to switch between different loaders when processing an IFC file (go to https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST > "Attributes by Output Type" > "SVF Output", and search for conversionMethod in the advanced properties); give it a try and see if you get better results
And finally, if none of the above helps, consider sharing your IFC design with us (confidentially; we will not share the design with anyone outside of Autodesk) via forge (dot) help (at) autodesk (dot) com so that we could debug the issue on our end.
We are using forge viewer(v7) in our web application.
Our requirement is to crop particular room/area from the forge viewer. For example, if we have shown a house model in the forge viewer then if a user select a kitchen(from menu or navbar) then the viewer should show only kitchen area (including all its objects like cabinets, burner, fridge, sink etc.) and all other objects/sections should be hidden. Similarly for bedrooms, baths etc. It will be just for viewing purpose at run time and not for any automation.
Does any help that how can we achieve this?
You could use the SectionExtension - mentioned here:
Create a section plane leaning against one object
Documented here:
https://forge.autodesk.com/en/docs/viewer/v7/reference/Extensions/SectionExtension/
This also has a function called setSectionBox(box) which might be best for what you want.
If you can figure out the extents of the room then you could pass those values to it.
Here is a blog post on getting room related information extracted to SVF:
https://forge.autodesk.com/blog/new-rvt-svf-model-derivative-parameter-generates-additional-content-including-rooms-and-spaces
The other option would be to find all the objects inside the given room and hide everything else. If there is a property for each object that specifies which room they are in, then you could do it based on that using Viewer.search()
I am using viewer 7.* and I wanted to cut the model so that I only get to see a level.
i.e. If I select level 1 as lower bound and level 2 as upper bound I only get level 1 element in the viewer.
I am able to retrieve level information from aec data.
Please Help me with this.
For set cut planes by levels, please check my example here: https://github.com/yiskang/learn.forge.viewmodels/blob/nodejs-level-sectioning/public/js/AdnLevelSectionPanel.js
And check this PDF which illustrates the sectioning concept: https://github.com/yiskang/forge-au-sample/blob/master/level-section/docs/Forge%20Viewer%20Sectioning.pdf
BTW, you can also load the Autodesk.AEC.LevelsExtension directly to view the model by levels.(required AecModelData for Revit 2018 and later)
Hope it helps
When viewing a model the view cube shows the orientation of the model in terms of top, bottom, left, right etc.
How would I display a compass rose graphic that would display in terms of North, South etc? Similar to Navis cube.
Note: Currently using V2.11 viewer.
Thanks
Update 2019-11-08: This whish list item, LMV-2837, has been implemented by our engineering team now. You can see the compass under the ViewCube with the viewer v7.6 by default!! Here is the snapshot:
=============
After v2.16, viewer has capability to display labeled axis lines, see here for more detail. But there still is no API available to add custom graphic to the viewer ViewCube in my experience unfortunately, in part because there has been no known user interest.
However, we are interested in your need for displaying custom graphic with the ViewCube and what benefits it would have for you. Could you share with us, please? If it cannot be shared publicly, you can sent those information to forge.help#autodesk.com.
P.S. Please don't sent any sensitive data or information of yours and your company to us.
our initial focus within our 3d views needs tweaking. Currently it is zoomed out ~x2 too far.
Can anyone get me started in the right direction for the controls for this?
I've tried changing the cropregion/ section box etc in the original revit model, but that hasn't made a difference.
A simple way to handle that would be to position the camera as you wish then save the current state and restore it upon loading the model, see my blog post about managing viewer states: Managing viewer states from the API