Tools to measure distances

Hi,

I need to know the distance between figures and props.  I know that the floor grid is about 3 feet (or is it 1 meter).  This is only good for aproximations and does not do anything for vertical distances or angular distances.  What I need is a yardstick that is not a part of a scene.  Also a compass for measuring angles would be nice.  Is there anything that might serve my needs?

 

Comments

  • https://www.daz3d.com/measure-metrics-for-daz-studio

    The grid is 1m squares. You can also, if you can't justify the plug-in, use a null, use the Align pane to centre (or otherwise match) it on the items in succession and use Pythagoras' Theorem on the Translation values to get the separation.

  • bradrgbradrg Posts: 522
    edited February 9

    Here's, a quick script I cooked up for you

    *Edit* I've moved it to the freebies section in case anyone else wants it. 

    Post edited by bradrg on
  • bstanlebstanle Posts: 30

    "Here's, a quick script I cooked up for you

    *Edit* I've moved it to the freebies section in case anyone else wants it."

     

    Thanks for the help!  I'll try the script to see how it works.

  • bradrgbradrg Posts: 522

    Let me know if you have any questions / problems. 

  • bstanlebstanle Posts: 30

    The script works well but the output is somewhat irritating.  The format of the number doesn't have to have so many decimal places.  For most practical purposes 2 decimal places is more than enough.  The ouptut of the number looks like 3.1415927..  3.14 would be more appropriate. 

    I am a retired programmer and can do the alterations myself.  What programming language is being used in DAZ scripts?  Also, how do you specify that only 2 decimal places are needed.  (This is an easy task in Ada, pascal, c or C++ of which I am familiar with.)

  • bradrgbradrg Posts: 522
    edited February 10

    That's odd- I specified 3 decimal places with the command- toFixed(3) . Works perfectly on mine. I'm running it on daz 4.10. Are you perhaps running an older version? I know for example that ie6 doesn't recognize that command, perhaps older versions of Dazscript don't either. Dazscript is really just javascript. 

    Here's an updated version. I used Math.round(Dist*100)/100 instead so that should work now. Cross fingers. 

     

     

    dsa
    dsa
    DistAngle.dsa
    2K
    Post edited by bradrg on
  • bstanlebstanle Posts: 30
    bradrg said:

    That's odd- I specified 3 decimal places with the command- toFixed(3) . Works perfectly on mine. I'm running it on daz 4.10. Are you perhaps running an older version? I know for example that ie6 doesn't recognize that command, perhaps older versions of Dazscript don't either. Dazscript is really just javascript. 

    Here's an updated version. I used Math.round(Dist*100)/100 instead so that should work now. Cross fingers.

     

    I suspected that it was JavaScript since it looked vaguely familiar.  I'll have to familiarize myself with some basic Javascript before I try something more sophisticated. 

    What I was trying to do was to make an inches version.  (Yeah, I know that the metric system is easier to work with.  The USA is very backwards in many things.)  I altered one line of your script.  What I was doing is this

    MessageBox.information( (Dist.toFixed(3)) / 2.54  + " inches ","Distance","","");

    The number to converstf centimeters to inches is 2.54 (plus more decimal point numbers).  Since the conversion factor is only accurate to 2 decimal places, the resulting answer is only accurate to 2 decimal places.  (I'm a stickler for accurate results and to say an answer is like this 3.1415927... is simply wrong!  an answer should be only like this 3.14).

    .

     

     

  • bradrgbradrg Posts: 522

    Javascript was easy enough to pick up-I also came from Pascal before I tried this, but navigating the Daz script libraries was another story altogether. There are holes all over the place, and not that much information available. 

    BTW, If you make any adjustments that you'd like to share. feel free to add an updated version to the linked thread above. 

Sign In or Register to comment.