Orientation of ChainSelection

Orientation of ChainSelection

ihryshchuk
Explorer Explorer
545 Views
3 Replies
Message 1 of 4

Orientation of ChainSelection

ihryshchuk
Explorer
Explorer

Hi. I am using Fusion360 Python API and i have some questions. Could somebody help me, please?

I have a ChainSelection, and I am wondering if I can get orientation of the chain (e.g. clockwise or counterclockwise) with API? In the description of `isReverted` field is said that for internal pockets red arrow should point counterclockwise, for other geometry - clockwise. But as I can see - in the API I can only get `isReverted` property. Does it mean that if I want to know the direction - I have to get all edges and calculate cw or ccw manually?


And the same in reverse: if I want to create a ChainSelection in ccw - should I sort edges by ccw manually, and assign them to `inputGeometry`, or I just can mention somehow, that I want to get ccw chain, then give list of edges to `inputGeometry`, and Fusion will automatically do it?

Also, one additional thing: as I understand - the direction of chain is also dependent on the normal of plane, where edges are located. For example if edge is a circle, and its normal is opposite to normal of Setup WCS - the direction of chain also will be the opposite. Do I understand it correcly?

Thanks in advance

546 Views
3 Replies
Replies (3)
Message 2 of 4

kandennti
Mentor
Mentor

Hi @ihryshchuk -San.

 

I don't know if this will be helpful, but I made a Pocket2D here before, using surface boundaries and adjusting isReverted.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/is-a-curve-reverted-or-not/m-p/12203525#M1... 


It would be a little easier to understand if you could publish the f3d file.

Message 3 of 4

ihryshchuk
Explorer
Explorer
Thank you for your reply. I found useful information by your link. So, as I understand - it is impossible to find out the direction (clockwise/counterclockwise), and it must be calculated manually
Message 4 of 4

MichaelT_123
Advisor
Advisor

Hi Mr. Ihryshchuk,

 

The concept of clockwise/counterclockwise, although omnipresent in our daily lives… has no grounding in pure 3D geometry. In order to function, the latter must be enhanced by 1D directional vector; we "palefaces" ("bladawce" as named by Stanisław Lem) call it a point of view.

In cases of pieces of machinery, IRobots, CNCs, or Artificial Intelligences the spin direction will be determined by their foundations, tool direction, place of servers residences (Los Angeles, Beijing, Bengaluru, Moscow, Berlin, Pyongyang, etc.)…

It is not difficult to discover that any clock's hands circle in clockwise and counterclockwise directions … at the same time.

How to find out, for a given point of view … is it clockwise or counterclockwise?

Project a view vector on the 2D profile plane (slight modification if it is 3D), get from it vectors of two successive points on the profile perimeter ( can be an open curve also) of which the cross vector sign will show … direction of a profile/curve flow … relative to the point of view.

 

 PS.

"Bladawiec aka pale-faced": i.e. man: an unsympathetic, slimy creature, a combination of protein and water, full of tangled tubes inside, secreting foul-smelling body fluids. Also called Homos Anthropos, in robot mythology, he functions as a criminal with which robot mothers scare their naughty offspring. The pale man will stop at nothing to satisfy his dark instincts: he can even deliberately steal the key to wind up an innocent child.

Further references in: "Fables for Robots" by Stanisław Lem.

 

MichaelT
0 Likes