http://brlcad.org/w/api.php?action=feedcontributions&user=JoelDBenson&feedformat=atomBRL-CAD - User contributions [en]2020-01-27T16:29:25ZUser contributionsMediaWiki 1.32.2http://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5381BRL-CAD Primitives2013-06-10T15:40:45Z<p>JoelDBenson: /* ARB8 Records */ minor changes to geometric terminology</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
= Arbitrary convex polyhedra =<br />
<br />
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.<br />
<br />
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).<br />
<br />
The BRL-CAD geometry file format defines two types of records for such polyhedra:<br />
* [[#ARB8 Records|'''arb8'''s]] are specified by a set of eight vertices.<br />
* [[#ARBN Records|'''arbn'''s]] are specified by a set of intersecting planes, each defined by four coefficients.<br />
<br />
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.<br />
<br />
== ARB8 Records ==<br />
<br />
An '''arb8''' record is specified by a set of eight {X, Y, Z} vertices designated V1 through V8, which need not all be unique. As discussed in the [[Creating and editing arb8 primitives]] article, BRL-CAD uses such records to represent polyhedra having four, five or six faces:<br />
<br />
* '''arb8''' shapes have eight unique vertices. They represent '''hexahedra''' that have six quadrilateral faces sharing eight edges. In addition to simply specifying the {X, Y, Z} coordinates of those vertices, MGED provides easier ways to create the following specific types of hexahedra:<br />
** '''3ptarb''' shapes represent '''right quadrilateral prisms''', which are extruded quadrilaterals having parallel ends connected by four rectangular sides.<br />
** '''box''' shapes represent '''parallelepipeds''', whose faces comprise three pairs of equal parallelograms. Unlike a common box, those faces need not be rectangular—if they are, the enclosed volume is a rectangular parallelepiped.<br />
** '''rpp''' shapes represent '''rectangular parallelepipeds''' (also known as '''cuboids''' and '''rectangular prisms'''), whose faces comprise three pairs of equal rectangles. If one pair of faces are squares, the volume is a '''square prism'''. If all of them are squares, the volume is a '''cube''' (geometrically, there cannot be just two pairs of square faces).<br />
<br />
* '''arb7''' shapes have seven unique vertices. They represent hexahedra that have four quadrilateral and two triangular faces sharing eleven edges. They can only be created by specifying the {X, Y, Z} coordinates of those vertices.<br />
<br />
* '''arb6''' shapes have six unique vertices. They represent '''triangular prisms''' and '''truncated tetrahedra''', which are '''pentahedra''' that have two triangular ends connected by three quadrilateral sides sharing nine edges. In addition to simply specifying the {X, Y, Z} coordinates of their vertices, MGED provides an easier way to create one specific type of hexahedron:<br />
** '''raw''' ('''right angle wedge''') shapes are '''triangular prisms''' whose ends are parallel to each other. Interestingly enough, they don't seem to require any right angles. If the ends are perpendicular to the connecting edges, the shape is a '''right triangular prism''' and has rectangular sides. Presumably two of the rectangular sides of an actual right-angle wedge would also be perpendicular to each other.<br />
<br />
* '''arb5''' shapes have five unique vertices. They represent '''quadrahedra''', which are pentahedra that have a quadrilateral base and four triangular sides sharing eight edges. If such a volume has a rectangular base it is a '''rectangular pyramid''', one with a square base is a '''square pyramid'''.<br />
<br />
* '''arb4''' shapes have four unique vertices. They represent '''tetrahedra''', which have four triangular faces sharing six edges. If all four triangles are equilateral, the shape is a '''regular tetrahedron'''.<br />
<br />
== ARBN Records ==<br />
<br />
An '''arbn''' record is specified by N sets of intersecting planes, each defined by four coefficients:<br />
* the {X, Y, Z} coefficients of the plane's normal vector pointing outward from the center of the arbn shape, and<br />
* the perpendicular distance of that plane from the origin.<br />
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.<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Talk:BRL-CAD_Primitives&diff=5380Talk:BRL-CAD Primitives2013-06-10T15:03:28Z<p>JoelDBenson: /* Completion of ARBs section */</p>
<hr />
<div>Other sources for information:<br />
* http://brlcad.org/wiki/A_Survey_of_Implicit_Constraints_in_Primitives which also could use some filling out<br />
* http://bzflag.bz/~starseeker/geometric_primitives.txt<br />
* scattered through all brl-cad manuals<br />
* source (last resort I hope!)<br />
I've partially filled in the info for each primitive as I found it and as I've had time. Feel free to improve this page! Many of the primitives listed here are not fully implemented (present in ''in'' or ''create'' but absent from ''make'' or without a form when it should have one, etc.), it might be useful to add version numbers to indicate when the object was introduced or when it was completed, especially if there are older compiled binaries on the website that don't yet support them.<br />
<br />
:??Whoever wrote this should have signed it??<br />
<br />
== Revision of Introduction (5/27/13) ==<br />
<br />
As a tech writer who is new to BRL-CAD, I'm finding that my study of it is being hampered by the current state of its documentation--so I decided to work on improving it. My first step was going to be revising the introductory section of this article to more completely describe the MGED commands for not only creating but also viewing and editing the properties of geometric primitives. But I decided all such information more properly belonged elsewhere, so I:<br />
<br />
* moved the information on creation methods to a new article,<br />
* retitled the old articles on determining and changing the properties of primitives to be consistent (leaving redirects in their old locations),<br />
* added links to those three articles to the introduction to this one, and<br />
* began reworking those three articles.<br />
<br />
Of course, I also anticipate improving the rest of this article as time permits.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 20:22, 27 May 2013 (UTC)<br />
<br />
Joel, impressive how you were able to gather all of our myriad documentation and developer notes that are scattered about. Your cleanup and improvement efforts are very much appreciated, thank you in spades.<br />
<br />
One of our long-term goals has been the cleanup and restructuring of the documentation like you've started, with our online documentation fully synchronized with our developer resources. From a developer-centric perspective, this means bridging a technical gap between the software and the ease of use of wiki-style online editing. This is because the code is constantly changing and we need some way to keep our documentation as up-to-date as possible, ideally as fast as the code is changing and ideally as easy to edit as possible (obviously).<br />
<br />
Towards the technical end, most of our most current documentation is now in the XML Docbook format (html-style markup) in our repository. The intent (which is not yet actualized) of getting that content synchronized onto the website.<br />
<br />
My goal for many years now is to get bidirectional round-trip editing set up whereby our XML documents are published to the web and as developers change the docs, the website is updated. Similarly, any user can go to one of the website pages (like you've been doing on the wiki) and those changes actually get staged for commit into our repository. How this will eventually happen is obviously a major technical challenge.<br />
<br />
Again, that setup is not yet in place but you will find remnants and information about it strewn about just like everything else. I mention it only so you are aware of the long-term plan, not to derail your current (excellent) goals of cleaning up what we do have.<br />
<br />
One piece of information you may not yet have come across is a [[TOC|table of contents]] that I recently pulled together. That includes a massive Documentation section that I would greatly appreciate feedback on from your tech writer perspective. I'd like to build up a consistent vision for where the website as a whole is going with an emphasis on organizing and cleaning up our absurdly extensive and poorly organized documentation. You wouldn't know it but we actually have several *thousand* pages (million+ words) of documentation when you add it all up!<br />
<br />
[[User:Sean|Sean]] ([[User talk:Sean|talk]]) 11:31, 31 May 2013 (UTC)<br />
<br />
Sean—<br />
<br />
Thanks for the encouragement! I'll provide some feedback (especially on your TOC) via your Talk page, when I get time (that's always the rub, isn't it!<br />
<br />
By the way, I've noticed some technical problems with this Wiki. Specifically:<br />
* The libMagick.so.9 component is reported to be missing, so it's not possible to have the Wiki resize images on the fly—check the downloaded images page for evidence of this.<br />
* Also, attempting to access the authoring help pages fails because "the Class 'XMLReader' is missing". Fortunately, much of what I've learned via other Wikis does seem to work here. Still, it would be nice if this site's authoring help worked.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 04:40, 10 June 2013 (UTC)<br />
<br />
<br />
== Completion of ARBs section ==<br />
<br />
I have concluded that keeping this article to a reasonable length will require moving the kinds of details I had included for rpps and boxes to companion ''Creating and editing ... primitives'' articles. I created two such articles, one for arb8s and one for arbns and moved info that had been here into them. If the arbn article proves sufficiently short, I might combine them into a single ''Creating and editing arb primitives'' article—time will tell.<br />
<br />
Having done that, I was able to complete the text of the Arbs section of this article as a true overview. I do plan on adding some illustrations as soon as I have time.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 04:40, 10 June 2013 (UTC)<br />
<br />
On further reflection, I think I've gone overboard in reducing the extent of this section. I need to include details on how the vertices of arb8s, arb7s, etc. have to be defined so that they are recognized as such. Plus the illustrations, of course.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 15:03, 10 June 2013 (UTC)</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5379BRL-CAD Primitives2013-06-10T04:50:29Z<p>JoelDBenson: /* ARB8 Records */ minor edit of arb4, arb5 and raw bullet points</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
= Arbitrary convex polyhedra =<br />
<br />
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.<br />
<br />
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).<br />
<br />
The BRL-CAD geometry file format defines two types of records for such polyhedra:<br />
* [[#ARB8 Records|'''arb8'''s]] are specified by a set of eight vertices.<br />
* [[#ARBN Records|'''arbn'''s]] are specified by a set of intersecting planes, each defined by four coefficients.<br />
<br />
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.<br />
<br />
== ARB8 Records ==<br />
<br />
An '''arb8''' record is specified by a set of eight {X, Y, Z} vertices designated V1 through V8, which need not all be unique. As discussed in the [[Creating and editing arb8 primitives]] article, BRL-CAD uses such records to represent polyhedra having four, five or six faces:<br />
<br />
* '''arb8''' shapes represent '''hexahedra''' (six-sided polyhedra) whose sides are all quadrilaterals. They thus have eight edges and eight unique vertices. In addition to simply specifying the {X, Y, Z} coordinates of those vertices, MGED provides easier ways to create the following specific types of hexahedra:<br />
** '''3ptarb''' shapes represent '''right quadrilateral prisms''', which are extruded quadrilaterals having parallel ends connected by four rectangular sides.<br />
** '''box''' shapes represent '''parallelepipeds''', whose faces comprise three pairs of equal parallelograms. Unlike a common box, those faces need not be rectangular—if they are, the enclosed volume is a rectangular parallelepiped.<br />
** '''rpp''' shapes represent '''rectangular parallelepipeds''' (also known as '''cuboids''' and '''rectangular prisms'''), whose faces comprise three pairs of equal rectangles. If one pair of faces are squares, the volume is a '''square prism'''. If all of them are squares, the volume is a '''cube''' (geometrically, there cannot be just two pairs of square faces).<br />
<br />
* '''arb7''' shapes represent hexahedra with four quadrilateral and two triangular faces. They have a total of eleven edges with seven unique vertices, one of which is shared by the two triangular faces. They can only be created by specifying the {X, Y, Z} coordinates of those vertices.<br />
<br />
* '''arb6''' shapes represent '''triangular prisms''' and '''truncated tetrahedra''', both of which have two triangular ends connected by three quadrilateral sides (its seems they should be called quintahedra but that term seems to be rarely used). Either has a total of nine edges with six unique vertices. In addition to simply specifying the {X, Y, Z} coordinates of their vertices, MGED provides an easier way to create one specific type of hexahedron:<br />
** '''raw''' ('''right angle wedge''') shapes are '''triangular prisms''' whose ends are parallel to each other. Interestingly enough, they don't seem to require any right angles. If the ends are perpendicular to the connecting edges, the shape is a '''right triangular prism''' and has rectangular sides. Presumably two of the rectangular sides of an actual right-angle wedge would also be perpendicular to each other.<br />
<br />
* '''arb5''' shapes represent '''quadrahedra''', which are polyhedra with five faces—a quadrilateral base and the three triangular sides. Each has a total of eight edges and five vertices. If such a volume has a rectangular base it is a '''rectangular pyramid''', one with a square base is a '''square pyramid'''.<br />
<br />
* '''arb4''' shapes represent '''tetrahedra''', which have four triangular faces. If all four of them are equilateral, the shape is a '''regular tetrahedron'''.<br />
<br />
== ARBN Records ==<br />
<br />
An '''arbn''' record is specified by N sets of intersecting planes, each defined by four coefficients:<br />
* the {X, Y, Z} coefficients of the plane's normal vector pointing outward from the center of the arbn shape, and<br />
* the perpendicular distance of that plane from the origin.<br />
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.<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Talk:BRL-CAD_Primitives&diff=5378Talk:BRL-CAD Primitives2013-06-10T04:40:47Z<p>JoelDBenson: Responded to Sean's comments and adding an explanation of my most recent changes</p>
<hr />
<div>Other sources for information:<br />
* http://brlcad.org/wiki/A_Survey_of_Implicit_Constraints_in_Primitives which also could use some filling out<br />
* http://bzflag.bz/~starseeker/geometric_primitives.txt<br />
* scattered through all brl-cad manuals<br />
* source (last resort I hope!)<br />
I've partially filled in the info for each primitive as I found it and as I've had time. Feel free to improve this page! Many of the primitives listed here are not fully implemented (present in ''in'' or ''create'' but absent from ''make'' or without a form when it should have one, etc.), it might be useful to add version numbers to indicate when the object was introduced or when it was completed, especially if there are older compiled binaries on the website that don't yet support them.<br />
<br />
:??Whoever wrote this should have signed it??<br />
<br />
== Revision of Introduction (5/27/13) ==<br />
<br />
As a tech writer who is new to BRL-CAD, I'm finding that my study of it is being hampered by the current state of its documentation--so I decided to work on improving it. My first step was going to be revising the introductory section of this article to more completely describe the MGED commands for not only creating but also viewing and editing the properties of geometric primitives. But I decided all such information more properly belonged elsewhere, so I:<br />
<br />
* moved the information on creation methods to a new article,<br />
* retitled the old articles on determining and changing the properties of primitives to be consistent (leaving redirects in their old locations),<br />
* added links to those three articles to the introduction to this one, and<br />
* began reworking those three articles.<br />
<br />
Of course, I also anticipate improving the rest of this article as time permits.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 20:22, 27 May 2013 (UTC)<br />
<br />
Joel, impressive how you were able to gather all of our myriad documentation and developer notes that are scattered about. Your cleanup and improvement efforts are very much appreciated, thank you in spades.<br />
<br />
One of our long-term goals has been the cleanup and restructuring of the documentation like you've started, with our online documentation fully synchronized with our developer resources. From a developer-centric perspective, this means bridging a technical gap between the software and the ease of use of wiki-style online editing. This is because the code is constantly changing and we need some way to keep our documentation as up-to-date as possible, ideally as fast as the code is changing and ideally as easy to edit as possible (obviously).<br />
<br />
Towards the technical end, most of our most current documentation is now in the XML Docbook format (html-style markup) in our repository. The intent (which is not yet actualized) of getting that content synchronized onto the website.<br />
<br />
My goal for many years now is to get bidirectional round-trip editing set up whereby our XML documents are published to the web and as developers change the docs, the website is updated. Similarly, any user can go to one of the website pages (like you've been doing on the wiki) and those changes actually get staged for commit into our repository. How this will eventually happen is obviously a major technical challenge.<br />
<br />
Again, that setup is not yet in place but you will find remnants and information about it strewn about just like everything else. I mention it only so you are aware of the long-term plan, not to derail your current (excellent) goals of cleaning up what we do have.<br />
<br />
One piece of information you may not yet have come across is a [[TOC|table of contents]] that I recently pulled together. That includes a massive Documentation section that I would greatly appreciate feedback on from your tech writer perspective. I'd like to build up a consistent vision for where the website as a whole is going with an emphasis on organizing and cleaning up our absurdly extensive and poorly organized documentation. You wouldn't know it but we actually have several *thousand* pages (million+ words) of documentation when you add it all up!<br />
<br />
[[User:Sean|Sean]] ([[User talk:Sean|talk]]) 11:31, 31 May 2013 (UTC)<br />
<br />
Sean—<br />
<br />
Thanks for the encouragement! I'll provide some feedback (especially on your TOC) via your Talk page, when I get time (that's always the rub, isn't it!<br />
<br />
By the way, I've noticed some technical problems with this Wiki. Specifically:<br />
* The libMagick.so.9 component is reported to be missing, so it's not possible to have the Wiki resize images on the fly—check the downloaded images page for evidence of this.<br />
* Also, attempting to access the authoring help pages fails because "the Class 'XMLReader' is missing". Fortunately, much of what I've learned via other Wikis does seem to work here. Still, it would be nice if this site's authoring help worked.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 04:40, 10 June 2013 (UTC)<br />
<br />
<br />
== Completion of ARBs section ==<br />
<br />
I have concluded that keeping this article to a reasonable length will require moving the kinds of details I had included for rpps and boxes to companion ''Creating and editing ... primitives'' articles. I created two such articles, one for arb8s and one for arbns and moved info that had been here into them. If the arbn article proves sufficiently short, I might combine them into a single ''Creating and editing arb primitives'' article—time will tell.<br />
<br />
Having done that, I was able to complete the text of the Arbs section of this article as a true overview. I do plan on adding one or more illustrations as soon as I have time.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 04:40, 10 June 2013 (UTC)</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5377BRL-CAD Primitives2013-06-10T04:18:08Z<p>JoelDBenson: /* Arbitrary convex polyhedra */ moved creation discussions to a separate article, and finished this section as an overview of arb primitives</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
= Arbitrary convex polyhedra =<br />
<br />
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.<br />
<br />
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).<br />
<br />
The BRL-CAD geometry file format defines two types of records for such polyhedra:<br />
* [[#ARB8 Records|'''arb8'''s]] are specified by a set of eight vertices.<br />
* [[#ARBN Records|'''arbn'''s]] are specified by a set of intersecting planes, each defined by four coefficients.<br />
<br />
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.<br />
<br />
== ARB8 Records ==<br />
<br />
An '''arb8''' record is specified by a set of eight {X, Y, Z} vertices designated V1 through V8, which need not all be unique. As discussed in the [[Creating and editing arb8 primitives]] article, BRL-CAD uses such records to represent polyhedra having four, five or six faces:<br />
<br />
* '''arb8''' shapes represent '''hexahedra''' (six-sided polyhedra) whose sides are all quadrilaterals. They thus have eight edges and eight unique vertices. In addition to simply specifying the {X, Y, Z} coordinates of those vertices, MGED provides easier ways to create the following specific types of hexahedra:<br />
** '''3ptarb''' shapes represent '''right quadrilateral prisms''', which are extruded quadrilaterals having parallel ends connected by four rectangular sides.<br />
** '''box''' shapes represent '''parallelepipeds''', whose faces comprise three pairs of equal parallelograms. Unlike a common box, those faces need not be rectangular—if they are, the enclosed volume is a rectangular parallelepiped.<br />
** '''rpp''' shapes represent '''rectangular parallelepipeds''' (also known as '''cuboids''' and '''rectangular prisms'''), whose faces comprise three pairs of equal rectangles. If one pair of faces are squares, the volume is a '''square prism'''. If all of them are squares, the volume is a '''cube''' (geometrically, there cannot be just two pairs of square faces).<br />
<br />
* '''arb7''' shapes represent hexahedra with four quadrilateral and two triangular faces. They have a total of eleven edges with seven unique vertices, one of which is shared by the two triangular faces. They can only be created by specifying the {X, Y, Z} coordinates of those vertices.<br />
<br />
* '''arb6''' shapes represent '''triangular prisms''' and '''truncated tetrahedra''', both of which have two triangular ends connected by three quadrilateral sides (its seems they should be called quintahedra but that term seems to be rarely used). Either has a total of nine edges with six unique vertices. In addition to simply specifying the {X, Y, Z} coordinates of their vertices, MGED provides an easier way to create one specific type of hexahedron:<br />
** '''raw''' ('''right angle wedge''') shapes are '''triangular prisms''' whose ends are parallel to each other. Interestingly enough, they don't have to incorporate any right angles. If the ends are perpendicular to the connecting edges, the shape is a '''right triangular prism''' with rectangular sides. Presumably two of the rectangular sides of an actual right-angle wedge would also be perpendicular to each other. Such a shape could easily be created as a BRL-CAD raw primitive.<br />
<br />
* '''arb5''' shapes represent '''quadrahedra''', which are polyhedra with five faces—a quadrilateral base and the three triangular sides with a total of f. If such a volume has a rectangular base it is a '''rectangular pyramid''', one with a square base is a '''square pyramid'''.<br />
<br />
* '''arb4''' shapes represent tetrahedra, which are polyhedra with four triangular faces. If all four faces are equilateral triangles, the shape is a '''regular tetrahedron'''.<br />
<br />
== ARBN Records ==<br />
<br />
An '''arbn''' record is specified by N sets of intersecting planes, each defined by four coefficients:<br />
* the {X, Y, Z} coefficients of the plane's normal vector pointing outward from the center of the arbn shape, and<br />
* the perpendicular distance of that plane from the origin.<br />
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.<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Talk:Creating_and_editing_arbn_primitives&diff=5376Talk:Creating and editing arbn primitives2013-06-10T04:06:21Z<p>JoelDBenson: Created page with "==Creation Note== I am working on completing the BRL-CAD Primitives article as an overview of all such shapes. To keep it to a managable length, I plan on creating a seri..."</p>
<hr />
<div>==Creation Note==<br />
<br />
I am working on completing the [[BRL-CAD Primitives]] article as an overview of all such shapes. To keep it to a managable length, I plan on creating a series of ''Creating and editing ... primitives'' articles, of which this is one. It currently contains only the preliminary content that was formerly in the main article referenced above. Obviously, more work is needed here. [[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 04:06, 10 June 2013 (UTC)</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Creating_and_editing_arbn_primitives&diff=5375Creating and editing arbn primitives2013-06-10T04:02:02Z<p>JoelDBenson: /* Creating and editing arbn primitives */ removed redundant heading</p>
<hr />
<div><br />
An '''arbn''' primitive is an arbitrary complex polyhedron bounded by N three-dimensional planes.<br />
<br />
Such solids are constructed by specifying N sets of plane coefficients and distances, which collectively define the space ~outside~ of 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 specified distance along this vector. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Creating_and_editing_arbn_primitives&diff=5374Creating and editing arbn primitives2013-06-10T03:59:19Z<p>JoelDBenson: created using content formerly in the BRL-CAD Primitives article, in order to reduce the length of that article</p>
<hr />
<div>= Creating and editing arbn primitives =<br />
<br />
An '''arbn''' primitive is an arbitrary complex polyhedron bounded by N three-dimensional planes.<br />
<br />
Such solids are constructed by specifying N sets of plane coefficients and distances, which collectively define the space ~outside~ of 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 specified distance along this vector. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5335BRL-CAD Primitives2013-05-28T16:46:33Z<p>JoelDBenson: /* Arbitrary convex polyhedra */ developed box subsection of arb section</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
= Arbitrary convex polyhedra =<br />
<br />
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.<br />
<br />
The BRL-CAD geometry file format defines two types of arb object records:<br />
* '''arb8'''s are specified by a set of eight vertices (V1 through V8) that collectively define up to six facets.<br />
* '''arbn'''s are specified by a set of intersecting planes, each defined by four coefficients.<br />
<br />
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).<br />
<br />
'''See also:''' [[Creating and editing arbs]]<br />
<br />
== Box ==<br />
<br />
Each '''box''' is enclosed by three pairs of parallel planes defined by a vertex [an (Xv,Yv,Zv) vector relative to the origin] and depth, width and height vectors [(Xd,Yd,Zd), (Xw,Yw,Zw), (Xh,Yh,Zh)]. Those vectors not only do not have to be normal to the X, Y and Z axes, they need not even be orthogonal (mutually perpendicular to each other). Thus, those vectors merely define the box's opposing faces as pairs of similar parallelograms. If they are parallel to the X, Y, Z axes, the box will have the same characteristics as an rpp (see [[#Rectangular parallelpiped (rpp)|below]]).<br />
<br />
[[Image:ExampleBoxThumb.png|right]]<br />
<br />
Each box is stored as an arb8 record whose eight vertices are calculated from its defining vectors as:<br />
# (X1, Y1, Z1) = (Xv, Yv, Zv)<br />
# (X1+Xw, Y1+Yw, Z1+Zw) = (Xv+Xw, Yv+Yw, Zv+Zw)<br />
# (X2+Xh, Y2+Yh, Z2+Zh) = (Xv+Xw+Xh, Yv+Yw+Yh, Zv+Zw+Zh)<br />
# (X3-Xw, Y3-Yw, Z3-Zw) = (Xv+Xh, Yv+Yh, Zv+Zh)<br />
# (X1+Xd, Y1+Yd, Z1+Zd) = (Xv+Xd, Yv+Yd, Zv+Zd)<br />
# (X5+Xw, Y5+Yw, Z5+Zw) = (Xv+Xd+Xw, Yv+Xd+Yw, Zv+Zd+Zw)<br />
# (X6+Xh, Y6+Yh, Z6+Zh) = (Xv+Xd+Xw+Xh, Yv+Xd+Yw+Yh, Zv+Zd+Zw+Zh)<br />
# (X7-Xw, Y7-Yw, Z7-Zw) = (Xv+Xd+Xh, Yv+Xd+Yh, Zv+Zd+Zh)<br />
<br />
== Rectangular parallelpiped (rpp) ==<br />
<br />
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.<br />
<br />
[[Image:DefaultRppThumb.png|right]]<br />
<br />
Each rpp is stored as an arb8 record whose eight vertices are calculated from its six planar coefficients as:<br />
# (Xmax, Ymin, Zmin)<br />
# (Xmax, Ymax, Zmin)<br />
# (Xmax, Ymax, Zmax)<br />
# (Xmax, Ymin, Zmax)<br />
# (Xmin, Ymin, Zmin)<br />
# (Xmin, Ymax, Zmin)<br />
# (Xmin, Ymax, Zmax)<br />
# (Xmin, Ymin, Zmax)<br />
<br />
Note that the rpp primitive type is actually a special case of the box type. Thus, you can also create an rpp by specifying a box whose depth, width and height vectors are parallel to the X, Y and Z axes.<br />
<br />
== Right angle wedge (raw) ==<br />
<br />
Right Angle Wedge, special case of arb6<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
== arb8 ==<br />
<br />
Arbitrary straight-edged shape with 8 vertices. <br />
<br />
;Handled by: make in form create<br />
;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.<br />
;Example: <br />
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<br />
creates the unit cube (first vertex at the origin, extends for 1 unit in x, y and z direction).<br />
<br />
<br />
== arb7 ==<br />
<br />
Special case of arb8, except with point 8 merged into point 5, making the left face triangular<br />
;Handled by: make in form(arb8) create<br />
<br />
<br />
== arb6 ==<br />
<br />
Arbitrary straight-edged shape with 6 vertices, special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
;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.<br />
;Example:<br />
<br />
in arb6.s arb6 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 0 -1 -1 0 1<br />
<br />
<br />
== arb5 ==<br />
<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
<br />
<br />
== arb4 ==<br />
<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
<br />
<br />
== arbn ==<br />
<br />
Arbitrary solid bounded by N planes. <br />
;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. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values</div>JoelDBensonhttp://brlcad.org/w/index.php?title=File:ExampleBoxThumb.png&diff=5331File:ExampleBoxThumb.png2013-05-28T15:47:00Z<p>JoelDBenson: 200 pixel wide thumbnail of generic box screen capture</p>
<hr />
<div>200 pixel wide thumbnail of generic box screen capture</div>JoelDBensonhttp://brlcad.org/w/index.php?title=File:ExampleBox.png&diff=5330File:ExampleBox.png2013-05-28T15:46:01Z<p>JoelDBenson: screen capture of a generic box primitive</p>
<hr />
<div>screen capture of a generic box primitive</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5329BRL-CAD Primitives2013-05-28T04:53:13Z<p>JoelDBenson: /* Arbs */ Revised the heading 1 level, general discussion of arbs and the level 2 discussion of rpps.</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
= Arbitrary convex polyhedra =<br />
<br />
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.<br />
<br />
The BRL-CAD geometry file format defines two types of arb object records:<br />
* '''arb8'''s are specified by a set of eight vertices (V1 through V8) that collectively define up to six facets.<br />
* '''arbn'''s are specified by a set of intersecting planes, each defined by four coefficients.<br />
<br />
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).<br />
<br />
'''See also:''' [[Creating and editing arbs]]<br />
<br />
== Rectangular parallelpiped (rpp) ==<br />
<br />
[[Image:DefaultRppThumb.png|right]]<br />
<br />
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.<br />
<br />
The eight vertices of an rpp are calculated from the six planar coordinates as:<br />
# (Xmax, Ymin, Zmin)<br />
# (Xmax, Ymax, Zmin)<br />
# (Xmax, Ymax, Zmax)<br />
# (Xmax, Ymin, Zmax)<br />
# (Xmin, Ymin, Zmin)<br />
# (Xmin, Ymax, Zmin)<br />
# (Xmin, Ymax, Zmax)<br />
# (Xmin, Ymin, Zmax)<br />
<br />
== Box ==<br />
<br />
Special case of arb8<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
== Right angle wedge (raw) ==<br />
<br />
Right Angle Wedge, special case of arb6<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
== arb8 ==<br />
<br />
Arbitrary straight-edged shape with 8 vertices. <br />
<br />
;Handled by: make in form create<br />
;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.<br />
;Example: <br />
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<br />
creates the unit cube (first vertex at the origin, extends for 1 unit in x, y and z direction).<br />
<br />
<br />
== arb7 ==<br />
<br />
Special case of arb8, except with point 8 merged into point 5, making the left face triangular<br />
;Handled by: make in form(arb8) create<br />
<br />
<br />
== arb6 ==<br />
<br />
Arbitrary straight-edged shape with 6 vertices, special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
;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.<br />
;Example:<br />
<br />
in arb6.s arb6 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 0 -1 -1 0 1<br />
<br />
<br />
== arb5 ==<br />
<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
<br />
<br />
== arb4 ==<br />
<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
<br />
<br />
== arbn ==<br />
<br />
Arbitrary solid bounded by N planes. <br />
;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. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values</div>JoelDBensonhttp://brlcad.org/w/index.php?title=File:DefaultRppThumb.png&diff=5328File:DefaultRppThumb.png2013-05-28T03:42:13Z<p>JoelDBenson: Thumbnail screen capture of default RPP created and raytraced using MGED</p>
<hr />
<div>Thumbnail screen capture of default RPP created and raytraced using MGED</div>JoelDBensonhttp://brlcad.org/w/index.php?title=File:DefaultRPP.png&diff=5327File:DefaultRPP.png2013-05-28T03:37:04Z<p>JoelDBenson: 500 by 530 pixel screen capture of a default rpp object created and raytraced using MGED</p>
<hr />
<div>500 by 530 pixel screen capture of a default rpp object created and raytraced using MGED</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5326BRL-CAD Primitives2013-05-27T22:33:59Z<p>JoelDBenson: removed an old link to an article I renamed</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
=Arbs=<br />
Objects with an arbitrary number of points and flat faces...<br />
==arb8==<br />
Arbitrary straight-edged shape with 8 vertices. <br />
<br />
;Handled by: make in form create<br />
;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.<br />
;Example: <br />
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<br />
creates the unit cube (first vertex at the origin, extends for 1 unit in x, y and z direction).<br />
<br />
== arb7 ==<br />
Special case of arb8, except with point 8 merged into point 5, making the left face triangular<br />
;Handled by: make in form(arb8) create<br />
== arb6 ==<br />
Arbitrary straight-edged shape with 6 vertices, special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
;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.<br />
;Example:<br />
<br />
in arb6.s arb6 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 0 -1 -1 0 1<br />
<br />
== arb5 ==<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
== arb4 ==<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
== arbn ==<br />
Arbitrary solid bounded by N planes. <br />
;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. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5<br />
<br />
==box==<br />
Special case of arb8<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
==raw==<br />
Right Angle Wedge, special case of arb6<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
==rpp==<br />
Rectangular Parallelpiped, special case of arb8<br />
;Handled by: make in form(arb8) create<br />
;Arguments: xmin xmax ymin ymax zmin zmax<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Talk:Changing_the_properties_of_primitive_objects&diff=5325Talk:Changing the properties of primitive objects2013-05-27T22:29:17Z<p>JoelDBenson: Created page with "Yes, I know that examples and screen captures would be nice. All in due time! ~~~~"</p>
<hr />
<div>Yes, I know that examples and screen captures would be nice. All in due time!<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 22:29, 27 May 2013 (UTC)</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Changing_the_properties_of_primitive_objects&diff=5324Changing the properties of primitive objects2013-05-27T22:26:44Z<p>JoelDBenson: </p>
<hr />
<div>MGED provides several different ways to modify and reposition [[BRL-CAD Primitives]] by changing the values of their associated parameters:<br />
<br />
* the [[#Primitive Editor | primitive object editor]] dialog box<br />
* the [[#Interactive editing | interactive editing]] commands<br />
* the get and put [[#TCL Commands | TCL commands]]<br />
<br />
See also: [[Determining the properties of primitive objects]]<br />
;<br />
<br />
= Primitive Editor =<br />
<br />
Most of the parameters associated with many primitive objects can be edited using the '''Primitive Editor''' dialog box:<br />
# Invoke the GUI '''Edit-->Primitive Editor''' command to display that dialog.<br />
# Type the object's name into the '''Name:''' field and then click the '''Reset''' button to display its associated form and the current values of its editable parameters. <br />
# Interactively change and reposition the object by changing appropriate parameter values. Your changes are immediately written to the database and the object is redrawn in the Display Window each time you click the '''Apply''' or '''OK''' button (OK also closes the dialog box). Unapplied changes can be undone by clicking the '''Reset''' button.<br />
# Repeat the above steps to edit additional objects, or click the '''OK''' or '''Dismiss''' button to close the dialog.<br />
<br />
Note that forms have not been defined for all object types. Those that lack such forms cannot be edited using this method.<br />
<br />
= Interactive editing =<br />
<br />
Any ''currently displayed'' primitive object can be selected for modification or relocation using either the GUI '''Edit-->Primitive Selection...''' or the CLI [[MGED CMD sed | '''sed''']] command.<br />
<br />
Objects that aren't currently displayed will not be listed in the Primitive Selection Menu dialog, and the sed command will display an error message if you try to edit such an object. In either case, using the CLI '''draw''' or '''B''' command to display such an object would then allow you to select it for editing.<br />
<br />
When such an object is selected for editing, the '''Edit''' menu will display a set of commands specific to the corresponding primitive type. Invoking any such command will allow you to change the corresponding parameter(s) by entering CLI '''p''' commands or activating the Graphics Window and using associated '''shift grip''' mouse actions. Similarly, the CLI will enable various edit-mode commands that can be used to modify or relocate the selected primitive. As you use either approach to make such changes, you can:<br />
* record the changes you have made so far by invoking the GUI '''Edit-->Apply''' or entering the CLI '''apply''' command; <br />
* undo any unrecorded changes by invoking the GUI '''Edit-->Reset''' or entering the CLI '''reset''' command;<br />
* record the changes you have made and return to viewing mode by invoking the GUI '''Edit-->Accept''' or entering the CLI '''accept''' command; or<br />
* discard any unrecorded changes and return to the viewing mode by invoking the GUI '''Edit-->Reject''' or entering the CLI '''reject''' command. You can also reject unrecorded changes by pressing the escape key while the Graphics Window is active.<br />
<br />
= TCL Commands =<br />
<br />
Although it is a cumbersome approach that is best reserved for scripted editing, primitive objects can also be edited by entering TCL '''get''' and '''put''' commands via the CLI:<br />
# Enter a "get object_name" command to display the current database entry for that object.<br />
# Enter a "kill object_name" command to delete that database entry and erase the object from the Graphics Window.<br />
# Enter a "put object_name properties" command to recreate that object with modified parameter values.<br />
# Enter a "draw object_name" command to redisplay the object and verify your changes.</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5323BRL-CAD Primitives2013-05-27T21:31:37Z<p>JoelDBenson: tweaked the first paragraph</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
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.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
=Arbs=<br />
Objects with an arbitrary number of points and flat faces...<br />
==arb8==<br />
Arbitrary straight-edged shape with 8 vertices. <br />
<br />
;Handled by: make in form create<br />
;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.<br />
;Example: <br />
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<br />
creates the unit cube (first vertex at the origin, extends for 1 unit in x, y and z direction).<br />
<br />
== arb7 ==<br />
Special case of arb8, except with point 8 merged into point 5, making the left face triangular<br />
;Handled by: make in form(arb8) create<br />
== arb6 ==<br />
Arbitrary straight-edged shape with 6 vertices, special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
;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.<br />
;Example:<br />
<br />
in arb6.s arb6 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 0 -1 -1 0 1<br />
<br />
== arb5 ==<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
== arb4 ==<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
== arbn ==<br />
Arbitrary solid bounded by N planes. <br />
;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. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5<br />
<br />
==box==<br />
Special case of arb8<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
==raw==<br />
Right Angle Wedge, special case of arb6<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
==rpp==<br />
Rectangular Parallelpiped, special case of arb8<br />
;Handled by: make in form(arb8) create<br />
;Arguments: xmin xmax ymin ymax zmin zmax<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values<br />
<br />
[[Determining the properties of primitives]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Talk:Creating_primitive_objects&diff=5322Talk:Creating primitive objects2013-05-27T21:09:14Z<p>JoelDBenson: why I created this article</p>
<hr />
<div>= Why I created this article =<br />
<br />
I initially set out to revise the introductory section of the [[BRL-CAD Primitives]] article, which used to briefly discuss the various ways MGED provides for creating such objects. I was thinking I would flesh out that discussion and also talk about how the properties of such objects can be viewed and edited. But I decided that information would make that intro way too long and in any event properly belonged in separate articles. So I moved the information on creating primitives here, renamed the articles on viewing and editing them so all three titles are grammatically consistent (turning the old titles into redirects), substituted links to them into the primitives article, and went to work on all three.<br />
<br />
As for my changes to the primitive creation information that I moved here:<br />
<br />
* My experience with the Create command is that it never displays the Primitive Editor dialog box. So I removed the claim that "When an object is selected from the create menu, you are prompted for a name, and then dropped into the primitive editor form; however, if the object type has no form, create will do about the same as make." Instead, I noted that '''make''' and '''create''' do essentially the same thing, and are usually immediately followed by editing of the created object. If that's wrong, I would really appreciate being told why create doesn't open the Primitive Editor when I use it.<br />
<br />
* I also removed the parenthetical "are there any other ways" comment in favor of mentioning object importing and using the TCL put command. If I learn of any other methods, I'll add mentions of them too.<br />
<br />
Instead of putting examples in this article, I'm planning to add them to the descriptions of the various types of primitives and add appropriate links here. That will probably make [[BRL-CAD Primitives|that article]] too long, so I suspect I'll split it up at some point (assuming no one objects too strenuously).<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 21:09, 27 May 2013 (UTC)</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Creating_primitive_objects&diff=5321Creating primitive objects2013-05-27T20:46:23Z<p>JoelDBenson: polished the article I created a few minutes ago</p>
<hr />
<div>Most types of [[BRL-CAD Primitives|'''primitive geometric objects''']] can be created using any of the following MGED command line (CLI) or graphical user interface (GUI) commands:<br />
;[[MGED_CMD_in|'''in''']] : Entering a CLI '''in''' command allows you to interactively create an object with a specified name, type and parameters. That information can either be included in the initial command or provided in response to prompts that are displayed if any required information is omitted from the command line.<br />
;'''form''' : Selecting '''Primitive Editor''' from the GUI '''Edit''' menu displays a form/dialog box you can use to name, set the parameters of and then create objects of most (but not all) types. Some derivative objects do not have their own forms, in which case the primitive editor will display the base object's form.<br />
;'''create''' : Selecting an object type from the GUI '''Create''' menu displays the object-naming dialog box, then creates and displays an object of that type having default parameter values.<br />
;[[MGED_CMD_make|'''make''']] : Entering a CLI '''make''' command also creates and displays an object of a specified type having a specified name and default parameter values.<br />
<br />
Note that the Create menu is essentially the GUI equivalent of the CLI make command. After using either, you will generally want to [[Changing the properties of primitive objects|'''edit''']] the resulting object's default location, shape and size.<br />
<br />
Primitive objects can also be created by:<br />
* using the CLI [[MGED CMD cp|'''cp''']] command to make a copy of an existing object, which can then be moved and modified;<br />
* using the CLI [[MGED_CMD_dbconcat|'''dbconcat''']] or GUI '''File-->Import''' command to merge in all objects defined by another geometry file; and<br />
* entering TCL [[MGED_CMD_put_edit_solid|'''put''']] commands via the command window.<br />
<br />
See also:<br />
<br />
* [[Determining the properties of primitive objects]]<br />
* [[Changing the properties of primitive objects]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Talk:BRL-CAD_Primitives&diff=5320Talk:BRL-CAD Primitives2013-05-27T20:22:33Z<p>JoelDBenson: Explained my revision of the introductory section.</p>
<hr />
<div>Other sources for information:<br />
* http://brlcad.org/wiki/A_Survey_of_Implicit_Constraints_in_Primitives which also could use some filling out<br />
* http://bzflag.bz/~starseeker/geometric_primitives.txt<br />
* scattered through all brl-cad manuals<br />
* source (last resort I hope!)<br />
I've partially filled in the info for each primitive as I found it and as I've had time. Feel free to improve this page! Many of the primitives listed here are not fully implemented (present in ''in'' or ''create'' but absent from ''make'' or without a form when it should have one, etc.), it might be useful to add version numbers to indicate when the object was introduced or when it was completed, especially if there are older compiled binaries on the website that don't yet support them.<br />
<br />
:??Whoever wrote this should have signed it??<br />
<br />
==Revision of Introduction (5/27/13)==<br />
<br />
As a tech writer who is new to BRL-CAD, I'm finding that my study of it is being hampered by the current state of its documentation--so I decided to work on improving it. My first step was going to be revising the introductory section of this article to more completely describe the MGED commands for not only creating but also viewing and editing the properties of geometric primitives. But I decided all such information more properly belonged elsewhere, so I:<br />
<br />
* moved the information on creation methods to a new article,<br />
* retitled the old articles on determining and changing the properties of primitives to be consistent (leaving redirects in their old locations),<br />
* added links to those three articles to the introduction to this one, and<br />
* began reworking those three articles.<br />
<br />
Of course, I also anticipate improving the rest of this article as time permits.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 20:22, 27 May 2013 (UTC)</div>JoelDBensonhttp://brlcad.org/w/index.php?title=BRL-CAD_Primitives&diff=5319BRL-CAD Primitives2013-05-27T20:10:12Z<p>JoelDBenson: moved discussion of creation methods to a new "Creating primitive objects" article, inclduing only a link here (see talk page)</p>
<hr />
<div>[[category:MGED| Primitives]]<br />
<br />
This article provides an overview of various types of geometric primitive objects that can be added to a BRL-CAD geometry file.<br />
<br />
For general discussions on using MGED to create primitive objects, view their properties, and modify or move them, see:<br />
* [[Creating_primitive_objects]]<br />
* [[Determining_the_properties_of_primitive objects]]<br />
* [[Changing_the_properties_of_primitive objects]]<br />
<br />
also see:<br />
* [[A Survey of Implicit Constraints in Primitives]]<br />
;<br />
<br />
=Arbs=<br />
Objects with an arbitrary number of points and flat faces...<br />
==arb8==<br />
Arbitrary straight-edged shape with 8 vertices. <br />
<br />
;Handled by: make in form create<br />
;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.<br />
;Example: <br />
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<br />
creates the unit cube (first vertex at the origin, extends for 1 unit in x, y and z direction).<br />
<br />
== arb7 ==<br />
Special case of arb8, except with point 8 merged into point 5, making the left face triangular<br />
;Handled by: make in form(arb8) create<br />
== arb6 ==<br />
Arbitrary straight-edged shape with 6 vertices, special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
;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.<br />
;Example:<br />
<br />
in arb6.s arb6 1 -1 -1 1 1 -1 1 1 1 1 -1 1 -1 0 -1 -1 0 1<br />
<br />
== arb5 ==<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
== arb4 ==<br />
special case of arb8.<br />
;Handled by: make in form(arb8) create<br />
== arbn ==<br />
Arbitrary solid bounded by N planes. <br />
;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. <br />
<br />
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.<br />
<br />
;Handled by: make in create<br />
;Arguments<br />
:Number of planes<br />
:xyz direction vector and distance for each plane<br />
<br />
;Example<br />
: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<br />
<br />
;Example with negative distance<br />
: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<br />
:...is equivalent to...<br />
:in rpp.s rpp 10 100 10 200 0 1.5<br />
<br />
==box==<br />
Special case of arb8<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
==raw==<br />
Right Angle Wedge, special case of arb6<br />
;Handled by: in form(arb8)<br />
;Arguments: Vertex of first corner, direction vectors for height, width, and depth<br />
<br />
==rpp==<br />
Rectangular Parallelpiped, special case of arb8<br />
;Handled by: make in form(arb8) create<br />
;Arguments: xmin xmax ymin ymax zmin zmax<br />
<br />
=Ellipsoids=<br />
== ell ==<br />
Ellipsoid<br />
;Handled by: make in form create<br />
;Arguments:<br />
;;V : vertex point, at the center<br />
;;vectors A B C describing the radii of the ellipses; A points front, B points right, C points up.<br />
<br />
Example:<br />
in ell.s ell 0 0 0 0 -1 0 1 0 0 0 0 1<br />
== sph ==<br />
Sphere, special case of the ellipsoid, with vectors A B and C all the same magnitude (radius).<br />
;Handled by: make in form(ell) create<br />
Arguments:<br />
;V : vertex point, at the center<br />
;radius<br />
== ellg ==<br />
Special case of ellipsoid<br />
;Handled by: in form(ell) <br />
;Arguments: two foci points, and axis length<br />
==ell1==<br />
Special case of ellipsoid<br />
;Handled by: in make form(ell) create<br />
;Arguments: vertex, vector A, radius of revolution<br />
==ehy==<br />
Elliptical hyperboloid<br />
;Handled by: make in form create<br />
;Arguments: vertex, perpendicular vectors Height and (A,r_1) major axis, (r_2) magnitude of vector B, (c) apex to asymptotes distance<br />
<br />
==epa==<br />
Elliptical paraboloid<br />
;Handled by: in make form create<br />
<br />
=Cones and Cylinders=<br />
== tgc ==<br />
Truncated general cone<br />
;Handled by: in make form create<br />
;Arguments: vertex, vectors H A B, magnitudes of vectors C D<br />
<br />
== rcc ==<br />
Right circular cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
Example:<br />
in rcc1.s rcc 0 0 0 1 1 1 0.5<br />
<br />
== rec ==<br />
Right elliptical cylinder, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: vertex, height vector, radius<br />
== rhc ==<br />
Right hyperbolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width, (c) apex to asymptote distance,<br />
== rpc ==<br />
Right parabolic cylinder<br />
;Handled by: in make form create<br />
;Arguments: vertex, perpendicular vectors for Height and B, (r) rectangular half width<br />
== tec ==<br />
Truncated elliptical cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, vectors Height, A, B<br />
== trc ==<br />
Truncated right circular cone, special case of tgc<br />
;Handled by: in make form(tgc) create<br />
;Arguments: Vertex, Height vector, radius of base and top<br />
<br />
= derived from 2d=<br />
==extrude==<br />
Extrusion of a 2-d sketch<br />
;Handled by: in make form(?) create<br />
;Arguments: vertex, perpendicular vectors Height A B, sketch, K<br />
<br />
==revolve==<br />
Revolution of a 2-d sketch<br />
;Handled by: in<br />
;Arguments: vertex, revolution axis, vector in start plane, angle, sketch<br />
<br />
==dsp==<br />
;Handled by: in create<br />
;Arguments: data type (f|o), datasource, count of length and width, interpolation type, cut direction, cell size, unit elevation<br />
<br />
See also [[DSP]] tutorial.<br />
<br />
==ebm==<br />
extruded bit map<br />
;Handled by: in form create<br />
;Arguments: filename, width and height in cells, extrusion distance, <br />
<br />
See also [[EBM]] tutorial.<br />
<br />
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.<br />
<br />
==hf==<br />
Height field<br />
;Handled by: none?<br />
;Status: depreciated, use dsp instead<br />
<br />
<br />
=Other solids=<br />
<br />
== tor ==<br />
Torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, tube radius<br />
== eto ==<br />
Elliptical torus<br />
;Handled by: in make form create<br />
;Arguments: vertex, normal vector, radius of revolution, vector C, (r_d) magnitude of semi-minor axis<br />
<br />
== part ==<br />
Conical particle<br />
;Handled by: in make create<br />
;Arguments: vertex, height vector, radius at v, radius at h<br />
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.<br />
<br />
== nmg ==<br />
n-Manifold geometry solid (non-manifold geometry)<br />
;Handled by: make create<br />
<br />
== pipe ==<br />
Hollow and solid pipes and wires<br />
;Handled by: in make create<br />
;Arguments: # points, for each point: location, inner and outer diameters, bend radius<br />
<br />
==ars==<br />
Arbitrary rectangular solid<br />
;Handled by: in make create<br />
<br />
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".<br />
<br><br><br />
<need an image here to illustrate the concept><br />
<br><br><br />
the ars shape takes the following values as input:<br />
*The number of points per waterline (the number of vertices on each intermediate polygon)<br />
*The number of waterlines (the number of intermediate polygons plus 2)<br />
*X, Y, and Z for a starting point (the first waterline)<br />
*for each interior polygon (an intermediate waterline)<br />
**for each point on the polygon<br />
***X, Y, and Z for the point on the polygon<br />
*X, Y, and Z for an ending point (the last waterline)<br />
<br />
For example, the command:<br />
<br><br><br />
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 <br />
<br><br><br />
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.<br />
<br><br><br />
[[Image:Example_ars.png|thumb|center|600px|Example ARS]]<br />
<br><br><br />
The parameters to the above ars command can be dissected as:<br />
<br />
4 : number of points per waterline (i.e. intermediate polygons have 4 vertices)<br><br />
6 : number of waterlines (four intermediate polygons plus the two endpoints)<br><br />
0 0 3 - the center of the top end of the bar<br><br />
1 1 3 1 -1 3 -1 -1 3 -1 1 3 : a 2x2 square in the xy plane at z offset 3<br><br />
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<br><br />
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<br><br />
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<br><br />
0 0 -3 : the center of the bottom end of the bar<br />
<br />
==metaball==<br />
;Handled by: in make form(*) create<br />
;Arguments: render method, threshold, number of points, location and field strength for each point (and blobbiness/goo factor)<br />
<br />
<br />
==nurb==<br />
Non-uniform rational b-spline<br />
;Handled by: none?<br />
<br />
==spline==<br />
surface splines<br />
;Handled by: ?<br />
<br />
==vol==<br />
volume / voxel<br />
; Handled by: in <br />
; Arguments: filename, xyz dimensions of file (in voxels), lower and upper threasholds, xyz dimensions of a cell<br />
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.<br />
<br />
==bot==<br />
Bag of triangles<br />
;Handled by: in make create (not edit!)<br />
;Arguments: number of verticies, number of triangles, mode (1=surface 2=solid 3=plate), triangle orientation mode (1=unoriented 2=counter-clockwise 3=clockwise), each vertex, vertex index of each triangle<br />
;See also: [[BoT]]<br />
<br />
==poly==<br />
polysolid<br />
; Handled by: none?<br />
; Status: depreciated, use bot instead<br />
<br />
=Other=<br />
==Sketch==<br />
2d outline<br />
;Handled by: make form(sketch editor) create<br />
;See also: [[sketch]]<br />
<br />
==grip ==<br />
Grip -- support for joints, non-geometric (does not show in rt)<br />
;Handled by: in make form create<br />
Arguments:<br />
;C : Center<br />
;N : normal vector<br />
;L : magnitude<br />
<br />
== half ==<br />
halfspace<br />
;Handled by: in make form create<br />
;Arguments: Normal, distance from origin<br />
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. <br />
==binunif==<br />
Uniform-array binary object<br />
;Handled by: in create (not edit!)<br />
;Arguments: minor type (fdcsiLCSIL), data file, number of values<br />
<br />
[[Determining the properties of primitives]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Determining_the_properties_of_primitive_objects&diff=5318Determining the properties of primitive objects2013-05-27T20:05:44Z<p>JoelDBenson: </p>
<hr />
<div>To determine the properties of a primitive, use the l command followed by the<br />
primitive name. The example below shows the output of the l command against a [[right circular cylinder]]:<br />
<br />
l cyl1.s<br />
<br />
cyl1.s: truncated general cone (TGC)<br />
V (4, 4, -25)<br />
Top (4, 4, 31)<br />
H (0, 0, 56) mag=56<br />
H direction cosines=(90, 90, 0)<br />
H rotation angle=0, fallback angle=90<br />
A (14, 0, 0) mag=14<br />
B (0, 14, 0) mag=14<br />
C (14, 0, 0) mag=14<br />
D (0, 14, 0) mag=14<br />
AxB direction cosines=(90, 90, 0)<br />
AxB rotation angle=90, fallback angle=90<br />
<br />
So, the primitive values for the [[right circular cylinder]] are as follows:<br />
<br />
<br />
----<br />
<br />
[[Changing the properties of primitive objects]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Changing_the_properties_of_a_primitive_object&diff=5317Changing the properties of a primitive object2013-05-27T20:05:00Z<p>JoelDBenson: moved contents to "Changing the properties of primitive objects" for consistency, made this a redirect</p>
<hr />
<div>#REDIRECT [[Changing_the_properties_of_primitive_objects]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Changing_the_properties_of_primitive_objects&diff=5316Changing the properties of primitive objects2013-05-27T20:02:14Z<p>JoelDBenson: Created page with "We have determined the properties of a primitive object. From the mged console, we now wish to change the properties of this o..."</p>
<hr />
<div>We have [[Determining the properties of primitives|determined the properties of a primitive object]]. From the [[mged]] console, we now wish to change the properties of this object. The following example demonstrates how to change the height of a [[right circular cylinder]].<br />
<br />
The following command can be used to change the height of a [[right circular cylinder]] [[primitive object]]:<br />
<br />
<br />
<br />
The parameters of many primitive objects can be edited using the Primitive Editor dialog box:<br />
# Invoke the GUI '''Edit-->Primitive Editor''' command to display that form.<br />
# Type the object's name into the '''Name:''' field and then click the '''Reset''' button to display its current parameter values (and add it to the Display Window if it wasn't previously drawn there). <br />
# Interactively edit the object by changing various parameter values. Your changes are immediately written to the database and the Display Window is updated each time you click the '''Apply''' or '''OK''' button (OK also closes the dialog box). Unapplied changes can be undone by clicking the '''Reset''' button.<br />
# Repeat the above steps to edit additional objects, or click the '''OK''' or '''Dismiss''' button to close the dialog.<br />
<br />
Alternately, any ''displayed'' primitive object can be selected for modification or relocation using either the GUI '''Edit-->Primitive Selection...''' or the CLI '''sed''' command. Objects that aren't currently displayed will not be listed in the Primitive Selection Menu dialog, and the sed command will display an error message if you attempt to select such an object. In either case, the object could then be selected after using the CLI '''draw''' or '''B''' command to display it,<br />
<br />
;Most parameters (including ones not editable from a form) have special items on the edit menu.<br />
<br />
Primitive objects can also be edited by using a TCL '''get''' command to view its current database entry, then '''kill''' that object and recreate it using a TCL '''put''' command.<br />
<br />
=For additional information=</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Determining_the_properties_of_primitives&diff=5315Determining the properties of primitives2013-05-27T20:01:10Z<p>JoelDBenson: Redirected page to Determining the properties of primitive objects</p>
<hr />
<div>#REDIRECT [[Determining_the_properties_of_primitive_objects]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Creating_primitive_objects&diff=5314Creating primitive objects2013-05-27T20:00:26Z<p>JoelDBenson: created in part from paragraphs moved from BRL-CAD Primitives article</p>
<hr />
<div>Objects of most such types can be created using any of the following command line (CLI) or menu (GUI) commands:<br />
;[[MGED_CMD_in|'''in''']] : Entering a CLI '''in''' command allows you to interactively create an object with a specified name, type and parameters. That information can either be included in the initial command or provided in response to prompts that are displayed if any required information is omitted from the command line.<br />
;'''form''' : Selecting '''Primitive Editor''' from the GUI '''Edit''' menu displays a form/dialog box you can use to name, set the parameters of and then create objects of most (but not all) types. Some derivative objects do not have their own forms, in which case the primitive editor will display the base object's form.<br />
;'''create''' : Selecting an object type from the GUI '''Create''' menu displays the object-naming dialog box, then creates and displays an object of that type having default parameter values.<br />
;[[MGED_CMD_make|'''make''']] : Entering a CLI '''make''' command also creates and displays an object of a specified type having a specified name and default parameter values.<br />
<br />
Note that the Create menu is essentially the GUI equivalent of the CLI make command. After using either, you will generally want to edit the resulting object's default location and size.<br />
<br />
Primitive objects can also be created by:<br />
* <br />
* using the CLI [[MGED_CMD_dbconcat|'''dbconcat''']] or GUI '''File-->Import''' command to merge in all objects defined by another geometry file, or<br />
* entering TCL '''put''' commands via the CLI.</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Determining_the_properties_of_primitive_objects&diff=5313Determining the properties of primitive objects2013-05-27T19:57:17Z<p>JoelDBenson: basically renamed old "Determining the properties of primitives" article for consistency's sake</p>
<hr />
<div>To determine the properties of a primitive, use the l command followed by the<br />
primitive name. The example below shows the output of the l command against a [[right circular cylinder]]:<br />
<br />
l cyl1.s<br />
<br />
cyl1.s: truncated general cone (TGC)<br />
V (4, 4, -25)<br />
Top (4, 4, 31)<br />
H (0, 0, 56) mag=56<br />
H direction cosines=(90, 90, 0)<br />
H rotation angle=0, fallback angle=90<br />
A (14, 0, 0) mag=14<br />
B (0, 14, 0) mag=14<br />
C (14, 0, 0) mag=14<br />
D (0, 14, 0) mag=14<br />
AxB direction cosines=(90, 90, 0)<br />
AxB rotation angle=90, fallback angle=90<br />
<br />
So, the primitive values for the [[right circular cylinder]] are as follows:<br />
<br />
<br />
----<br />
<br />
[[Changing the properties of a primitive object]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=Sed&diff=5312Sed2013-05-27T19:13:29Z<p>JoelDBenson: created as a redirect to the MGED CMD sed article</p>
<hr />
<div>#REDIRECT [[MGED_CMD_sed]]</div>JoelDBensonhttp://brlcad.org/w/index.php?title=User:JoelDBenson&diff=5311User:JoelDBenson2013-05-27T16:42:00Z<p>JoelDBenson: Created page with "==Spring 2013== I'm an old, very experienced tech writer who is new to and envisions using BRL-CAD to create 3D illustrations. I'll be adding stuff that I would have found he..."</p>
<hr />
<div>==Spring 2013==<br />
<br />
I'm an old, very experienced tech writer who is new to and envisions using BRL-CAD to create 3D illustrations. I'll be adding stuff that I would have found helpful had it been here when I started :<).<br />
<br />
FWIW, I am running MGED 7.22.0 under both Ubuntu 12.04 and Windows 7.<br />
<br />
[[User:JoelDBenson|JoelDBenson]] ([[User talk:JoelDBenson|talk]]) 16:42, 27 May 2013 (UTC)</div>JoelDBenson