I am trying to create an online Revit viewer using Autodesk Forge APIs. The task I am trying to achieve is to be able to edit colors of existing geometry and also add new geometry to the model from the browser. Does anyone know how to do this, where I can get started, or if this is even possible?
Yes, you absolutely can edit colour and material of existing model geometry and aggregate models. I believe Philippe's gallery sample provides extensions that do both:
https://github.com/Developer-Autodesk/ng-gallery
If not, another of the GitHub samples does.
You should also check out the cloud and mobile DevBlog.
Here is a sample that edits materials within the Forge Viewer scene:
Here is an article on adding Forge-translated OBJ models to a scene:
Full model aggregation is discussed here:
Keep in mind the viewer is based on three.js, so to do things like adding custom meshes to the scene, it's pretty similar to what you would do in three.js. However your meshes will not be detected by the viewer selection logic, some extra work would be needed if you want that.
You can take a look at those two extensions for examples of adding meshes and changing material colors:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.