Difference between revisions of "MGED CMD nmg"
From BRL-CAD
Bhollister (talk | contribs) m |
Bhollister (talk | contribs) |
||
Line 29: | Line 29: | ||
::: '''mged>''' labelvert myobj | ::: '''mged>''' labelvert myobj | ||
::: '''mged>''' nmg myobj kill V 0.0 2.537 1.289 | ::: '''mged>''' nmg myobj kill V 0.0 2.537 1.289 | ||
+ | |||
+ | : '''kill F''' | ||
+ | :: Removes the faceuse and face geometry of the selected face (via its index). When specifying the face to be removed, user generally will display face indices in object via the MGED command [http://brlcad.org/wiki/MGED_CMD_labelvert labelface]. | ||
+ | |||
+ | ::For example: | ||
+ | ::: '''mged>''' labelface myobj | ||
+ | ::: '''mged>''' nmg myobj kill F 14 | ||
==Proposed subcommands== | ==Proposed subcommands== | ||
Line 46: | Line 53: | ||
: '''kill S''' | : '''kill S''' | ||
:: Removes the shell and its geometry for the selected shell. First, assigns a distinct color to each shell in the model and assigns a corresponding enumeration. Command returns lines for each shell. The line format is: shell # (selectable by user), and shell color. The output line text color is the shell color for that line. The geometry viewer labels all shells in their colors, until the shell is selected for removal at the subsequent prompt for input. | :: Removes the shell and its geometry for the selected shell. First, assigns a distinct color to each shell in the model and assigns a corresponding enumeration. Command returns lines for each shell. The line format is: shell # (selectable by user), and shell color. The output line text color is the shell color for that line. The geometry viewer labels all shells in their colors, until the shell is selected for removal at the subsequent prompt for input. | ||
− | |||
− | |||
− | |||
==Return Value(s)== | ==Return Value(s)== |
Revision as of 18:43, 13 August 2015
nmg design
Contents
Syntax
- nmg object subcommand [suffix]
Arguments
- object
- Name for the primitive that you want to operate on.
- subcommand
- Command specified to alter an NMG object. Each has it's own set of arguments.
Subcommands
- mm
- Creates a new NMG model structure and fills the appropriate fields. The result is an empty model.
- cmface
- Generates a manifold face in the first encountered shell of the NMG object. Vertices are listed as the suffix and define the winding-order of the face. Faces require at least three specified vertices, each specified by three coordinates. In addition to creating a face, the subcommand will join edges of the new face with dangling edges of other faces in the same shell. This makes it easier for the application to generate topologically correct, closed, manifold objects.
- kill V
- Removes the vertexuse and vertex geometry of the selected vertex (via its coordinates). When specifying vertex to be removed, user generally will display vertex coordinates in object via the MGED command labelvert.
- For example:
- mged> labelvert myobj
- mged> nmg myobj kill V 0.0 2.537 1.289
- For example:
- kill F
- Removes the faceuse and face geometry of the selected face (via its index). When specifying the face to be removed, user generally will display face indices in object via the MGED command labelface.
- For example:
- mged> labelface myobj
- mged> nmg myobj kill F 14
- For example:
Proposed subcommands
- make F
- Creates faces in first encountered region and shell. First, assigns a distinct color to each vertex in the model and assigns a corresponding enumeration. Command returns lines for each vertex. The line format is: vertex # (selectable by user), and vertex color. The output line text color is the vertex color for that line. The geometry viewer labels all vertices in their colors, until a face-list is entered at the subsequent prompt for input.
- For example:
- mged> nmg myobject make F
- mged> F 4 5 6 7 F 0 1 6 5 F 1 2 7 6 F 2 3 4 7 F 0 5 4 3
- For example:
- make V vertex-list
- Creates vertices in first encountered region and shell, using the vertex-list. For example: nmg myobject make V 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 1 1
- kill R
- Removes the region and its geometry for the selected region. First, assigns a distinct color to each region in the model and assigns a corresponding enumeration. Command returns lines for each region. The line format is: region # (selectable by user), and region color. The output line text color is the region color for that line. The geometry viewer labels all regions in their colors, until the region is selected for removal at the subsequent prompt for input.
- kill S
- Removes the shell and its geometry for the selected shell. First, assigns a distinct color to each shell in the model and assigns a corresponding enumeration. Command returns lines for each shell. The line format is: shell # (selectable by user), and shell color. The output line text color is the shell color for that line. The geometry viewer labels all shells in their colors, until the shell is selected for removal at the subsequent prompt for input.
Return Value(s)
- No Return Values for this command.
Description
- The "nmg" command is a command for creating, adding geometry, and manipulating NMG objects in BRL-CAD. All operations are result in the addition of manifold geometry to the object.
Example(s)
- mged> nmg cube mm
- Creates an empty NMG object.
- mged> nmg cube cmface 0 0 0 0 1 0 1 1 0 1 0 0
- Creates 1st face of a six-sided cube.
- mged> nmg cube cmface 1 0 1 0 0 1 0 1 1 1 1 1
- Creates 2nd face of a six-sided cube.
- mged> nmg cube cmface 0 0 0 0 1 0 0 1 1 0 0 1
- Creates 3rd face of a six-sided cube.
- mged> nmg cube cmface 0 1 0 1 1 0 1 1 1 0 1 1
- Creates 4th face of a six-sided cube.
- mged> nmg cube cmface 1 1 0 1 0 0 1 0 1 1 1 1
- Creates 5th face of a six-sided cube.
- mged> nmg cube cmface 0 0 0 0 0 1 1 0 1 1 0 0
- Creates 6th face of a six-sided cube.
See Also
- NMG Editing project idea page
- put for use with NMG objects
- brep command
- Wikipedia article on polygon mesh