Creates a shape from an ASCII stl

stl_to_shape(rdog = NULL, id = NULL, stl, colorAxis = "z",
  colorMin = "#FFFFFF", colorMax = "#000000", visible = TRUE,
  colorMode = c("mean", "extreme", "ordered"), objectOffset = c(x = 0,
  y = 0, z = 0), stroke = 1, addTo = NULL, translate = c(x = 0, y =
  0, z = 0), rotate = c(x = 0, y = 0, z = 0), scale = c(x = 1, y = 1, z
  = 1))

Arguments

rdog

rdog object to add the shape to. Can be a character if called from a code block in shiny

id

id of the anchor. If NULL, a random id will be assigned

stl

contents of an ascii stl file as a character or path to an stl file

colorAxis

axis to apply the color gradient

colorMin

Starting color of the color gradient

colorMax

Ending color of the color gradient

visible

Is the object visible

colorMode

How to apply the color gradient. mean will color each triangle based on the mean of their colorAxis, extreme will color each triangle based on the maximum and minimum colorAxis for the triangle. ordered will ignore colorAxis and just colors vertexes in the order they appear. Depending on how the file was constructed, this may or may not create a sensible image.

stroke

Stroke to add to the polygons.

addTo

Id of the parent object. If an rdog object is piped and addTo is set to NULL, the default parent will be the illustration itself.

translate

Position relative to the origin. Origin point is defined based on addTo parameter. A vector with named x, y, z elements.

rotate

Set rotation. Unit is radians. Use with pi constant. A vector with named x, y, z elements.

scale

Scale dimensons. Can be an unnamed integer or a vector with named x, y ,z elements