Hi everyone, I would love to know how to measure the angle in space of these tubes based on grasshopper, please guide me
Thank you very much.
do you have lines with same startpoint ?
or do you only have cylinders ?
maybe post some sample data.
There is an Angle component.
please be aware of Radians (not Degree) output.
There are conversion components Degree Radians
provide some sample data to get more info.
kind regards
tom
Thanks Tom, I really appreciate your help.
My goal is to measure the angle of 3 vectors A-B-C with each other.
I would like you to guide me how to
- Get the starting and ending points of the pipe
- Draw a vector through these 2 points (or draw a straight line)
- Measure its angle with the lines (the remaining vectors)
THANKS SO MUCH.
Just note that it only works with 2 pipes. You’d have to make amends to have it work with a random number of pipes sent to it.
Thank you so much, I appreciate it.
assuming those tubes have a straight interior Edge-seam like standard Pipes generate in Rhino, the following should give you the angle between those Edges, which are treated as if they were Vectors:
Angles betwen Pipes.gh (21.2 KB)
just note that, because we are not providing a Plane on which the angle measurement takes place, the angle is measured on the plane on which the Vectors lie (like indicated in blue for angle 0-1 and in red for angle 1-2)
if the straight interior edge seam is not a thing, because from your screenshot looks like on the common-end your tubes are somehow sliced:
if you are 100% sure their opposite side is perfectly perpendicular to their axes, you might rely completely on the Normal (Z-axis) of the plane on which those circles lie:
easy to check: they must be Closed (A) and they must be Planar (B), and they must be valid Arcs built on a Base Plane (C)
if all the above is good, you can just use the Plane as Vectors, because it automagically extracts the Plane Z vector:
a note on this: I don’t think it will happen, but it might be that an Arc is recognized to lie on the opposite plane (Z oriented in the opposite direction) ? in that case (that is not shown in my picture because it’s not happening to me) you will need to Reverse that vector using the dedicated Reverse component
Angles betwen Pipes_2.gh (16.7 KB)
if instead of posting a screenshot made of pixels you would post a geometry in any format, this would be very much easier for everyone
Nice catches. Even if the ends are sliced, worst case the Brep is a polysurface instead of having one seam, and you just have to capture one of the linear curves (it doesn’t matter which one) for vector comparison.
I intially thought it was important to have the vector direction correct, but this isn’t true since Angle gives you both interior and reflective angles. The problem becomes knowing which of the two was intended.
I do work with Pipes A LOT, so when someone says “Tube” it triggers a sort of cerebral chain-reaction of events very much like Precogs in Minority Report
[I’d be the one on the left ]
Do you want to show me how Angle Dimensions (Lines) are used?
something like this
Angles betwen Pipes_dims.gh (40.8 KB)
I made it simple (cheated) because all pipes Origin on {0,0,0}
Thanks.
Thanks, I lost the Angle Dimension (Lines) tool, I use Rhino 7, can I replace it with the Angle Dimension tool?
Angle Dim V1.gh (50.2 KB)
It doesn’t work in Rhino V7. Can you help me?
The standard Angular Dimension under Display > Dimensions
should work just fine in Rhino7
Angle Dim V2.gh (60.5 KB)
But you would need to find the intersection point of the pipe axis.
Oh, surprisingly, it can be expressed relatively well, thank you very much.
The question is, suppose these 3 lines do not coincide at the origin at (0, 0, 0), how to find its intersection point, please help me again…
This was already demonstrated in my first solution.