- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Change in arc start angle and end angle on 3DRotate.
I created an ARC, start angle 0, and end angle 90 degrees. Please refer to the below screenshot
Then I did a 3DRotate, from the start point of arc, about X-axis 30 degrees. I check the start and end angle it remains the same. i.e. 0 and 90 respectively. Please refer to the screenshot below.
Next I again did a 3DRotate from the start point of Arc but this time about Y axis, 30 degrees. On checking the start and end angle this time, it got changed to 49 and 139 degrees respectively. Please refer to the below screenshot.
So my question is, how come the start & end angle changed upon rotating it to Y axis, but not changed when rotating it about X axis.
I understand that there will be some mathematics behind this calculation, if someone can refer the behind the scene calculation it would be really great.
Please help me to understand this.
Thanks,
Yash
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
For an explanation see:
Object Coordinate Systems (OCS) in DXF
and:
About Arbitrary Axis Algorithm (DXF)
************************************************************
May your cursor always snap to the location intended.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
Thanks for the reply, but still I am not able to figure out this problem. I wanted to know the calculation for obtaining the start angle and end angle when the arc is rotated in 3D space.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
The Object Coordinate System methodology is somewhat unintuitive. It was originally designed for computers with far less resources. That notwithstanding, it is a well thought out and makes better sense when fully understood.
From your other post we can see that you are automating a task – what language/approach are you employing? All the AutoCAD programming APIs have functions to assist the translation process. If you are working outside of AutoCAD, you will need to write those yourself.
Clarification on the issue above will assist the effort to present good advice.
************************************************************
May your cursor always snap to the location intended.
- Marcar como nuevo
- Favorito
- Suscribir
- Silenciar
- Suscribirse a un feed RSS
- Resaltar
- Imprimir
- Denunciar
I am using JavaScript for this development, and I am working completely outside of CAD environment. Project is 90% JavaScript and 10% Java, but help from any programming language is good with me. So far i was able to calculate extrusion vector, below is the python code, hope it might help someone.
#rotList = normal vector to the plane from three points
extrution_vector = np.array(rotList)
if abs(extrution_vector[0]) < 1/64 and abs(extrution_vector[1]) < 1/64:
ax = np.cross((0,1,0), extrution_vector)
else:
ax = np.cross((0,0,1), extrution_vector)
mx = sum([i**2 for i in ax])**.5 #calculate magnitude of ax
ax = ax * 1/mx #scale ax to have magnitude 1
ay = np.cross(extrution_vector, ax)
az = extrution_vector