Gabbar1947 (Talk | contribs) (→Other) |
Gabbar1947 (Talk | contribs) m (→Annot) |
||
Line 246: | Line 246: | ||
;See also: [[sketch]] | ;See also: [[sketch]] | ||
− | == | + | ==annot== |
2D primitive | 2D primitive | ||
;Handled by: in command | ;Handled by: in command | ||
See: [[annot]] | See: [[annot]] | ||
+ | |||
==grip == | ==grip == | ||
Grip -- support for joints, non-geometric (does not show in rt) | Grip -- support for joints, non-geometric (does not show in rt) |
This article provides an overview of various types of geometric primitive objects that can be added to a BRL-CAD geometry file. The shape, size, location and orientation of each such object are defined by a set of parameters/properties that are specific to its type, which are discussed in the corresponding section below.
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:
also see:
An arbitrary convex polyhedron (arb) is a geometric volume that is completely enclosed by a set of 3-dimensional planes. Each has a set of straight-edged, flat faces outlined by the intersections of those planes. The intersection of each pair of planes is a line whose intersections with other planes defines a pair of vertices. The line segment between those two vertices is an edge of the polyhedron that is shared by two faces. Each vertex is common to an equal number (at least three) of faces and edges.
For example, a rectangular parallelepiped is enclosed by three orthagonal pairs of parallel planes. Their intersections define six faces, each with four edges and four vertices. There are a total of 12 edges (each shared by two faces) and 8 vertices (each shared by three faces and three edges).
The BRL-CAD geometry file format defines two types of records for such polyhedra:
Although any polyhedron can be defined and stored as an arbn, the arb8 record type is more commonly employed because it is simpler to work with and still accommodates most constructive solid geometry applications.
An arb8 record is specified by a set of eight {X, Y, Z} vertices designated V1 through V8, which need not all be unique. BRL-CAD uses such records to represent polyhedra having four, five or six faces:
An arbn record is specified by N sets of intersecting planes, each defined by four coefficients:
As discussed in the Creating and editing arbn primitives article, BRL-CAD uses such primitives to represent polyhedra having any number of sides, edges and vertices.
Ellipsoid
Example:
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).
Arguments:
Special case of ellipsoid
Special case of ellipsoid
Elliptical hyperboloid
Elliptical paraboloid
Truncated general cone
Right circular cylinder, special case of tgc
Example:
in rcc1.s rcc 0 0 0 1 1 1 0.5
Right elliptical cylinder, special case of tgc
Right hyperbolic cylinder
Right parabolic cylinder
Truncated elliptical cone, special case of tgc
Truncated right circular cone, special case of tgc
Extrusion of a 2-d sketch
Revolution of a 2-d sketch
See also DSP tutorial.
extruded bit map
See also EBM tutorial.
The extruded bitmap (also referred to as EBM) is a solid based on a greyscale bitmap. The bitmap is an array of unsigned char values, see bw(5), and is extruded by some distance. The EBM solid requires the dimensions of the bitmap file (height and width in bytes), an extrusion length, and a transformation matrix to position the EBM. Each byte in the bitmap file is treated as the base of a cell that is extruded by the specified extrusion length. If the value of the byte is nonzero, then that cell is considered solid.
Height field
Torus
Elliptical torus
Conical particle
The particle solid is a lozenge-shaped object defined by a vertex, a height vector and radii at both ends. The body of the particle is either a cylinder or a truncated cone, depending on the values of the radii. Each end of the particle is a hemisphere of the specified radius.
n-Manifold geometry solid (non-manifold geometry)
Hollow and solid pipes and wires
Arbitrary rectangular solid
Solids of type 'ars' (Arbitrary Faceted Solids) are defined using "waterlines". The following figure consists of a start point, some number of intermediate polygons, and an ending point. Each of the intermediate polygons have the same number of vertices and the vertices are numbered 1 thru N. In addition to the intermediate polygons a line will be created that begins at the start point, goes through each polygon at its vertex numbered 1, and terminates at the end point. This is repeated for each polygon vertex 2 thru N. The start point, polygons, and end point are each a "waterline".
<need an image here to illustrate the concept>
the ars shape takes the following values as input:
For example, the command:
in x.1 ars 4 6 0 0 3 1 1 3 1 -1 3 -1 -1 3 -1 1 3 1 1 1 1 -1 1 -1 -1 1 -1 1 1 1 0 -1 0 -1 -1 -1 0 -1 0 1 -1 1 0 -3 0 -1 -3 -1 0 -3 0 1 -3 0 0 -3
Will produce a square bar with a tapered 1/8 turn twist in the middle. Of course, more waterlines in the twist and more points per waterline would make the twist smoother.
The parameters to the above ars command can be dissected as:
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)
6 : number of waterlines (four intermediate polygons plus the two endpoints)
0 0 3 - the center of the top end of the bar
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3
1 1 1 1 -1 1 -1 -1 1 -1 1 1 : a 2x2 square oriented the same as the first but at z offset 1
1 0 -1 0 -1 -1 -1 0 -1 0 1 -1 : a 2x2 square at a 45 degree rotation from the first squares at z offset -1
1 0 -3 0 -1 -3 -1 0 -3 0 1 -3 : a 2x2 square at a 45 degree rotation from the first squares at z offset -3
0 0 -3 : the center of the bottom end of the bar
Non-uniform rational b-spline
surface splines
volume / voxel
The vol solid is defined by a 3-dimensional array of unsigned char values. The solid requires a file of these values, the extent of the file (in bytes) in each dimension, the size of each cell, and high and low thresholds. Any value in the file that is between the thresholds (inclusive) represents a solid cell.
Bag of triangles
polysolid
2d outline
2D primitive
See: annot
Grip -- support for joints, non-geometric (does not show in rt)
Arguments:
halfspace
A half space is the portion of space on one side of a plane. It is represented by its boundary (the plane) and its outward-pointing normal vector.
Uniform-array binary object
Instanced Submodel
A submodel is a reference to another geometry, possibly in a separate file.