Overall space of an element not getting highlighted in the elevation view of Forge viewer - autodesk-forge

I am using forge viewer in IOS mobile application to view the model which is uploaded in the forge OSS bucket. I am extracting the multiple elevation views and plan views which are associated with the model(using .rvt file URN).
When I am trying to select the element in the elevation view, only the boundaries are getting selected and I can only select the element by clicking on the boundaries of the element. And in plan view the whole element is getting selected with its occupied space too.
Do anyone have any idea why the forge viewer is behaving like this for the different views which are extracted from the same URN?
OR
Is there anything which I need to do in the Revit file itself before uploading it to forgeenter image description here?
The expected outcome is, the element with its space should get highlighted in the elevation view of the forge viewer. But only the boundaries getting highlighted in the elevation view of forge viewer. As shown in the image, the plan view element is getting highlighted properly but in elevation view elements are getting highlighted with boundaries only.

Related

Autodesk Forge Viewer don't automatically align the model to the center of the viewer

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.

crop particular room/area from the forge viewer

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()

Exporting markup data in RVT/CAD format

I am using Autodesk Markupscore Extension to draw markups on 2D view. I want to create a separate rvt or CAD file for the drawn markup, which can further be used/opened in Revit soft. So the newly created 2D view(rvt/CAD) will contain only that part of 2D view which is inside the drawn markup, How can I achieve this?
I can't comment on the Revit specific piece (for that I would suggest that you check out the Revit discussion forums) but if we're talking about where Forge can help, I see two options:
you could have a Revit plugin running in the Forge Design Automation service, accepting a Revit document and some coordinates of 2D markups on the input, removing design elements that are outside of the 2D markups via Revit APIs, and generating a new Revit document on the output.
you could customize Forge Viewer to hide or occlude the parts of the 2D drawings you don't want to be visible, for example, by "hiding" them (making them semi-transparent), by changing their color, or by overlaying them with another content such as a blank SVG rectangle.

Autodesk Forge Viewer - show markups all the time

We are using the Forge viewer to show both 2D and 3D models. For the 2D models, we would like to be able to show markups all the time, like you can with the viewer inside BIM360.
I tried the solution mentioned here: Forge Viewer: Show bottom toolbar and markups at the same time - but I have not been able to get that to work. It seems like when I call:
Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(viewer)
It hides the markups.
How is this done in BIM360? - are they using a custom viewer, where this has been enabled somehow?
Unfortunately I was able to get it to work with:
Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(viewer)
See live sample here:

Plan from Revit becomes a picture in forge viewer

So when I export my Revit file to the Forge Viewer the 2D plan I want to look at does not have any selectable elements because it somehow was exported as a picture.
It is only my assumption that it was exported as a picture since it becomes blurry when I zoom in. Is this a known issue or does my plan need a special property to be able to be translated to forge properly?
Using a demo file everything works perfectly but using a file coming from a different source does not seem to work properly
There are a few reasons for a view to becoming a raster:
uses shading, shadows, gradients, or sketchy lines.
is rendered.
contains an image.
uses point clouds.
contains a decal. (Includes Revit Annotation elements, such as section, spot, text, and etc.)