Brlcad/How to mged/primitive

From Wikibooks, open books for an open world
Jump to: navigation, search

New primitives can be created and inserted into the database using the in command. Note that the database must be opened before insertion can take place:

Types of primitives[edit]

Arbitrary polyhedron[edit]

  • arb8 - arbitrary polyhedron with 8 vertices
  • arb7 - arbitrary polyhedron with 7 vertices
  • arb6 - arbitrary polyhedron with 6 vertices
  • arb5 - arbitrary polyhedron with 5 vertices
  • arb4 - arbitrary polyhedron with 4 vertices
  • arbn - arbitrary polyhedron with n vertices
  • box - arbitrary polyhedron (vertex and three vectors)
  • rpp - rectangular parallelepiped (cuboid)

Ellipsoid[edit]

  • ell - ellipsoid (centre and three semi-axes)
  • ell1 - ellipsoid (centre, one semi-axes, radius of revolution)
  • ellg - ellipsoid (foci and chord length)
  • sph - spherical ellipsoid

Truncated general cone[edit]

  • rec - truncated general cone (right elliptical cylinder)
  • tec - truncated general cone (top radii scaled from base radii)
  • tgc - truncated general cone (general form)
  • trc - truncated general cone (truncated right circular cone)
  • rcc - truncated general cone (right circular cylinder)

Other primitives[edit]

  • ars - arbitrary faceted solid
  • bot - bag of triangles
  • ebm - extruded bitmap
  • dsp - displacement map
  • half - half space
  • hf - height field (deprecated)
  • pipe
  • raw - arbitrary polyhedron (right angle wedge)
  • tor - torus
  • vol - voxels

Cuboid[edit]

The rpp (rectangular parallelepiped) primitive to is used to create a cuboid using an area defined by the parameters xmin,xmax,ymin,ymax,zmin,zmax.

# Insert a 2 x 3 x 4 cuboid named cuboid1.s into the database
in cuboid1.s rpp 0 2 0 3 0 4

Sphere[edit]

# Insert a sphere of radius 3 named ball.s into the database
in ball.s sph 0 0 0 3

Cylinder[edit]