smartGL icon indicating copy to clipboard operation
smartGL copied to clipboard

java.lang.RuntimeException: Only triangles supported

Open haris15 opened this issue 7 years ago • 6 comments

i have an error while add my obj file instead of bus.obj

haris15 avatar May 18 '17 06:05 haris15

please help me

haris15 avatar May 18 '17 07:05 haris15

Hello Haris and thanks for using smartGL.

SmartGL handles only objects made of triangles, so you have to convert your object first. You can try a tool like http://www.meshlab.net/ to re-export your object in Wavefront OBJ format.

When it is converted you should be able to use it with smartGL.

Arnaud.

smart-fun avatar May 18 '17 11:05 smart-fun

try this:

cat my.obj | sed -E -e "s/f ([0-9\/]+) ([0-9\/]+) ([0-9\/]+) ([0-9\/]+)/f \1 \2 \3`echo -e "\r"`f \1 \3 \4/g" > my_tri.obj

ghost avatar May 18 '17 16:05 ghost

thanks i will try it

On Thu, May 18, 2017 at 10:15 PM, dawjdh [email protected] wrote:

try this:

cat my.obj | sed -E -e "s/f ([0-9/]+) ([0-9/]+) ([0-9/]+) ([0-9/]+)/f \1 \2 \3echo -e "\r"f \1 \3 \4/g" > my_tri.obj

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/smart-fun/smartGL/issues/4#issuecomment-302467298, or mute the thread https://github.com/notifications/unsubscribe-auth/AbcSbtmiOcEnD9FVz_2aaW9JVtLtDFijks5r7HWMgaJpZM4NezM5 .

haris15 avatar May 19 '17 05:05 haris15

please provide detail for your solutions

On Thu, May 18, 2017 at 10:15 PM, dawjdh [email protected] wrote:

try this:

cat my.obj | sed -E -e "s/f ([0-9/]+) ([0-9/]+) ([0-9/]+) ([0-9/]+)/f \1 \2 \3echo -e "\r"f \1 \3 \4/g" > my_tri.obj

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/smart-fun/smartGL/issues/4#issuecomment-302467298, or mute the thread https://github.com/notifications/unsubscribe-auth/AbcSbtmiOcEnD9FVz_2aaW9JVtLtDFijks5r7HWMgaJpZM4NezM5 .

haris15 avatar May 19 '17 06:05 haris15

You can solve by importing your model in Blender, then exporting it ticking the "Triangulate Faces" option.

FonzTech avatar Aug 07 '17 23:08 FonzTech