Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I read in an obj file as a MeshRegion so I can e.g. compute its area?

If I just import the object and try Area[O] it tells me it is not a correctly specified region, even for e.g. the StanfordBunny.

Also, how do I turn Geometry3D into a MeshRegion? For example

Area[ExampleData[{"Geometry3D", "SpaceShuttle"}]]

does not work either.

It seems that geometry has more than one representation in different parts of Mathematica - bad.

share|improve this question
up vote 9 down vote accepted

Well, you have to first convert it to a MeshRegion. Let's take the space shuttle for example:

shuttle = ExampleData[{"Geometry3D", "SpaceShuttle"}]

Mathematica graphics

Now, we discretize it, since it's a Graphics3D object, we use DiscretizeGraphics:

ds = DiscretizeGraphics[shuttle]

Mathematica graphics

Now, we can find the Area easily:



Similarly for the horse:

horse = ExampleData[{"Geometry3D", "Horse"}]

Mathematica graphics

dh = DiscretizeGraphics[horse]

Mathematica graphics

We compute the surface area:



share|improve this answer
Does not always work. Area[DiscretizeGraphics[Import["somefile.obj"]]] still give a not correctly specified region error. – Ralph Aug 18 '14 at 10:51
Retried it and it did work. Apologies. I must have typed something wrong. – Ralph Aug 19 '14 at 7:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.