Import and show an STL file in Kivy

427 views
Skip to first unread message

Nadia Fani

unread,
Oct 17, 2017, 3:43:41 AM10/17/17
to Kivy users support
Hi ,

I'm new in Kivy and I'm trying to do a 3D Slicer for our binder jetting 3D printer. I would like to do a nice interface and I see that Kivy is very good for it, but my app need to load and show an external STL file. Also I need to move with the mouse in a 3D space and rotate and scale the object imported. Then slice it in images. 

Do you know if Kivy is the best choice? Because I'm trying to import an stl but i could't find anyway to do it, except from 'numpy stl' but I could not figure out how to show it in the canvas.
Any suggestions?

Thanks in advance!

Nadia

co...@opteqint.net

unread,
Oct 19, 2017, 4:26:42 PM10/19/17
to Kivy users support
Hi Nadia,

You might be interested at looking at these two examples:

Kivy and python can be used to render 3D graphics, and I have created a program to do so already. The main hurdle is learning how opengl works, and how the shaders file works ( the .glsl file in both repos ), and the instructions for doing the rendering in Kivy.

A lot of the knowledge I managed to put together by looking at those examples, and also further examples from nskrypnik's github repos. He has a few more that deal with 3D rendering. Another invaluable resource was talking to tshirtman and a few others on the irc channel. They helped me to really understand how it all works and even provided some examples.

I hope this helps.

Regards
/Cole

ZenCODE

unread,
Oct 20, 2017, 2:28:05 AM10/20/17
to Kivy users support
Another option worth investigating is Kivy3dgui.

https://vimeo.com/194306331

https://github.com/kpiorno/kivy3dgui

You would still need to understand the principles of OpenGL 3d structures, but this library makes it much easier to work with and you can do it all in kv lang.

Good luck

Nadia Fani

unread,
Oct 20, 2017, 5:50:08 AM10/20/17
to kivy-...@googlegroups.com

Hi Cole !

 

Thanks for that, very usefull.

 

My problem also is to import an STL 3d file in a 3D graphics, with the possibility to move around it and maybe also scale it.

I saw the obj import but it’s not working in the same way for an STL file imported trought numpy-stl.

Any suggestion?

 

Thanks again

 

Nadia

 

Da: co...@opteqint.net
Inviato: giovedì 19 ottobre 2017 22:26
A: Kivy users support
Oggetto: [kivy-users] Re: Import and show an STL file in Kivy

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/zfsGZOKTAFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Cole

unread,
Oct 31, 2017, 5:56:59 AM10/31/17
to kivy-...@googlegroups.com
Hi Nadia,

I just came across this video when looking for something else: https://www.youtube.com/watch?v=jW_gqPwu0x0

The title might suggest the library you can use to load the STL file.

Regards
/Cole

To unsubscribe from this group and all its topics, send an email to kivy-users+unsubscribe@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

 

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/zfsGZOKTAFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages