abnormal behavior in polyhedron creation

View: New views
16 Messages — Rating Filter:   Alert me  

abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to create a polyhedron in K-3D from a text file which
containes vertecies , edges, and edge points. When I append he
points to k-3D, there is an abnormal face that is generated to the
screen, along with the points. the face seems to be connected to
randoms points that have been read in. here is a small segment of
what is going on:

def import_poly(poly,index,file,result):
        for n in range(vertex) :
             bob = linecache.getline(result, index)
             wordssplit = bob.split()
             points.append(k3d.point3(float(wordssplit[0]),
float(wordssplit   [1]), float(wordssplit[2])))
             point_selection.append(0.0)
             index = index + 1


All I have done is just append the points to k-#d, so this random
face that is created is really onfuding me. Is there any reason
this might be happening? Thank you.
--
TOMPSON LUBIN
"Life is a long lesson in humility."
 -James M. Barrie


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 5/5/08, TOMPSON LUBIN <tommy102@...> wrote:
> All I have done is just append the points to k-#d, so this random
> face that is created is really onfuding me. Is there any reason
> this might be happening? Thank you.

If you are just appending points, no faces should be drawn. Can you
attach a K3DMeshWriter to the output and send us the file?

Cheers,

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by Timothy M. Shead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bart Janssens wrote:

> On 5/5/08, TOMPSON LUBIN <tommy102@...> wrote:
>  
>> All I have done is just append the points to k-#d, so this random
>> face that is created is really onfuding me. Is there any reason
>> this might be happening? Thank you.
>>    
>
> If you are just appending points, no faces should be drawn. Can you
> attach a K3DMeshWriter to the output and send us the file?
>  
And/or send your complete script.

Tim


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Parent Message unknown Re: abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is the file that creates a polyhedron object from a text file
which
contains the number of verticies, number of edges, and list of
edges.
Attached is the python file and a sample file that it imports. As
stated before, when the polyhedron object is created, there is a
random face that is generated along with the points. Please feel
free to ask any questions is the code is unclear. Thank you again
in advance.
--
TOMPSON LUBIN
"Life is a long lesson in humility."
 -James M. Barrie



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

test_import.py (1K) Download Attachment
hand.bv (24K) Download Attachment

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 5/7/08, TOMPSON LUBIN <tommy102@...> wrote:
> Here is the file that creates a polyhedron object from a text file
> which
> contains the number of verticies, number of edges, and list of
> edges.
> Attached is the python file and a sample file that it imports. As
> stated before, when the polyhedron object is created, there is a
> random face that is generated along with the points. Please feel
> free to ask any questions is the code is unclear. Thank you again
> in advance.

Nothing wrong with your code. The problem is caused by a stale cached
triangulation of the default quad that is generated by
MeshSourceScript. I'm still tracking down the exact cause, but in the
meantime, you can ignore this: the face is not really there. The
problem should go away as you add faces.

Cheers,

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Parent Message unknown Re: abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In the second for loop where I try to add more then one face k-3D
crashes. Can you provide me with a way to add more than one face
to
the polyhedron object without the program crashing. I have
based my code on the polyhedron script and cannot find a
solution to this issue.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 5/7/08, TOMPSON LUBIN <tommy102@...> wrote:
> stated before, when the polyhedron object is created, there is a
> random face that is generated along with the points.

Fixed in SVN!

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by Timothy M. Shead :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

TOMPSON LUBIN wrote:
> In the second for loop where I try to add more then one face k-3D
> crashes. Can you provide me with a way to add more than one face
> to
> the polyhedron object without the program crashing. I have
> based my code on the polyhedron script and cannot find a
> solution to this issue.
>  
Again, you need to post your code.  Your first example doesn't generate
any faces.

Tim


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Parent Message unknown Re: abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When I try to add faces to the polyhedron object, k3d crashes when
I try to add more than one face. I think I might not be append the
correct information to the different arrays. Here is the code and
the sample input data. Thank you again for your help.

--
TOMPSON LUBIN
"Life is a long lesson in humility."
 -James M. Barrie



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

test_import_faces.py (2K) Download Attachment
hand.bv (24K) Download Attachment

Parent Message unknown Re: abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Currently I am writing a polyhedron import script using python.
The
problem that exsist is my inabilty to add more than one face. The
current
set up of the program is to read the number of faces and verticies
from a text
file, then the program will read all the points and edges of the
mesh, and from this, will create the polyhedron object. I can
print all the points
of the mesh to the screen, but when I attempt to add more than one
face, K-3D
crashes. My code is based on the polyhedron.py sample script that
is provided, and I am 95% sure at the code is correct based on the
sample polyhedron script. Is there any known issues with k3d that
I should know when creating polyhedron objects?

--
TOMPSON LUBIN
"Life is a long lesson in humility."
 -James M. Barrie


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 5/13/08, TOMPSON LUBIN <tommy102@...> wrote:
> crashes. My code is based on the polyhedron.py sample script that
> is provided, and I am 95% sure at the code is correct based on the
> sample polyhedron script. Is there any known issues with k3d that
> I should know when creating polyhedron objects?

Ah, sorry, I forgot to check your code. I'll look into this tonight.
Anyway, K-3D should never crash, no matter what you put in the script.

Cheers,

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, May 13, 2008 at 4:36 PM, TOMPSON LUBIN <tommy102@...> wrote:
>  of the mesh to the screen, but when I attempt to add more than one
>  face, K-3D
>  crashes. My code is based on the polyhedron.py sample script that
>  is provided, and I am 95% sure at the code is correct based on the
>  sample polyhedron script. Is there any known issues with k3d that
>  I should know when creating polyhedron objects?

Your code is correct, replacing line 54 with "for checker in
range(numoffaces):" to activate importing all faces again, but I
assume that's what you used too. In 0.7.4.0 this crashes, but the bugs
are fixed in SVN. Are you using the windows installers? If so, I can
build a new one.

Cheers,

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Parent Message unknown Re: abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bart Said:

Your code is correct, replacing line 54 with "for checker in
range(numoffaces):" to activate importing all faces again, but I
assume that's what you used too. In 0.7.4.0 this crashes, but the
bugs
are fixed in SVN. Are you using the windows installers? If so, I
can
build a new one.



When you say that "The bugs are fixed in SVN", do you mean the
bugs in k3d, or the bugs in my submitted code? If you mean the
bugs in k3d, do you mean that you updated k3d in the svn, and I
can download it at the SVN? And yes, I used the windows version of
k3d. Thank you so much for your help.

--
TOMPSON LUBIN
"Life is a long lesson in humility."
 -James M. Barrie


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 15 May 2008 17:15:39 TOMPSON LUBIN wrote:
> bugs in k3d, do you mean that you updated k3d in the svn, and I
> can download it at the SVN? And yes, I used the windows version of
> k3d. Thank you so much for your help.

Yes, I updated K-3D in the SVN repository. However, to use this you need to
recompile K-3D yourself. This can be cumbersome, especially on windows, so I
think I'll roll out a new installer this weekend.

Regards,

Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Parent Message unknown Re: abnormal behavior in polyhedron creation

by TOMPSON LUBIN :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bart Said:
Yes, I updated K-3D in the SVN repository. However, to use this
you need to
recompile K-3D yourself. This can be cumbersome, especially on
windows, so I
think I'll roll out a new installer this weekend.

Hello. I just wanted to check if the new Windows Installer of K3D
was available for download yet. I understand if the development
team is busy with other projects with higher priority this this
one.

--
TOMPSON LUBIN
"Life is a long lesson in humility."
 -James M. Barrie


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development

Re: abnormal behavior in polyhedron creation

by bART Janssens-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, May 22, 2008 at 3:26 PM, TOMPSON LUBIN <tommy102@...> wrote:

> Bart Said:
> Yes, I updated K-3D in the SVN repository. However, to use this
> you need to
> recompile K-3D yourself. This can be cumbersome, especially on
> windows, so I
> think I'll roll out a new installer this weekend.
>
> Hello. I just wanted to check if the new Windows Installer of K3D
> was available for download yet. I understand if the development
> team is busy with other projects with higher priority this this
> one.

Sorry, I haven't gotten round to this yet :(
It should be done by Saturday, if all goes well.

Cheers,

--
Bart

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
K3d-development mailing list
K3d-development@...
https://lists.sourceforge.net/lists/listinfo/k3d-development