Anim8or Community
May 24, 2013, 09:58:35 am
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: The v0.97d Preview is now available! See the "Anim8or v0.97 Preview" Forum for details.
Home
Help
Search
Login
Register
Anim8or Community
>
General Category
>
ASL Scripts
>
Question about GetEdgeIndex() function.
Pages: [
1
]
« previous
next »
Print
Author
Topic: Question about GetEdgeIndex() function. (Read 1566 times)
Claude
Full Member
Posts: 134
Question about GetEdgeIndex() function.
«
on:
March 12, 2009, 01:56:21 pm »
GetEdgeIndex() returns the index of a particular edge in a face. The value returned can be positive or negative. If it is negative the edge is reversed when the face is viewed with the vertices in a clockwise orientation.
If you have 2 quads sharing 1 edge and the 2 quads are facing the same way,then the function should return different result for each quad for the shared edge.One should be positive the other negative.
I thought I could use this feature to define if 2 quads sharing an edge, were facing the same way,but I'm unable to obtain any negative result.
Is it because I misunderstand how it should work or the function doesn't
work properly?
Thanks
Claude
«
Last Edit: March 12, 2009, 10:05:59 pm by Claude
»
Logged
Steve
Administrator
Sr. Member
Posts: 456
Re: Question about GetEdgeIndex() function.
«
Reply #1 on:
March 14, 2009, 05:46:53 pm »
The documentation and the implementation don't agree. GetEdgeIndex() currently returns a positive number for an edge, and a negative value if the face number or edge number is out of range. It seems like it's better to return 0 for an error and positive/negative numbers as indicated.
But I want to hear from people before I decide if I should fix the function or the documentation. I don't want to break too many existing scripts!
#097-028 - GetEdgeIndex() always returns a positive number.
Logged
Claude
Full Member
Posts: 134
Re: Question about GetEdgeIndex() function.
«
Reply #2 on:
March 15, 2009, 10:36:34 pm »
If it could be used the way I described,to check the relative
orientation of faces,I think it should be implemented.It
would be a lot easier then calculating the normals and
testing their dot product.
I see your point about backward compatibility,but there's
2 mitigating factors:
-this function isn't normally used in export and primitive script,
only in a limited number of command script;
-the correction seems to be easy enough:
abs(GetEdgeIndex())
Just a thought.
Hope it helps.
Claude
Logged
Kubajzz
Flying Platypus
Global Moderator
Sr. Member
Posts: 548
Little doggie ate my avatar...
Re: Question about GetEdgeIndex() function.
«
Reply #3 on:
March 16, 2009, 02:17:24 am »
Quote from: Steve
But I want to hear from people before I decide if I should fix the function or the documentation. I don't want to break too many existing scripts!
From my point of view it doesn't matter... If you change the function, I don't mind editing my older scripts the way Claude suggested. If you leave it as it is now, I don't mind either
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> General Anim8or Forum
=> ASL Scripts
=> Anim8or v0.97 Preview Forum
-----------------------------
Artwork
-----------------------------
=> Finished Works and Works in Progress
=> Anim8or Challenges
Loading...