Hi Emily,
Can you please check that if you setup the correct data path? E.g.:
"""
!!!! Set this path before running the demo!
"""
chrono.SetChronoDataPath(chrono.GetChronoDataPath())
veh.SetDataPath(chrono.GetChronoDataPath() + 'vehicle/')
Best,
Jingquan
On Thursday, September 19, 2024 at 8:23:32 PM UTC-5 Emily Leigh wrote:
> Hi!
>
> I am encountering difficulty importing external wavefront files to
> Pychrono (win-64_pychrono-8.00-py39_3631), as in wavefront files as
> exported from Blender. I recreated the problem with some of the wavefront
> files included in the Pychrono code distribution, after I imported these
> wavefront files into Blender and then re-exported them. I was also able to
> create the same problem by importing the wavefront files into Meshlab
> (2020.07, portable Windows version) and re-exporting them several different
> ways.
>
> Could you comment on the EXACT export options that might be used to save a
> wavefront file that's able to be successfully imported to Pychrono?
>
> #----------------------------------------------------
> import pychrono as chrono
>
> try:
> mesh = chrono.ChTriangleMeshConnected()
> success =
> mesh.LoadWavefrontMesh(chrono.etChronoDataFile('models/bulldozer/shoe_view.obj'))
>
> #OK!
>
> if not success:
> print("Try 1 (native Wavefront)=>Error loading mesh!")
>
> except Exception as e:
> print("An error occurred: ", e)
>
> try:
> mesh = chrono.ChTriangleMeshConnected()
> success =
> mesh.LoadWavefrontMesh(chrono.etChronoDataFile('models/RE-EXPORT/shoe_view_out.obj'))
>
> #FAIL!
>
> if not success:
> print("Try 2 (Wavefront imported into MeshLab and
> re-exported)=>Error loading mesh!")
>
> except Exception as e:
> print("An error occurred: ", e)
> #----------------------------------------------------
> Code output looks like this:
>
> Error loading OBJ file ...path2file...
> tiny_obj warning message:
> tiny_obj error message: Cannot open file ...path2file...
>
> Try 2 (Wavefront imported into MeshLab and re-exported)=>Error loading
> mesh!
>
--
You received this message because you are subscribed to the Google Groups
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/d22d4335-42dc-428e-af08-98fdd6df75ean%40googlegroups.com.