# RevSrf component not accepting vector as axis

It makes no sense to me why revolution would not accept vectors as axis of the revolution. Is this bug or it’s just being overlooked?

I don’t think its a bug becuase some other components have the same requirement - although it is annoying. I usually use Line SDL.

Neither. A vector doesn’t have a location (it only has a direction). A line has both direction AND a location in space (which make a big difference for the center axis of a revolution).

To be clear: With a vector your only option would be to revolute around an axis starting from World 0,0,0.

// Rolf

1 Like

hmm, good point.

Although, in mathematics, more precisely applied geometry xUnitVector, yUnitVector and zUnitVectors have exact location in Origin of the coordinate system.

`Unit vectors may be used to represent the axes of a [Cartesian coordinate system]`(https://en.wikipedia.org/wiki/Unit_vector#Cartesian_coordinates).

Unit vectors are unique only in that they have the length = 1.0, but other than that, and as I already pointed out, they only have “one end” (the end tip) and no “starting point” (that is, if thinking of a vector as a “line” having “two ends” (which a vector doesn’t have, it only has a direction), but if insisting to think of it as a Line, which I often do (…), it’s assumed to start from World 0,0,0).

Nothing prevents you from assuming another “starting point” for a vector, but whatever starting point that would be, this point cannot be stored in the vector itself (you only add vecctors to vectors to traverse space), thus a lone vector is technically closer to a point than a Line.

// Rolf

1 Like

Yeah, I got that. I guess a matter of understanding and usage.

I’m gonna have to create my own component where unit vector is in fact a ray/axis starting from Oxyz

1 Like

Or use SDL, which is exactly that (plus option to modify the length).

// Rolf

You can play around with vectors in many ways. Here you have a Vector as a Line as a Vector as a … (keep on going):

VectorAsLineAsVectorAs___.gh (6.2 KB)

// Rolf

yes but I want unitZ to be with exact origin point, just drop them on the canvas and you know it’s unit vector with starting point. I don’t wanna use 10-20 components just for that.

Thanks for the suggestions though, highly appreciated

That’s what unit vectors do, they start from World Origin by default, just drop it on canvas.

// Rolf

Yeah, you would think so, but it’s not, if it was there should be no apparent reason to not use unit vector for revolution (RevSrf).

Also, for visualization of vectors, you have to add anchor point or it just doesn’t show the arrow

Of course. This is because vectors - by definition - doesn’t have a location in space, unless you impose a starting point for it. Which is why it can’t serve as a revolution axis, which must have a defined location in space. SDL solves this (where you can define a starting point) ending up with a “vector in space” ( = Line ).

// Rolf

UnitVectors have such point. So the origin should be in there inside that component.

Then it’s not a vector (by definition), it’s a Line (two defined end points).

// Rolf

It is not a line because it has direction. But in GH definition yes it is a line, unfortunately.

A Line has both location and direction. This is why the following connection works fine (convert Line to Vector):

GH doesn’t change the universal definitions of Lines and Vectors… It’s not GH specific.

// Rolf

But for RevSrf I need the inverse conversion and it doesn’t work.

Exactly. And this is because (what I have already pointed out) - A Line consists of more info than a Vector:

• A Line has both a Location and a Direction.
• A Vector has only Direction (but no Location).
``````Line(*Location* + Direction) ---> Vector(Direction)  // No loss of information
Vector(Direction)            ---> Line(*??????* + Direction)  // Lacking Location information
``````

Since the Vector doesn’t have enough info to define a Line, therefore a Vector cannot (implicitly) be converted to a Line.

// Rolf

It’s clearly a disadvantage of Rhino+GH when comparing with CATIA (which is in my opinion too parameterized for its own good but anyways).

There you select command Revolve and you can pick line/vector/axis, you can build them also on the fly, you can even select one of the global axes. Since we cannot select the axes in rhino one would at least expect to use a vector for revolution instead of the need to build a line just for that.

Maybe it is better not to create unit vectors with origin inside but instead be able to pick one of the global axes and use them in such manner.

I’ll just cross my fingers this gets to GH1/GH2 at some point.

With “origin inside” (explictly) then it is by definition a Line, not a Vector.

Universal definitions is got nothing to do with Rhino/GH.

// Rolf