I want to add hotspot sphere to a 3D .nwd model which has to be viewed in Autodesk Forge Viewer. Please suggest how hotspot can be added to .nwd naviseworks file.
There are a couple of ways to add hotspots to a model in Forge Viewer:
by adding custom "point clouds" into the scene: https://forge.autodesk.com/blog/3d-markup-icons-and-info-card
by adding custom 3D geometry: https://forge.autodesk.com/en/docs/viewer/v7/developers_guide/advanced_options/custom-geometry/
by overlaying the 3D viewport with HTML elements; the Forge Digital Twin sample code shows how you can compute 2D positions from Forge model coordinates, specifically in the IssueExtension
Related
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.
How do I load a 360 image viewer using forge viewer. One approach I tried was by creating a sphere with image as texture and add it to the overlay scene. Using this, I was able to load a 360 image but I'm getting rendering issues (in some specific views sphere is getting culled).
Check out the skybox sample here and see that fits the bill for you ...
I'm loading multiple models into the viewer but the didn't keep their revit position. Is there a way to load a model at it revit position and rotation ?
Eason Kang solution did the job.
To align the model in their Revit position use globalOffset Property when you load the model inside the viewer.
Is it possible to get the real world coordinates form the original model in the Forge viewer? It looks like when a model is loaded into the Viewer it is placed with the center of the model in the origin of the Viewer.
viewer.model.getData().globalOffset is what you are looking for:
Aligning Coordinate Systems in Autodesk Forge Viewer
Afaik, the Forge viewer centres the model. In other words, the origin of the viewer coordinate system is the centroid of the model. The scale of the model remains unchanged. As a result, you can transform the original model coordinates to Forge viewer and vice versa simply by adding or subtracting the model centroid.
I would like to display some reference lines in the viewer that are not shown by default when a drawing is uploaded to Forge.
I know the exact end points of the lines as they were defined in the model, however, it seems that the model in the viewer is translated so that 0,0 is in the center of the bounds.
Is there a way to get the transformation matrix that was applied to the model, so I can align the coordinates of my reference lines with the coordinates of the model in the viewer?
Use viewer.model.getData().globalOffset