Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Anonymous
622 Vistas, 4 Respuestas

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

yashchauhan281_0-1604989351888.png

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.

yashchauhan281_1-1604989506380.png

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.

yashchauhan281_2-1604989590017.png

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

 

 

 

 

Etiquetas (3)
SEANT61
en respuesta a: Anonymous

For an explanation see:

Object Coordinate Systems (OCS) in DXF

http://help.autodesk.com/cloudhelp/2016/ENU/AutoCAD-DXF/files/GUID-D99F1509-E4E4-47A3-8691-92EA07DC8...

 

and:

 

About Arbitrary Axis Algorithm (DXF)

http://help.autodesk.com/cloudhelp/2016/ENU/AutoCAD-DXF/files/GUID-E19E5B42-0CC7-4EBA-B29F-5E1D59514...

 

 

 


************************************************************
May your cursor always snap to the location intended.
Anonymous
en respuesta a: SEANT61

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. 

SEANT61
en respuesta a: Anonymous

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.
Anonymous
en respuesta a: SEANT61

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