[x3d-public] [x3dom/x3dom] Best approach to visualize of dimensions (PMI data) (#913)

Andreas Plesch andreasplesch at gmail.com
Thu Dec 20 05:37:26 PST 2018

Here is an inquiry from github which seems better suited to the mailing


---------- Forwarded message ---------
From: theveloped <notifications at github.com>
Date: Thu, Dec 20, 2018 at 5:40 AM
Subject: [x3dom/x3dom] Best approach to visualize of dimensions (PMI data)
To: x3dom/x3dom <x3dom at noreply.github.com>
Cc: Subscribed <subscribed at noreply.github.com>

Does anyone have any experience with the visualization of model dimensions
and other model-related information in an x3dom instance? For our final
solution, we would like to show all the PMI data of an object as per the
examples of NIST:

To get started we would like to show the three dimensions of the bounding
box in a using leaders aligned to the bounding box:
[image: example of isometric aligned dimensioning]
Idealy of the the 12 edges of the bounding box we would constantly show the
3 perpendicular edges that are best visible.

Any idea's on the subject are most welcome. At the moment we are mainly
looking at:

   - NIST PMI examples
   info on the generation of the x3d)
   - cadjs <https://github.com/ghemingway/cad.js/tree/master> (uses threejs
   over x3dom)

For reference the bounding box dimensions/position of an x3d element can be
computed using the is currently computed using:

compute_boundingbox: function(part) {
        var node = part._x3domNode
        var volume = node.getVolume();

        var min = new x3dom.fields.SFVec3f();
        var max = new x3dom.fields.SFVec3f();

        volume.getBounds(min, max);

        var dimensions = max.subtract(min);
        var position = volume.center

        console.log("Dimensions: " + dimensions.x + " " + dimensions.y
+ " " + dimensions.z);
        console.log("Position: " + position.x + " " + position.y + " "
+ position.z);

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<https://github.com/x3dom/x3dom/issues/913>, or mute the thread

Andreas Plesch
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20181220/65b09aa0/attachment.html>

More information about the x3d-public mailing list