saveOBJ: Export trigrid class object as Wavefront .obj file

saveOBJR Documentation

Export trigrid class object as Wavefront .obj file

Description

The function will take the given trigrid class object and write it's vertex, edge and face information as a .obj file

Usage

saveOBJ(x, ...)

## S4 method for signature 'trigrid'
saveOBJ(x, file, scale = TRUE)

## S4 method for signature 'hexagrid'
saveOBJ(x, file, scale = TRUE)

Arguments

x

A trigrid class object.

...

Arguments of class-specific methods.

file

A character path to a file to write.

scale

A logical Should the grid vertices be scaled to unit diameter? Otherwise the values in kilometers will be exported.

Details

Note that hexagrid class objects are exported in their triangulated form (subfaces). The order of faces for hexagrids is not the natural (UI) order but the internal order of subfaces.

Value

The function has no return value.

Examples

gr <- hexagrid(spacing=4)
# example written into temporary directroy
td <- tempdir()
td
# actual writing
saveOBJ(gr, file=file.path(td, "hexagrid.obj"))


icosa documentation built on Aug. 29, 2025, 5:16 p.m.