Difference between revisions of "MGED CMD brep"

From BRL-CAD
(New page: =brep= __TOC__ ==Syntax== :brep object info - return count information for specific BREP :brep object info S|F|T|E|SB|TB [index] - return information for specific BREP 'surface', 'face', ...)
 
(add brep object surface * commands)
 
(11 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
==Syntax==
 
==Syntax==
:brep object info - return count information for specific BREP
+
:brep object info [S|F|T|E|SB|TB] [index]
:brep object info S|F|T|E|SB|TB [index] - return information for specific BREP 'surface', 'face', 'trim', 'edge', 'surface bezier' or 'trim bezier', respectively.
+
:brep object plot [S|I|SN|KN|F|F2d|SBB|SBB2d|TD|T|T2d|TBB|TBB2d|E|SCV] [index]
:brep object plot - plot entire BREP
+
:brep object intersect object2 i j [PP|PC|PS|CC|CS|SS]
:brep plot S|I|SN|KN|F|F2d|SBB|SBB2d|TD|T|T2d|TBB|TBB2d|E|SCV [index] - plot specific BREP 'surface', 'isosurface', 'surface normal', 'surface knot', 'face trim', '2d face trim', 'surface leafs', '2d surface leafs', 'trim direction', 'trim', '2d trim', 'trim leafs', '2d trim leafs', 'edge' or 'surface CV', respectively.
+
:brep object [brepname]
:brep object1 intersect object2 i j [max_dis] - intersect object1's ith surface with object2's jth surface
+
:brep comb [suffix]
:brep object [brepname] - convert the non-BREP object to BREP form
+
:brep object curve [create|in|inter|remove|move|set_cv|flip|insert_knot|trim|split|join]
:brep comb [suffix] - convert non-BREP comb to unevaluated BREP form
+
:brep object surface [create|birail|remove|move|set_cv|trim|split|tensor]
  
 
==Argument(s)==
 
==Argument(s)==
: '''new_object'''
+
: '''object'''
:: Name for resultant Primitive
+
:: Name for the primitive that you want to operate on.
  
: '''old_object'''
+
: '''S'''
:: Name of source primitive or collection.
+
:: Plot or output info for a specific 'surface'.
  
 +
: '''F'''
 +
:: Plot or output info for a specific 'face'.
 +
 +
: '''T'''
 +
:: Plot or output info for a specific 'trim'.
 +
 +
: '''E'''
 +
:: Plot or output info for a specific 'edge'.
 +
 +
: '''SB'''
 +
:: Output 'bezier' info for a specific 'surface'.
 +
 +
: '''TB'''
 +
:: Output 'bezier' info for a specific 'trim'.
 +
 +
: '''I'''
 +
:: Plot a specific 'iso-surface'.
 +
 +
: '''SN'''
 +
:: Plot a specific 'surface normal'.
 +
 +
: '''KN'''
 +
:: Plot a specific 'surface's knots'.
 +
 +
: '''F2d'''
 +
:: Plot a specific 'face' in '2d-space'.
 +
 +
: '''SBB'''
 +
:: Plot a specific 'surface's leafs' (surface tree).
 +
 +
: '''SBB2d'''
 +
:: Plot a specific 'surface's leafs' in '2d-space'.
 +
 +
: '''TD'''
 +
:: Plot a specific 'trim direction'.
 +
 +
: '''T2d'''
 +
:: Plot a specific 'trim' in '2d-space'.
 +
 +
: '''TBB'''
 +
:: Plot a specific 'trim's leafs' (curve tree).
 +
 +
: '''TBB2d'''
 +
:: Plot a specific 'trim's leafs' in '2d-space'.
 +
 +
: '''SCV'''
 +
:: Plot a specific 'surface's CV'.
 +
 +
: '''index'''
 +
:: The index of the surface (face, edge, etc.) you want to plot or output info for. You can use a single number, 'number-number', or 'all'.
 +
 +
: '''object2'''
 +
:: The other object to intersect 'object'.
 +
 +
: '''i'''
 +
:: Intersect object's ith surface.
 +
 +
: '''j'''
 +
:: Intersect object2's jth surface.
 +
 +
: '''PP'''
 +
:: Point-point intersections.
 +
 +
: '''PC'''
 +
:: Point-curve intersections.
 +
 +
: '''PS'''
 +
:: Point-surface intersections.
 +
 +
: '''CC'''
 +
:: curve-curve intersections.
 +
 +
: '''CS'''
 +
:: curve-surface intersections.
 +
 +
: '''SS'''
 +
:: surface-surface intersections (default).
 +
 +
: '''brepname'''
 +
:: When convert a non-BREP object to BREP, the result BREP's name.
 +
 +
: '''comb'''
 +
:: The comb to be converted to non-evaluated BREP form.
 +
 +
: '''suffix'''
 +
:: The suffix in the generated BREPs' names.
 +
 +
: '''create'''
 +
:: Create a new NURBS curve or surface.
 +
 +
: '''in'''
 +
:: Create a new NURBS curve or surface given detailed description.
 +
 +
: '''inter'''
 +
:: Create a new NURBS curve interpolating given control vertices.
 +
 +
: '''remove'''
 +
:: Remove a NURBS curve or surface.
 +
 +
: '''move'''
 +
:: Move a NURBS curve or surface to a specified position.
 +
 +
: '''set_cv'''
 +
:: Set the control vertex of a NURBS curve.
 +
 +
: '''flip'''
 +
:: Flip the direction of a NURBS curve.
 +
 +
: '''insert_knot'''
 +
:: Insert a knot into a NURBS curve.
 +
 +
: '''trim'''
 +
:: Trim a NURBS curve using start and end parameters.
 +
 +
: '''split'''
 +
:: Split a NURBS curve into two at a parameter.
 +
 +
: '''join'''
 +
:: Join end of curve 1 to start of curve 2.
 +
 +
: '''birail'''
 +
:: create a new NURBS surface using two curves.
 +
 +
: '''set_cv'''
 +
:: set a control vertex of a NURBS surface to a specified position.
 +
 +
: '''trim'''
 +
:: trim a NURBS surface using start and end parameters.
 +
 +
: '''split'''
 +
:: split a NURBS surface into two given a parameter value.
 +
 +
: '''tensor'''
 +
:: create a new NURBS surface by tensor product of two curves.
  
 
==Return Value(s)==
 
==Return Value(s)==
Line 24: Line 158:
  
 
==Description==
 
==Description==
The "facetize" command creates new_object as a [[BRL-CAD_Primitives|BOT]] shape by tessellating all the primitive shapes in old_object and then performing any Boolean operations specified in old_object.
+
: The "brep" command is a command for debugging the NURBS (BREP) functionality in BRL-CAD. It can output info information for a specific object, plot its surfaces, faces, etc., and test the implicit to NURBS conversion and surface-surface intersection functionality.
 
 
  
 
==Example(s)==
 
==Example(s)==
: '''mged>''' facetize region1.nmg region1.r
+
: '''mged>''' brep obj.brep info F 0
:: Create a facetized BOT version of existing object region1.r.
+
:: Output information for the 0th face of obj.brep.
 
+
: '''mged>''' brep obj.brep plot S 0-2
 +
:: Plot the 0th to 2nd surfaces of obj.brep.
 +
: '''mged>''' brep sph1.brep intersect sph2.brep 0 0
 +
:: Intersect sph1.brep's 0th surface with sph2.brep's 0th surface. (When there's no intersection type specified, we compute SS intersections)
 +
: '''mged>''' brep obj.s obj.brep
 +
:: Convert implicit primitive obj.s to BREP form named obj.brep.
  
 
==See Also==
 
==See Also==
 
: No related commands.
 
: No related commands.

Latest revision as of 02:29, 12 July 2023

brep[edit]

Syntax[edit]

brep object info [S|F|T|E|SB|TB] [index]
brep object plot [S|I|SN|KN|F|F2d|SBB|SBB2d|TD|T|T2d|TBB|TBB2d|E|SCV] [index]
brep object intersect object2 i j [PP|PC|PS|CC|CS|SS]
brep object [brepname]
brep comb [suffix]
brep object curve [create|in|inter|remove|move|set_cv|flip|insert_knot|trim|split|join]
brep object surface [create|birail|remove|move|set_cv|trim|split|tensor]

Argument(s)[edit]

object
Name for the primitive that you want to operate on.
S
Plot or output info for a specific 'surface'.
F
Plot or output info for a specific 'face'.
T
Plot or output info for a specific 'trim'.
E
Plot or output info for a specific 'edge'.
SB
Output 'bezier' info for a specific 'surface'.
TB
Output 'bezier' info for a specific 'trim'.
I
Plot a specific 'iso-surface'.
SN
Plot a specific 'surface normal'.
KN
Plot a specific 'surface's knots'.
F2d
Plot a specific 'face' in '2d-space'.
SBB
Plot a specific 'surface's leafs' (surface tree).
SBB2d
Plot a specific 'surface's leafs' in '2d-space'.
TD
Plot a specific 'trim direction'.
T2d
Plot a specific 'trim' in '2d-space'.
TBB
Plot a specific 'trim's leafs' (curve tree).
TBB2d
Plot a specific 'trim's leafs' in '2d-space'.
SCV
Plot a specific 'surface's CV'.
index
The index of the surface (face, edge, etc.) you want to plot or output info for. You can use a single number, 'number-number', or 'all'.
object2
The other object to intersect 'object'.
i
Intersect object's ith surface.
j
Intersect object2's jth surface.
PP
Point-point intersections.
PC
Point-curve intersections.
PS
Point-surface intersections.
CC
curve-curve intersections.
CS
curve-surface intersections.
SS
surface-surface intersections (default).
brepname
When convert a non-BREP object to BREP, the result BREP's name.
comb
The comb to be converted to non-evaluated BREP form.
suffix
The suffix in the generated BREPs' names.
create
Create a new NURBS curve or surface.
in
Create a new NURBS curve or surface given detailed description.
inter
Create a new NURBS curve interpolating given control vertices.
remove
Remove a NURBS curve or surface.
move
Move a NURBS curve or surface to a specified position.
set_cv
Set the control vertex of a NURBS curve.
flip
Flip the direction of a NURBS curve.
insert_knot
Insert a knot into a NURBS curve.
trim
Trim a NURBS curve using start and end parameters.
split
Split a NURBS curve into two at a parameter.
join
Join end of curve 1 to start of curve 2.
birail
create a new NURBS surface using two curves.
set_cv
set a control vertex of a NURBS surface to a specified position.
trim
trim a NURBS surface using start and end parameters.
split
split a NURBS surface into two given a parameter value.
tensor
create a new NURBS surface by tensor product of two curves.

Return Value(s)[edit]

No Return Values for this command.


Description[edit]

The "brep" command is a command for debugging the NURBS (BREP) functionality in BRL-CAD. It can output info information for a specific object, plot its surfaces, faces, etc., and test the implicit to NURBS conversion and surface-surface intersection functionality.

Example(s)[edit]

mged> brep obj.brep info F 0
Output information for the 0th face of obj.brep.
mged> brep obj.brep plot S 0-2
Plot the 0th to 2nd surfaces of obj.brep.
mged> brep sph1.brep intersect sph2.brep 0 0
Intersect sph1.brep's 0th surface with sph2.brep's 0th surface. (When there's no intersection type specified, we compute SS intersections)
mged> brep obj.s obj.brep
Convert implicit primitive obj.s to BREP form named obj.brep.

See Also[edit]

No related commands.