6
$\begingroup$

let's just say we have a sloping level, like a ceiling. Then we have objects, like cubes, that hang from the ceiling. I wonder if there is any simple way to see the distance between the roof and the cube. Sure, i can measure it, but if there are, say, 10,000 cubes, measuring and calculating every distance doesn't seem nice. I almost know it's not possible, but I had to ask... Below is a picture that may somehow explain the problem. Thank you.

enter image description here

$\endgroup$
2
  • $\begingroup$ If all the cubes are the same height, it's pretty simple trigonometry. If you have say, 4 different possible heights for cubes, and all 4 cubes are at one of those levels, you just have 4 simple trigonometry equations to do $\endgroup$ Commented Mar 17, 2022 at 15:29
  • $\begingroup$ Basic trigonometry, yes. But if the ceiling would be 8m high and the size of the ceiling would be 7m x 8m. Then we hang from random points, for example, 5000 3x3x3cm cubes at different heights. Some points include several cubes. It would be nice if you could see the distance between the ceiling level and the cube by clicking on the cube. Like you can see objects location in transform panel. $\endgroup$
    – stnprkl
    Commented Mar 17, 2022 at 16:42

2 Answers 2

9
$\begingroup$

It is possible with Geometry Nodes:

enter image description here

What I'm doing is creating a line with two endpoints, then using a Raycast node to move the second vertex straight up until it hits a face in the target object. Be aware that the distance is calculated from the object's origin. This could be further improved to suit specific needs by moving the first vertex an appropriate amount (to measure not from the origin, but the top face, for ex). You could also measure horizontal distances (or any slant in-between) by changing the Raycast ray direction.

Most important part, the actual generation of the number is done with Ginyumbi's (free) Attribute Viewer node group:

enter image description here

To use, you can append the NodeTree "LaserMeasure" from the attached file below. You also need to download Ginyumbi's attribute viewer and append and link it as seen in the full node screenshot.

$\endgroup$
3
  • 1
    $\begingroup$ Wow! This is more than great! I think this Geometry Node stuff can really be weird some times. I really appreciate your reply. And how well done and beautiful that reply is. Thank You! $\endgroup$
    – stnprkl
    Commented Mar 17, 2022 at 21:15
  • $\begingroup$ You're welcome. What do you mean with "weird"? $\endgroup$
    – Kuboå
    Commented Mar 17, 2022 at 21:16
  • 1
    $\begingroup$ So many absolutely strange things you can do. Some times those node groups just make my head hurt. Powerful stuff. That's what I meant. Thanks again. $\endgroup$
    – stnprkl
    Commented Mar 17, 2022 at 21:26
1
$\begingroup$

Easy just use Measurelt add-on that is included with Blender. These are the steps to do:

  1. First enable the add-on from Preferences. enabling the add-on

  2. Click N key to show side menu and you find it in View tab.finding the add-ons

  3. Then enable showing the measure in the viewport.enabling to show the measure in viewport

  4. Select first the plane or the ceiling and then the cube and click Link under Add Measures.made the measure

The add-on will measure the distance between origins of objects in XYZ. The measure operation

I hope I helped you. The Measurelt docs

$\endgroup$
2
  • $\begingroup$ I'm fine, thanks for asking. Thank you for your answer. I know the MeasureIt tool, but unfortunately it doesn't solve my problem. I don’t need a origin point to origin point measure. Can't it be possible to change the x-axis angle in my case? How great it would be if there was a python wizard who could turn x-axix 20 degrees. $\endgroup$
    – stnprkl
    Commented Mar 17, 2022 at 16:41
  • $\begingroup$ I thought in python code that could help you, it is about drawing a line from a face of an object that be in your case cubes and choose then the direction up or down of the cube and when the line hit a surface the face of the plane it will stop in this case the ceiling is the plane and then measure the length of line. This could help with some edits and it could be an add-ons , you just need one to code it. $\endgroup$ Commented Mar 17, 2022 at 17:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .