icon

Allplan Fórum

Vector3D.CrossProduct() on Allplan 2025 [Vyřešeno]


Hello everyone,
I work on Allplan 2025
I got a problem with the method Vector3D.CrossProduct()


vector_x = AllplanGeometry.Vector3D(1,0,0)
vector_y = AllplanGeometry.Vector3D(0,1,0)
cross_product = vector_x.CrossProduct(vector_y)
print(str(cross_product))

Unfortunately, the result always is None for any vector pair.
Does anyone have any ideas?
Thanks!
Tan

Show solution Hide solution

CrossProduct is a mutator method. It does not return a new vector instance but rather modifies the vector that calls it (in your case vector_x is modified).

Hope this helped

CrossProduct is a mutator method. It does not return a new vector instance but rather modifies the vector that calls it (in your case vector_x is modified).

Hope this helped

Hello guballplan.
It's my fault
I didn't notice the document. It is written clearly.

Formula: Va = Va x Vb
Va is this Vector

Thank you very much!
Tan

Hi,

As guballplan saied, because it doesn't return anything cross_product will be None.

but

vector_x.CrossProduct(vector_y)

will modify vector_x as => Vector3D(..., ..., ...)

Best
Christophe

PS: here the documentation