5

I need a source code that takes as input a COLLADA file and/or an OBJ file, and gives as output basic information about the file, such as file size, model dimension, volume and if possible texture issues.

2 Answers2

6

For OBJ Files

Free tools like MeshLab, Blender, and GLC_Player are able to load OBJ files and give you basic information about their content.

Apparently, GLC_Player can also load COLLADA.

In code you can use the following standard tools:

  1. Assimp - Library for loading many common formats including OBJ
  2. TinyObjLoader - .h/.cc only, no external dependencies
ap_
  • 2,204
  • 1
  • 18
  • 27
2

I have written a standalone java program (ObjectVolume) which reads an object file (.obj) and calculates the surface area, centroid and volume of any closed triangular mesh. The program also displays the file name, number of faces, the number of 3D coordinates and program run times. The program is in the public domain and is located at:

https://sourceforge.net/projects/objectvolume/?source=navbar

Included is a detail description of the process and the code. The source code is included so you can add whatever you like.