English 中文(简体)
angleToTrueNorth is null for Navisworks translated model
原标题:

When translating a Navisworks model to SVF, the value for angleToTrueNorth from model.getData().metadata[ custom values ].angleToTrueNorth is not available. Where else can I find it?

问题回答

Unfortunately, the angleToTrueNorth is Revit only, i.e., translating RVT directly with Model Derivative API, as far as I know.

model.getData().metadata[ custom values ].angleToTrueNorth

However, if your NWC/NWD model was exported from RVT using shared coordinates after last April, then we could calculate that from the nwModelToWorldTransform transform in the manifest.

"derivatives": [
{
    "name": "racbasicsampleproject.nwc",
    "hasThumbnail": "true",
    "status": "success",
    "progress": "complete",
    "properties": {
        "Document Information": {
            "Navisworks File Creator": "nwexportrevit",
            "nwModelToWorldTransform": [
                0.7986355100472902,
                0.6018150231520518,
                0,
                -0.6018150231520518,
                0.7986355100472902,
                0,
                0,
                0,
                1,
                -65.03805139774867,
                -61.70701987942478,
                0
            ]
        },

        ///...

Here is how we can calculate the angle to true north from the transform:

let model = viewer.getAllModels()[0];
let doc = model.getDocumentNode().getDocument();
let docRoot = doc.getRoot();
let docInfo = docRoot.children[0].data.properties[ Document Information ];

let angle = THREE.Math.radToDeg(Math.acos( docInfo.nwModelToWorldTransform[0] ))

let angelToTrueNorth = -1.0 * angle; //!<<< The angelToTrueNorth is clockwise, but the angle in math is counterclockwise

So, using the above nwModelToWorldTransform transform for example, the calculated angelToTrueNorth will be:

let angle = THREE.Math.radToDeg(Math.acos( 0.7986355100472902 )); //<<< 37°

let angelToTrueNorth = -1.0 * 37; //!<<< -37° = 323°

enter image description here





相关问题
angleToTrueNorth is null for Navisworks translated model

When translating a Navisworks model to SVF, the value for angleToTrueNorth from model.getData().metadata[ custom values ].angleToTrueNorth is not available. Where else can I find it?

What is a uploadable maximum file size?

I tries uploading 200MB Solid works format file, and it worked out. Don t consider request timeout issue. I will extend it to 30min How about 500MB or 1GB? If I can upload 500MB solid works file(or ...

Convert Urn from item version have problem

I m try to convert from item version get derivative urn but may be have something wrong. I know we are using base64 to encoder, but when I m try convert it have some missmatch: Example: I have item ...

Quick way to create central file in ACC from APS API

I m finding a API can easier to move around 100 files central download from diffrence project storage in local computer to new project, and what we are doing manual here is oepn Revit and save central ...

热门标签