Albatross 3D Forum Forum Index Forum Albatross 3D Forum
Albatross 3D Users Forums
 
Albatross 3D Web Site
 
 
 Register Register 
 Profile Profile    Log in to check your private messages Log in to check your private messages    Log in Log in    Memberlist Memberlist 
 

[SCRIPTING] How to traverse the faces in a given order?

 
Post new topic   Reply to topic    Albatross 3D Forum Forum Index -> How To
View previous topic :: View next topic  
Author Message
rael.delcon



Joined: 25 Nov 2008
Posts: 15

PostPosted: Wed Nov 26, 2008 2:51 pm    Post subject: [SCRIPTING] How to traverse the faces in a given order? Reply with quote

I'm trying to create an exporter for a sphere that will have to visit the vertex of a sphere in a given order:

I've seen from the other exporter scripts that the moveNext() method of the FaceIterator will drive me through the faces but It's not clear to me in which order.

I wanted to start from a vertex and get the list of faces that are incident on that vertex

I've downloaded the Functions Lists pdf, is there any other document I should read?

RD
Back to top
View user's profile Send private message
craouette
Site Admin


Joined: 26 Apr 2004
Posts: 652
Location: luxembourg

PostPosted: Wed Nov 26, 2008 3:45 pm    Post subject: Reply with quote

The order is the order of the faces...
In select face mode, in the right part of the window, you can see the face number if only one face is selected.
The doc is quite old... I can regenerate one, just tell me.
There is currently no way of getting the list of faces attached to a vertex... for one good reason, such info is not stored internally.

But it is possible to go through the list of face and for each face, go through the list of vertex indexes
But I can add a new function if you need it...

Craouette
Back to top
View user's profile Send private message
rael.delcon



Joined: 25 Nov 2008
Posts: 15

PostPosted: Wed Nov 26, 2008 7:27 pm    Post subject: Reply with quote

Thanks. Any documentation would be useful.

I don't want to burden you with more work, whatever you can make available will be helpful.

Maybe there's a way to get the adiacency list of triangles?

I'm not entirely clear on how the Iterators work, but from the vertex index I could be able to reconstruct the adjancency list.

I'll try to modifiy the raw exporter to emit the vetex index and will load them in an external program to test the algorithm.

BTW; speaking about scripting languages, have you considered integrating an existing scripting language in Albatross? My prefrence would be Lua (very popular in the gaming industry) but I've seen Python used more frequently in graphics program.

One last question. Are you considering publishing Albatross as Open Source? I think it wiould become quickly the number 1 Smile

RD
Back to top
View user's profile Send private message
rael.delcon



Joined: 25 Nov 2008
Posts: 15

PostPosted: Thu Nov 27, 2008 2:08 pm    Post subject: Reply with quote

Me again Smile

Please let me know if this is not the appropriate place!

I've done as you suggested (looking at the face number in the toolbar) and I noticed that the face and vertex numbering is exactly what I would need.

Can I safely assume that the numbering will not change if I don't change the topology of the object?

I mean, assuming I don't add or remove any vertex, will the numbering stay the same?

I would restrict the modelling operations to "sculpting" for the Vertices and "Modifiers" for the Mesh
Back to top
View user's profile Send private message
craouette
Site Admin


Joined: 26 Apr 2004
Posts: 652
Location: luxembourg

PostPosted: Thu Nov 27, 2008 2:21 pm    Post subject: Reply with quote

no, this is the right place.

Yes, numbering will not change if you do not change the topology.


I have thought of python or lua, and it is not a complicated task (tedious and long) but I will do it only if there is a request for it.

For the open source version, two points:
-If I ever stop to develop A3d, I will publish the source code;
-If somebody is interested in helping, I will provide the source code and support to him, but for the moment, I prefer to keep the control of what is going on...




craouette
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Albatross 3D Forum Forum Index -> How To All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group