Hi dear community,
I am attempting to utilize vectors to construct a PythonPart. My goal in the current step is to create a collection of 3D-lines (the lines are axis for the reinforcement), within the coordinates of the red plane, as you see in the screenshot.
# get the x-vector of the plane vector_x = plane.CalcPlaneVectors()[0] # get the y-vector of the plane vector_y = plane.CalcPlaneVectors()[1] # get the x-vector in particular length and direction vector_p0_p1 = vector_x vector_p0_p1.Reverse() vector_p0_p1.Normalize(length1) # get the x-vector in particular length and direction vector_p1_p2 = vector_y vector_p1_p2.Reverse() vector_p1_p2.Normalize(length2) # create the point by moving the point p1 = AllplanGeo.Move(p0, vector_p0_p1) p2 = AllplanGeo.Move(p1, vector_p1_p2) # create a line line_1 = AllplanGeo.Line3D(p2, p1)
If I follow this structure and create more points and lines, they do not appear correctly and exhibit strange behavior. I am not sure whether it makes sense to provide the entire example, as I have a feeling that I might be generally doing something wrong.
I would be really grateful if you could first answer the following general questions:
Question Nr. 1:
why I cant create a new vector by creating a new instance?
# it doesnt work vector_y_normalized = vector_y.Normalize(200) # it works vector_y_normalized = AllplanGeo.Vector3D(vector_y) vector_y_normalized.Normalize(200) # it works vector_y_normalized = vector_y vector_y_normalized.Normalize(200)
Question Nr. 2:
Do exist other functions to copy/move elements along the vector?
Question Nr. 3:
What it would the proper/easier way to do the step with creating 3D-lines in a coordinate system of a plane?
Thank you in advance for your answers.
Greeting
Taras Kozak