I am trying to rotate a series of circles with the rotation angle of each circle is given in a list (I am using Dynamo for Civil 3D).
I’ve used Geometry.Rotate with:
・input geometry: series of the circles
・origin: the center point of each circle
・axis: one of the diameters of the circle
・degrees: degrees are given in a list
After executing the script, all the circles rotated with the same rotation angle (the first value of the list?). How can I rotate multiple objects with its corresponding rotation angle with Geometry.Rotate?
I got Problem statement - But dont understand few stuff, what is the output of “Vector.ByTwoPoints” and how you go the angle in .csv file.
your complete problem occurring in these 2 nodes only.
The output of “Vector.ByTwoPoint” is the vector determining the “axis” of “Geometry.Rotate”. : I want to rotate each circle around its predetermined diameter line. The “start” of “Vector.ByTwoPoint” is the center of each circle, the “end” is the start point or end point of the predetermined diameter line.
how you go the angle in .csv file: the rotation angle is given in a .csv file (result of experiment), so I used “Data.ImportCVS” and “File Path” here.
can you please share the updated .dyn file
because in your previous script (script image) “Circle.ByCenterPointRadius” will always make circle in XY- plane, not along the vector of the line,
You can test this case by creating a simple line by point (0,0,0) and (10,10,10) and run your test
Circle will never rotate along its diameter axis (Except X or Y axis because circle created in XY-plane)
Till now i got to know that, you have few line and you are creating circle at the center of the lines and you wanted to rotate the circle along the line axis (not along the diameter of the circle) at some angle.
and you are getting correct result as per given input.
then in this case, there is a logical error in the script.
Thank you so much for your reply.
Please find the .dyn and the sample .dwg at the link below. https://drive.google.com/drive/folders/1kODPNPuur59NKKX0oxVcVR4cZamZpFGM?usp=sharing
In the .dwg file, all circles rotated but at the same angle. I want each circles to rotate at its corresponding angle given in the list.
I am sorry if I made you confused with the way I explained the problem.