Editing MGED CMD nmg

From BRL-CAD

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{DesignDocument}}
 
 
 
=nmg ''design'' =
 
=nmg ''design'' =
 
__TOC__
 
__TOC__
  
 
==Syntax==
 
==Syntax==
:nmg object subcommand [suffix]
+
:nmg subcommand object [suffix]
  
 
==Arguments==
 
==Arguments==
Line 23: Line 21:
 
:: 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.
 
:: 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'''
+
==Proposed subcommands==
:: 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 [http://brlcad.org/wiki/MGED_CMD_labelvert labelvert]. '''Note: vertex selection via their index number is not currently supported.'''
+
: '''sface'''
 
+
:: Selects a face by highlighting it. Subsequent commands for manipulation or removal act on the selected face. By repeating this call, the currently selected face is advanced to the next face in the NMG object starting with the first encountered shell and region. ''If an optional point is specified, the subcommand finds the closest face to the point and selects that face instead.''
::For example: 
+
: '''deselect'''
::: '''mged>''' labelvert myobj 
+
:: Deselects all prior selected parts of the NMG object.   
::: '''mged>''' nmg myobj kill V 0.0 2.537 1.289
+
: '''kface'''
 
+
:: Removes the geometry and faceuse of the currently selected face.
: '''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
 
 
 
: ''' move V ''' ''x_initial y_initial z_initial x_final y_final z_final''
 
:: Moves an existing vertex specified by the coordinates ''x_initial y_initial z_initial'' to the position with coordinates ''x_final y_final z_final''.  
 
 
 
::For example:
 
::: '''mged>''' nmg myobject move V 1.0 1.0 1.0 2.0 2.0 2.0
 
 
 
: ''' make V ''' ''vertex-list''
 
:: Creates a new vertex and shell for all vertices, using the ''vertex-list''.  
 
 
 
::For example:
 
::: '''mged>''' 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
 
 
 
: ''' make F ''' ''face-list''
 
:: Creates face(s) in first encountered region and shell. General usage is to first label vertices with their index number using [[MGED_CMD_labelvert#Proposed_Argument.28s.29 | labelvert -i]].
 
   
 
::For example: 
 
::: '''mged>''' labelvert -i myobject
 
::: '''mged>''' nmg myobject make 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
 
 
 
'''Note: index numbers may change after 'make F' command. Thus, execute labelvert witht the -i option before each use of 'make F'.'''
 
  
 
==Return Value(s)==
 
==Return Value(s)==
Line 70: Line 41:
 
-->
 
-->
  
: '''mged>''' nmg cube mm
+
: '''mged>''' nmg mm cube
 
:: Creates an empty NMG object.
 
:: Creates an empty NMG object.
: '''mged>''' nmg cube cmface 0 0 0 0 1 0 1 1 0 1 0 0
+
: '''mged>''' nmg cmface cube 0 0 0 0 1 0 1 1 0 1 0 0
 
:: Creates 1st face of a six-sided cube.
 
:: Creates 1st face of a six-sided cube.
: '''mged>''' nmg cube cmface 1 0 1 0 0 1 0 1 1 1 1 1
+
: '''mged>''' nmg cmface cube 1 0 1 0 0 1 0 1 1 1 1 1
 
:: Creates 2nd face of a six-sided cube.
 
:: Creates 2nd face of a six-sided cube.
: '''mged>''' nmg cube cmface 0 0 0 0 1 0 0 1 1 0 0 1
+
: '''mged>''' nmg cmface cube 0 0 0 0 1 0 0 1 1 0 0 1
 
:: Creates 3rd face of a six-sided cube.
 
:: Creates 3rd face of a six-sided cube.
: '''mged>''' nmg cube cmface 0 1 0 1 1 0 1 1 1 0 1 1
+
: '''mged>''' nmg cmface cube 0 1 0 1 1 0 1 1 1 0 1 1
 
:: Creates 4th face of a six-sided cube.
 
:: Creates 4th face of a six-sided cube.
: '''mged>''' nmg cube cmface 1 1 0 1 0 0 1 0 1 1 1 1   
+
: '''mged>''' nmg cmface cube 1 1 0 1 0 0 1 0 1 1 1 1   
 
:: Creates 5th face of a six-sided cube.
 
:: Creates 5th face of a six-sided cube.
: '''mged>''' nmg cube cmface 0 0 0 0 0 1 1 0 1 1 0 0
+
: '''mged>''' nmg cmface cube 0 0 0 0 0 1 1 0 1 1 0 0
 
:: Creates 6th face of a six-sided cube.
 
:: Creates 6th face of a six-sided cube.
  

Please note that all contributions to BRL-CAD may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see BRL-CAD:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: