Editing BRL-CAD Primitives
From BRL-CAD
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 14: | Line 14: | ||
= Arbitrary convex polyhedra = | = Arbitrary convex polyhedra = | ||
− | An '''arbitrary convex polyhedron''' ('''arb''') is a geometric | + | An '''arbitrary convex polyhedron''' ('''arb''') is a geometric solid that is completely enclosed by a set of 3-dimensional planes. Each has a set of straight-edged, flat faces/facets defined by those planes and their intersections. For example, a rectangular parallelpiped (rpp) is enclosed by six planes--two perpendicular/normal to the X-axis, two normal to the Y-axis, and two normal to the Z-axis. |
− | + | The BRL-CAD geometry file format defines two types of arb object records: | |
+ | * '''arb8'''s are specified by a set of eight vertices (V1 through V8) that collectively define up to six facets. | ||
+ | * '''arbn'''s are specified by a set of intersecting planes, each defined by four coefficients. | ||
− | + | Although any arb object could be defined and stored as an arbn, the arb8 record type is used to store all of the special-case arbs discussed below (that is, all except the explicitly arbn type). | |
− | |||
− | |||
− | + | '''See also:''' [[Creating and editing arbs]] | |
− | == | + | == Rectangular parallelpiped (rpp) == |
− | + | [[Image:DefaultRppThumb.png|right]] | |
− | + | As mentioned above, each '''rectangular parallelpiped''' ('''rpp''') is enclosed by two planes normal to the X-axis (mathematically defined by X = Xmin and X = Xmax), two normal to the Y-axis (Y = Ymin and Y = Ymax), and two normal to the Z-axis (Z = Zmin and Z = Zmax). The opposing faces of any such arb are thus pairs of similar rectangles. If Xmax - Xmin = Ymax - Ymin = Zmax - Zmin, as they are for the default rpp created by MGED's make and create commands, the resulting ppp would be a cube with edges parallel to the three axes. | |
− | |||
− | |||
− | |||
− | + | The eight vertices of an rpp are calculated from the six planar coordinates as: | |
+ | # (Xmax, Ymin, Zmin) | ||
+ | # (Xmax, Ymax, Zmin) | ||
+ | # (Xmax, Ymax, Zmax) | ||
+ | # (Xmax, Ymin, Zmax) | ||
+ | # (Xmin, Ymin, Zmin) | ||
+ | # (Xmin, Ymax, Zmin) | ||
+ | # (Xmin, Ymax, Zmax) | ||
+ | # (Xmin, Ymin, Zmax) | ||
− | + | == Box == | |
− | |||
− | + | Special case of arb8 | |
+ | ;Handled by: in form(arb8) | ||
+ | ;Arguments: Vertex of first corner, direction vectors for height, width, and depth | ||
− | + | == Right angle wedge (raw) == | |
− | + | Right Angle Wedge, special case of arb6 | |
+ | ;Handled by: in form(arb8) | ||
+ | ;Arguments: Vertex of first corner, direction vectors for height, width, and depth | ||
− | + | == arb8 == | |
− | + | ||
− | + | Arbitrary straight-edged shape with 8 vertices. | |
− | + | ||
+ | ;Handled by: make in form create | ||
+ | ;Arguments: 8 Vertices in the following order: 1234 vertices for the front face, starting at bottom left, counterclockwise; then 5678 vertices for the rear face, starting at bottom left, counterclockwise. | ||
+ | ;Example: | ||
+ | in unitcube.s arb8 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 1 | ||
+ | creates the unit cube (first vertex at the origin, extends for 1 unit in x, y and z direction). | ||
+ | |||
+ | |||
+ | == arb7 == | ||
+ | |||
+ | Special case of arb8, except with point 8 merged into point 5, making the left face triangular | ||
+ | ;Handled by: make in form(arb8) create | ||
+ | |||
+ | |||
+ | == arb6 == | ||
+ | |||
+ | Arbitrary straight-edged shape with 6 vertices, special case of arb8. | ||
+ | ;Handled by: make in form(arb8) create | ||
+ | ;Arguments: 6 Vertices in the following order: 1234 vertices for the front face, starting at bottom left, counterclockwise; then back edge is 5 on bottom, 6 on top. Top and bottom faces are triangles. | ||
+ | ;Example: | ||
+ | |||
+ | in arb6.s arb6 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 0 -1 -1 0 1 | ||
+ | |||
+ | |||
+ | == arb5 == | ||
+ | |||
+ | special case of arb8. | ||
+ | ;Handled by: make in form(arb8) create | ||
+ | |||
+ | |||
+ | == arb4 == | ||
+ | |||
+ | special case of arb8. | ||
+ | ;Handled by: make in form(arb8) create | ||
+ | |||
+ | |||
+ | == arbn == | ||
+ | |||
+ | Arbitrary solid bounded by N planes. | ||
+ | ;The solid is constructed by N sets of plane coefficients and distance magnitudes, that define space which is ~outside~ the solid. The coefficients define a vector whose normal is a plane parallel to the face of the solid. The surface of the solid is at the perscribed distance along this vector. | ||
+ | |||
+ | The distances may be negative and are used when a face lies on the opposite side of the origin as the tip of its vector. An example is if the left side of a box lies on the positive X axis. In this case, because the left side is being defined, the vector points left (coefficients -1 0 0), but since the point is on the positive X axis its distance is opposite its vector and therefore negative. | ||
+ | |||
+ | ;Handled by: make in create | ||
+ | ;Arguments | ||
+ | :Number of planes | ||
+ | :xyz direction vector and distance for each plane | ||
+ | |||
+ | ;Example | ||
+ | :in arbn.s arbn 8 1 0 1 1 -1 0 0 1 0 1 0 1 0 -1 0 1 0 0 1 1 0 0 -1 1 0.5 0.5 0.5 1 -0.5 -0.5 -0.5 1 | ||
+ | |||
+ | ;Example with negative distance | ||
+ | :in arbn2.s arbn 6 1 0 0 100 -1 0 0 -10 0 1 0 200 0 -1 0 -10 0 0 -1 0 0 0 1 1.5 | ||
+ | :...is equivalent to... | ||
+ | :in rpp.s rpp 10 100 10 200 0 1.5 | ||
=Ellipsoids= | =Ellipsoids= | ||
Line 215: | Line 277: | ||
− | == | + | ==nurb== |
− | + | Non-uniform rational b-spline | |
+ | ;Handled by: none? | ||
==spline== | ==spline== | ||
Line 244: | Line 307: | ||
;Handled by: make form(sketch editor) create | ;Handled by: make form(sketch editor) create | ||
;See also: [[sketch]] | ;See also: [[sketch]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
==grip == | ==grip == | ||
Line 267: | Line 325: | ||
;Handled by: in create (not edit!) | ;Handled by: in create (not edit!) | ||
;Arguments: minor type (fdcsiLCSIL), data file, number of values | ;Arguments: minor type (fdcsiLCSIL), data file, number of values | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |