BREP(nged)

NAME

brep - This command does a boundary representation which represents the solid geometry by describing the topology and corresponding geometry.

SYNOPSIS

brep {obj} [--no-evaluation] [command | brepname | suffix]

DESCRIPTION

If obj is not a brep object, then brep attempts to convert it to a brep object. If brepname is given, then brep defaults to obj_brep; if --no-evaluation is given, then brep attempts to convert a combination to an unevaluated BREP named suffix (again defaulting to obj_brep).

Otherwise, the behavior of brep is determined by which of these subcommands is specified:

info

Return count information (surfaces, curves, etc.) for a BREP.

info C [index | index-index]

Return information for a specific BREP '3D curve'.

info S [index | index-index]

Return information for a specific BREP 'surface'.

info F [index | index-index]

Return information for a specific BREP 'face'.

info T [index | index-index]

Return information for a specific BREP 'trim'.

info E [index | index-index]

Return information for a specific BREP 'edge'.

info TB [index | index-index]

Return information for a specific BREP 'piecewise bezier trim'.

info SB [index | index-index]

Return information for a specific BREP 'piecewise bezier surface'.

plot S [index | index-index]

Plot a specific BREP 'surface'.

plot Suv {index | index-index}{u}{v}

Plot a specific BREP 'surface' 3d point at specified uv.

plot UV {index | index-index}{u1}{u2}{v1}{v2}

Plot a specific BREP 'surface' 3d bounds at specified uv bounds.

plot F [index | index-index]

Plot a specific BREP 'face'.

plot I [index | index-index]

Plot a specific BREP 'isosurface'.

plot SN [index | index-index]

Plot a specific BREP 'surface normal'.

plot KN [index | index-index]

Plot a specific BREP 'surface knot'.

plot F2d [index | index-index]

Plot a specific BREP 'face in 2d'.

plot SBB [index | index-index]

Plot a specific BREP 'surfaceleafs'.

plot SBB2d [index | index-index]

Plot a specific BREP 'surfaceleafs in 2d'.

plot TD [index | index-index]

Plot a specific BREP 'trim direction'.

plot T [index | index-index]

Plot a specific BREP 'trim'.

plot T2d [index | index-index]

Plot a specific BREP 'trim in 2d'.

plot TBB [index | index-index]

Plot a specific BREP 'trimleafs'.

plot TBB2d [index | index-index]

Plot a specific BREP 'trimleafs in 2d'.

plot E [index | index-index]

Plot a specific BREP 'edge3d'.

plot SCV [index | index-index]

Plot a specific BREP 'nurbs control net'.

flip

Flip all faces in the BREP (turns it 'inside out').

translate {SCV} {index} {i} {j} {dx} {dy} {dz}

Translate a surface control vertex

intersect {obj2} {i} {j} [PP | PC | PS | CC | CS | SS]

Visualize intersecting two BREP objects. The last argument specifies what portions of each to intersect; if it is not specified, it defaults to SS:

PP

Intersect a point from the first object with a point from the second.

PC

Intersect a point from the first object with a curve from the second.

PS

Intersect a point from the first object with a surface from the second.

CC

Intersect a curve from the first object with a curve from of the second.

CS

Intersect a curve from the first object with a surface from the second

SS

Intersect a surface from the first object with a surface from the second.

u {obj2} {output}

Take the union of obj and obj2, storing the result in output.

i {obj2} {output}

Take the intersection of obj and obj2, storing the result in output.

- {obj2} {output}

Take the difference of obj and obj2, storing the result in output.

x {obj2} {output}

Take the exclusive or of obj and obj2, storing the result in output.

csg

Take the specified B-Rep and attempt to generate a CSG implicit boolean tree that will define the same solid shape.

EXAMPLES

Example 1. Info

mged> brep obj.randomobj info

This outputs general information about obj.randomobj, including counts of various entity types such as surfaces, curves, vertices, etc.

mged> brep obj.randomobj info F 2

Output info about the 2nd face of the BREP object obj.randomobj.

Example 2. Plot

mged> brep obj.randomobj plot S 1-3

This plots the 1st through 3rd surfaces of obj.randomobj in the graphics display window.

Example 3. Intersect

mged> brep obj.randomobj intersect sph2.randomobj 2 4

This displays the intersection of obj.randomobj’s 2nd surface with sph2.randomobj’s 4th surface.

mged> brep obj.randomobj intersect sph2.randomobj 3 2 PC

This displays the intersection of obj.randomobj’s 3rd point with sph2.randomobj’s 2nd curve.

AUTHOR

BRLCAD-TEAM

This software is Copyright (c) 1989-2021 by the United States Government as represented by U.S. Army Research Laboratory.

BUG REPORTS

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org