1

We use the OBJ geometry extraction API to convert DWG or NWD files as explained here https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/extract-geometry-from-source-file/

We expected the vertex coordinates to be in meters, but based on all the input files we tested, it seems we always get coordinates in centimeters instead.

Is it guaranteed to be always the case? Otherwise, how can we know?

cyril
  • 206
  • 1
  • 5

1 Answers1

0

As far I know the units used are the one set in the original seed file. If you model is in inches, the output will be in inches, meter in meter, etc... There should not be any unit conversion. You can retrieve the seed file unit definition from the metadata.json file in the root of svf file (which is actually a zip file).

Edits from June 4th:

From the documentation: unit string Translate models into different units; this causes the values to change. For example, from millimeters (10, 123, 31) to centimeters (1.0, 12.3, 3.1). If the source unit or the unit you are translating into is not supported, the values remain unchanged. Possible values: meter, decimeter, centimeter, millimeter, micrometer, nanometer yard, foot, inch, mil, microinch

You may want to specify the units you want, in the advanced section for OBJ

cyrille
  • 2,616
  • 1
  • 10
  • 18
  • Is this information available in Forge API or do I have to really download the SVF file (which I don't need otherwise)? Couldn't find anything in Forge documentation. – cyril May 22 '19 at 20:12
  • I checked metadata.json in the SVF file, and get `"distance unit":{"value":"mm"}`, so it doesn't match the actual unit in the OBJ file... – cyril May 23 '19 at 07:15
  • From the documentation: unit string Translate models into different units; this causes the values to change. For example, from millimeters (10, 123, 31) to centimeters (1.0, 12.3, 3.1). If the source unit or the unit you are translating into is not supported, the values remain unchanged. Possible values: meter, decimeter, centimeter, millimeter, micrometer, nanometer yard, foot, inch, mil, microinch https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/ You may want to specify the units you want, in the advanced section for OBJ – cyrille Jun 04 '19 at 13:08
  • OK thanks, I will check if this option changes something. In practice without this option it still looks like the unit is centimeters no matter what is in the input file (DWG or NWD) – cyril Jun 05 '19 at 14:09