How to add geometries from latest version of three.js in forge-viewer? - autodesk-forge

I am trying to add customized geometry in forge-viewer, I am facing following issue:
The forge viewer I am using is 4.2.* , which uses THREE-R71. (All versions of forge-viewer uses THREE-R71).
The Customized Geometry I am trying to add in forge viewer is from THREE-R94. It throws exception:
THREE.Object3D.add: object not an instance of THREE.Object3D
I tried to upgrade the scene as : viewer.impl.scene=new THREE.Scene()
(THREE-R94)
But the renderer is still from THREE-R71, so renderer cannot render the scene.
Is there any way to add geometries and objects from latest threejs in forge-viewer?

You can't. Threejs has made breaking changes in many of its version upgrades, making them incompatible.
We have some forge articles that say otherwise, like this:
https://forge.autodesk.com/blog/how-add-newest-threejs-features-forge-viewer
It's possible to use different versions, depending heavily on which version, but almost all changes break the code compatibility.
I was unable to use different versions with the methods and objects I wanted.
If you don't want any trouble, stuck with r71 and extend the methods you need yourself.

Related

How to move OVRPlayerController and OVRCameraRig together?

I am working on one Oculus project in that I am getting the following issue:
The OVRPlayerController is not moving along with OVRCameraRig. I am using the Unity version(2019.4.15f1) and OVRPlugin version (1.66.0).
I have added the CharacterCameraConstraint script to my OVRPlayerController but still I am getting the same issue.
Can anyone tell me how I can move the OVRPlayerController and OVRCameraRig together?
Thanks in advance.
You can install latest unity version 2020 and import Oculus integration V34 in Unity asset store.
Create a empty scene and create plane and place OVRPlayerController over the plane.
OVRPlayerController : Allows the player to move around in the vitual environment.It includes components and child objects that are necessary for 3D control. It includes OVRCameraRig prefab to serve as the VR camera and is attached to a character controller.

Errors after upgrading to forge viewer version 7.55

we are experiencing errors in the latest version (7.55) of the forge viewer. When loading a Revit model, the following error displays in the browser console:
Failed to load model: New Construction. Error code: TypeError: e.target.clone is not a function
This is an SVF2 model that was translated using the generateMasterViews flag. New Construction is one of the master views names in this particular model.
I had a hunch this was due to the new update, so I downgraded our version from 7.55 to 7.54. After downgrading the issue no longer occurred. Was there a breaking change in 7.55 that we need to be aware of? I did not see anything in the changelog
Forge Viewer uses Semantic Versioning so none of the "minor" version updates should be breaking, but it could be some regression. In the call stack I see you're using AggregatedView. Have you tried loading your model in a simple Viewer3D or GuiViewer3D instance instead of that one? And could you share more details about how you're initializing the viewer and loading the models into it?

issue with setThemingColor

Having some issues with setThemingColor not really producing coloured output.
viewerApp.myCurrentViewer.setThemingColor(
7714,
new THREE.Vector4(1, 0, 0, 1)
);
That dbId is a valid id in my model, I've tried to clear the colours before but that does not change anything.
I was using a newer version of Threejs that I installed through an ES module, using the forge viewer version of Threejs instead it works perfectly. It seems even matching the revision level to the one used by forge doesn't resolve it, probably they are using a customised version.

Custom property (Identity Data) in Revit model got translated wrong

We are experiencing troubles when using the model derivative API to translate and extract properties from a Revit Model.
As the screenshot implies, we have a custom property under Identity Data. But after translation its under Mark (the property on top of it).
It's a model created in Revit 2018.
Is this a bug?
kind regards
This issue has been logged as RVTLMV-4 in our internal case system to our engineering team to allocate time to investigate what happened yesterday and they're working on it. We will get back to you A.S.A.P. once there is any update. Apologizing for any inconvenience had caused to you.
I am seeing this issue too - custom properties appear to be coming through with "Cost" as the PropertyName. The ModelDerivative translation process seems to be the source of the bug. Happens on Revit 2018 or Revit 2019 model.
Is there any chance this issue can be escalated?
Our (live) Forge application relies on custom properties being correctly named and this current API release has broken our application when new models are uploaded.
Image of Model Derivative JSON
Image of Properties in Revit
#Eason Kang: FYI
I met this issue too. However, this issue happened when the translated field was not in the top of the Properties list. When this field was in the top, translation succeeded.
Hope this could give more information to your team.
I attached the image as below. First screenshot, it translated correctly. The 3 following screenshots, it translated wrong

Flare and ActionScript error

I am trying to compile this sample program but I am brand new to Flare and ActionScript. Here is the DependencyGraph example that I am trying to compile: http://flare.prefuse.org/apps/dependency_graph.
The error I am receiving right now is:
Access of unidentified property App
Are there certain packages or project files that I will need to import or add to the source code in order to fix this?
Looks like you need to grab this class as well:
http://flare.prefuse.org/src/flare.apps/src/flare/apps/App.as aside from that it looks like the imports are all coming from packages in flare and should be included in the flare swc file.
Edit
Okay so starting from scratch I was able to get Flex 3.4 SDK playing nicely with the flare demos:
Download zip http://sourceforge.net/projects/prefuse/files/flare/alpha-20090124/prefuse.flare-alpha-20090124.zip/download
extracted flare.apps to my desktop and build/flare.swc to my desktop
In FlashBuilder/Eclipse import a project (existing project) select the flare.apps folder on the desktop.
replace the existing library reference to bin/flare.swc with the one from the desktop. When I imported the project it had in the project properties->ActionScript Build Path I selected the bin/flare.swc entry it had and hit remove, then hit add swc and browsed for the one extracted to my desktop from the flare.zip.
Compile/Run
That all worked great with Flex 3.4 (Flare is out-dated if you haven't noticed). Upping my SDK to 4.6 I had to replace JSON (ambiguous due to a new one in the default package) with com.adobe.serialization.json.JSON. With Flex 3.4, did you see any errors relating to JSON? I don't have 3.4 on my system so I am using 3.6 right now and see many errors regarding the ambiguity of JSON. With regard to 3.4 I had no JSON errors, think the Class may have been introduced around when 3.6 was put out so that makes sense too... the issue is if you import JSON from some package but then it also has JSON in the default package, it doesn't know which one you want to use, if you use the fully qualified class name wherever you were using the shortened version it will remove the ambiguity so where you had JSON.decode just replace with com.adobe.serialization.json.JSON.decode, believe the one in the default package is the new one and doesn't match up to the old one's interface (method names) 100%.
After building with 4.6 it's a mixed bag... I see the loading bar and all the lines between dependencies but not seeing the labels themselves, my guess is something to do with the change in the font/text rendering engine between versions is making a difference though I'm not sure immediately how to resolve that. No errors compiling/running though.
Edit 2 good deal just had to add this to the font embed for it to work in 4.6
,embedAsCFF='false'
[Embed(source="verdana.TTF", fontName="VerdanaCust",embedAsCFF='false')]
Let me know if you try out these steps and still have issues, or if this helps you resolve your problems.
Edit 3
Also added you on my gmail alternatively can chat on SO directly to keep any relevant information connected to this QA