Forge viewer displays elements blurry in 2D views and the Measure extension does not work on them - autodesk-forge

For some of our Revit models, in Forge viewer, 2D views are display blurry, no element can be selected and the Measure extension does not work on elements and only works on the dimensions and the titleblock.
Like this example:
here and here
But it should be like this
I have tested it with our viewer, A360 viewer and Autodesk Forge Tools vscode extension.

This is because 2D drawings or PDFs can contain both vector graphics and raster graphics (this article explains the difference between the two). The measure extension needs vector graphics in order to work properly.

Thanks to Petr Broz and his hint, by changing the Model Display Style in Revit side to Hidden Line instead of Shaded the problem was solved.
Like this.
Update:
The Shadows in Graphic Display Options, also should be unchecked.

Related

Revit decals on Forge Viewer

I've got a Revit model with decals applied on some surfaces. I uploaded the rvt model on Forge and translated using SVF2 format, but when I see the viewer no images are rendered on the decals, even if the objects are translated (I can see them on the ModelBrowser). Decals appear as green border rectangles, fully transparent:
Is it possible to view decal native images on Forge?
How can I integrate the images source file in the translation and make them visible in the Viewer?
Thanks
Unfortunately, Decals on Revit are not supported as of today. It’s logged as RVTLMV-509. In the meantime, you can still apply decals using that technique.

Trying to set the anti-aliasing property in autodesk forge (for 2D model/floor plan)

Trying to set the anti-aliasing property in autodesk forge (for 2D model/floor plan)
I have adding custom text geometry in my forge viewer but strigling to imrove it's quality.
Tried setQualityLevel (viewer3d.setQualityLevel(true, true)) to set the anti-aliasing on but it didn't improved the qulity/ or anti-aliasing does not seems to be working?
Attaching both images below.
with anti-aliasingoff
and anti-aliasing on
Thanks
I have checked the implementation of Forge viewer and captured some more screenshots to explain the problem again.This time I am capturing geometry created by the autodesk forge measurement tool so that we can target the real problem.
In Autodesk 3d viewer we have this option to enable disable the anti-aliasing
enter image description here
if we set it to on the result is below one. 
enter image description here
We can see edges are still jagged but not as compared to what results if we set it to off.  
Following is the result of anti-aliasing
enter image description here
Observe the red line and difference that anti-aliasing flag makes in the overall quality of the rendered data.
We need to solve the same problem in 2D version of viewer but unfortunately the option to toggle anti-aliasing is not present in 2D forge viewer.I know that the implementation of anti-aliasing present in Autodesk Forge is FXAA and not sure if there are any limitations for 2d in it? if not then can you please let us know if we can expect this future version of Autodesk forge ? Please let us know
Please note that according to the API reference the antialiasing is:
Not applicable to 2D.
That is most likely why the settings have no effect on your 2D drawing.

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.

Viewing Multiple .DWG files in viewer using Forge API

I need to see multiple .DWG in the Forge viewer in 3D format. There are some buttons on the viewer screen using which we can toggle between 2D and 3D views. On using those toggle buttons, currently we are able to see only one file at a time in the 3D view. Is there any option to view multiple files in 3D format?
You can use three ways to see multiple views of the same model.
Split the screen into multiple screens (SplitScreenExtension): https://forge.autodesk.com/en/docs/viewer/v7/reference/Extensions/SplitScreenExtension/
Place a view inside a div: https://github.com/Autodesk-Forge/viewer-navigation.sample/blob/master/www/scripts/model.js
Creating a div that renders a view within a DockingPanel.
I may have already answered this in your other Stackoverflow question, but, it is the same answer here. Try loading multiple models into a scene, using this blog post as your guide:
https://forge.autodesk.com/blog/loading-multiple-models-forge-viewer-v7
One neat trick with Forge Viewer, is the ability to load a 2D sheet inside the 3D world. The 2D sheet, if it comes from DWG, it will be vector lines, and if it's an old PDF, it will be image tiles.
Here's a video of combining 2D sheets into a 3D scene, into something more useful to your user...

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