Turn different geometry into OBJ files.
Represents encoded geometry.
Encode positions and normal vectors.
Encode positions and UV (texture) coordinates.
Encode positions, UV and normal vectors.
Like encode, but for files made of multiple parts.
multipartObj =
encodeMultipart Length.inMeters
[ triangles roofMesh
, triangles wallsMesh
]Like encodeMultipart, but reindexes triangular meshes.
This is slower, but produces smaller result, because it
deduplicates stored data.
Set decimal precision for geometry and label it with object, groups or material. May be useful for labeling parts in a multipart OBJ file.
multipartObj =
encodeMultipart Length.inMeters
[ trianglesWith { defaultOptions | object = Just "roof" } roofMesh
, trianglesWith { defaultOptions | object = Just "walls" } wallsMesh
]Note: the precision is clamped between 1 and 10, string options are stripped of whitespace.
Default options for geometry.
defaultOptions =
{ precision = 6
, object = Nothing
, groups = []
, material = Nothing
}
triangles =
trianglesWith defaultOptions
Encode geometry in the OBJ format, parametrized by the function, that knows how to convert units.
To encode multipart files, control precision or add various metadata, see Advanced Encoding.