USD BRep Python API#

The usd_brep package exposes the SM_API and SM_API_USD layers to Python through pybind11.

Installing#

pip install usd-brep

CPython 3.12 on Windows or Linux (x86_64, aarch64). The wheel bundles the OpenUSD runtime it was built against, so no separate OpenUSD installation is needed and nothing is added to the pxr namespace. On Windows it also needs the Microsoft Visual C++ Redistributable.

The prebuilt package is an alternative. Like the wheel, it bundles its OpenUSD runtime, including OpenUSD’s pxr modules, so you supply only a CPython 3.12 interpreter. It is importable once its python and usdpy directories are on PYTHONPATH and its lib and extraLibs directories are on the platform’s library search path (LD_LIBRARY_PATH on Linux, PATH on Windows), set before Python starts.

Using the Python API#

Functions are also grouped into submodule attributes of usd_brep (primitives, curves, surfaces, booleans, sweeps, fillets, offset, io, brep_ops, stitching, usd, …). These are pybind11 submodules rather than importable Python modules, so they are reached as attributes — usd_brep.usd.export_brep(...) — and the functions they hold are the same objects documented below.

The compiled module underneath is named _omni_solid and importing it directly still works, but usd_brep is the supported name: it also registers the library search path on Windows and points OMNISOLID_PLUGIN_PATH at the packaged omniSolid schema, both of which a bare import _omni_solid leaves to the caller.

Import usd_brep before opening any stage with pxr: it registers the omniSolid schema plugin, and OpenUSD ignores schema plugins registered after it has loaded its schema types. Otherwise, set PXR_PLUGINPATH_NAME to the omniSolid resources directory.

Reference#

BRep solid modeling with OpenUSD interop.

class usd_brep.BSplineCurveForm#

Members:

POLYLINE

CIRCULAR_ARC

ELLIPTIC_ARC

PARABOLIC_ARC

HYPERBOLIC_ARC

HELICAL_ARC

UNSPECIFIED

property name#
class usd_brep.BooleanOp#

Members:

UNION

DIFFERENCE

INTERSECTION

MERGE

property name#
class usd_brep.BooleanOp2D#

Members:

UNION

INTERSECTION

DIFFERENCE

EXCLUSIVE_OR

MERGE

property name#
class usd_brep.CapEnds#

End-cap selector for sweeps that distinguish a ‘start’ end from an ‘end’ end (draft_sweep, taper_extrude, sweep_along_planar_path). START and END map to the kernel’s profile-side and offset/path-side caps respectively; the docstring on each consumer spells out which side is which. Sweeps with a symmetric on/off contract (linear_sweep, pipe_sweep, …) keep their plain bool parameter.

Members:

NONE

START

END

BOTH

property name#
class usd_brep.ContinuityType#

Members:

UNDEFINED

DISCONTINUOUS

C0

G1

G1R

G1_G2

G1_G2_G3

C1

C1_G2

C1_G2_G3

C1_C2

C1_C2_G3

C1_C2_C3

C_INFINITY

property name#
class usd_brep.CurveParameterization#

Knot parameterization for point-interpolating curve fits (create_curve_interp_points). UNIFORM spaces knots evenly; CHORD_LENGTH and CENTRIPETAL space them by the distance between successive points (centripetal reduces overshoot on sharp turns).

Members:

UNIFORM

CHORD_LENGTH

CENTRIPETAL

property name#
class usd_brep.FilletXSect#

Members:

LINEAR

CIRCULAR

BLEND

property name#
class usd_brep.OffsetType#

Offset side selector for create_offset_profile. LEFT / RIGHT produce a one-sided offset; BOTH produces a two-sided band region. shell_result=True is only valid with LEFT or RIGHT.

Members:

LEFT

RIGHT

BOTH

property name#
class usd_brep.PolyBooleanOp#

Members:

UNION

INTERSECTION

DIFFERENCE

MERGE

PARTIAL_MERGE

property name#
exception usd_brep.TessellationError#
class usd_brep.TrimType#

Members:

KEEP_POINT

DELETE_POINT

SPLIT

property name#
usd_brep.boolean(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
*,
operation: _omni_solid.BooleanOp,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Combine two Breps with a boolean operation.

Parameters:
  • brep1 – Primary body. For DIFFERENCE this is the workpiece. Consumed by the operation.

  • brep2 – Tool body. For DIFFERENCE this is the cutting shape. Consumed by the operation.

  • operation – BooleanOp.{UNION, DIFFERENCE, INTERSECTION, MERGE}. Keyword-only.

Returns:

combined body. The two input Breps are consumed and must not be reused.

Return type:

Brep

Notes

SMLib uses exact NURBS surface-surface intersection, so results maintain exact geometry. DIFFERENCE is order-sensitive: boolean(A, B, operation=BooleanOp.DIFFERENCE) removes B from A.

See Also:
  • boolean_union – Convenience wrapper for UNION.

  • boolean_difference – Convenience wrapper for DIFFERENCE.

  • boolean_intersection – Convenience wrapper for INTERSECTION.

  • boolean_with_options – Same with cookie-cutter, imprinting flags.

  • merge_breps – N-ary version that combines a list in one call.

Wraps: SmApiBoolean

usd_brep.boolean_2d(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
*,
operation: _omni_solid.BooleanOp2D,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Combine two planar Breps with a 2D boolean operation.

Parameters:
  • brep1 – First planar body. Consumed by the operation.

  • brep2 – Second planar body. Consumed by the operation.

  • operation – BooleanOp2D.{UNION, INTERSECTION, DIFFERENCE, EXCLUSIVE_OR, MERGE}. Keyword-only.

Returns:

planar combined body.

Return type:

Brep

Notes

Both inputs must be coplanar planar bodies. EXCLUSIVE_OR is equivalent to (A union B) - (A intersect B).

See Also:
  • boolean – 3D boolean combination.

  • create_planar_faces – Build a planar Brep from curve loops.

Wraps: SmApiBoolean2d

usd_brep.boolean_difference(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Compute the boolean difference (subtractive) of two Breps.

Parameters:
  • brep1 – Workpiece body. Consumed by the operation.

  • brep2 – Tool body to subtract. Consumed by the operation.

Returns:

brep1 with brep2 carved out.

Return type:

Brep

Notes

Order-sensitive: boolean_difference(A, B) is not the same as boolean_difference(B, A).

See Also:
  • boolean – Generic operation taking a BooleanOp value.

  • boolean_union – Additive variant.

  • boolean_intersection – Common-overlap variant.

Wraps: SmApiBooleanDifference

usd_brep.boolean_intersection(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Compute the boolean intersection (common overlap) of two Breps.

Parameters:
  • brep1 – First body. Consumed by the operation.

  • brep2 – Second body. Consumed by the operation.

Returns:

region that is inside both bodies. If the inputs are disjoint, the result has no volume.

Return type:

Brep

See Also:
  • boolean – Generic operation taking a BooleanOp value.

  • boolean_union – Additive variant.

  • boolean_difference – Subtractive variant.

Wraps: SmApiBooleanIntersection

usd_brep.boolean_lists(
breps1: List[_omni_solid.Brep],
surfaces1: List[_omni_solid.Surface],
breps2: List[_omni_solid.Brep],
surfaces2: List[_omni_solid.Surface],
*,
operation: int,
) → tuple#

Consumes: breps1, surfaces1, breps2, surfaces2; returns new (breps, surfaces).

Combine lists of Breps and planar surfaces in one boolean operation.

Parameters:
  • breps1 – First list of Breps.

  • surfaces1 – First list of surfaces (treated as planar 2D regions).

  • breps2 – Second list of Breps.

  • surfaces2 – Second list of surfaces.

  • operation – Integer op selector: 0 = AND, 1 = OR, 2 = XOR, 3 = A minus B, 4 = B minus A. Keyword-only.

Returns:

pair (result_breps, result_surfaces). The surface list is populated only if all inputs were 2D.

Return type:

tuple[list[Brep], list[Surface]]

Notes

Uses an integer op selector rather than the BooleanOp enum because the operation set extends to XOR and the asymmetric B minus A form not present in the enum.

See Also:
  • merge_breps – Simpler N-ary Brep combine using BooleanOp.

  • boolean_2d – Single-Brep planar boolean.

Wraps: SmApiBooleanLists

usd_brep.boolean_merge(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Combine two Breps without removing any faces (non-manifold assembly).

Parameters:
  • brep1 – First body. Consumed by the operation.

  • brep2 – Second body. Consumed by the operation.

Returns:

merged body containing all faces of both inputs. Where the bodies touch, the result is non-manifold (more than two faces meet at an edge).

Return type:

Brep

Notes

Equivalent to boolean(brep1, brep2, BooleanOp.MERGE). Useful for assemblies of touching but non-penetrating parts.

See Also:
  • boolean_union – Material from either body, with shared region merged.

  • piecewise_merge – Per-face merge that preserves brep2.

Wraps: SmApiBooleanMerge

usd_brep.boolean_union(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Compute the boolean union (additive) of two Breps.

Parameters:
  • brep1 – First body. Consumed by the operation.

  • brep2 – Second body. Consumed by the operation.

Returns:

union of the two bodies (material from either).

Return type:

Brep

See Also:
  • boolean – Generic operation taking a BooleanOp value.

  • boolean_difference – Subtractive variant.

  • boolean_intersection – Common-overlap variant.

  • boolean_merge – Combine without removing any faces.

Wraps: SmApiBooleanUnion

usd_brep.boolean_with_curves(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
*,
operation: _omni_solid.BooleanOp,
) → tuple#

Consumes: brep1, brep2; returns new (Brep, list[Edge]).

Boolean combine two Breps and return the intersection edges.

Parameters:
  • brep1 – Primary body. Consumed by the operation.

  • brep2 – Tool body. Consumed by the operation.

  • operation – BooleanOp.{UNION, DIFFERENCE, INTERSECTION, MERGE}. Keyword-only.

Returns:

pair (result, intersection_edges) where intersection_edges are the edges of the result that lie on the intersection of the two input bodies (sourced from brep1).

Return type:

tuple[Brep, list[Edge]]

Notes

Useful when downstream code needs to reference the seam between the two bodies (e.g. for selective filleting).

See Also:
  • boolean – Same operation without returning intersection edges.

  • fillet_edges – Filleting of selected edges.

Wraps: SmApiBooleanWithCurves

usd_brep.boolean_with_options(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
*,
operation: _omni_solid.BooleanOp,
cookie_cutter: bool = False,
imprinting: bool = False,
post_process: bool = True,
imprint_and_classify: bool = False,
keep_other_brep: bool = False,
) → _omni_solid.Brep#

Consumes: brep1 (always), brep2 (unless keep_other_brep); returns new Brep.

Boolean combine two Breps with fine-grained behavior flags.

Parameters:
  • brep1 – Primary body. Consumed unless the result is sheet-only.

  • brep2 – Tool body. Consumed unless keep_other_brep is True.

  • operation – BooleanOp.{UNION, DIFFERENCE, INTERSECTION, MERGE}. Keyword-only (along with all flags below).

  • cookie_cutter – If True, only remove faces from brep1 (brep2 acts as a cookie cutter). Defaults to False.

  • imprinting – If True, imprint the intersection curves on brep1 and stop without removing material. Defaults to False.

  • post_process – If True (default), clean up redundant topological edges and vertices after the boolean.

  • imprint_and_classify – If True, imprint and mark faces for deletion without actually deleting them. Defaults to False.

  • keep_other_brep – If True, do not consume brep2 so it can be reused as a tool. Defaults to False.

Returns:

result of the operation under the supplied flags.

Return type:

Brep

See Also:

boolean – Plain boolean without behavior flags.

Wraps: SmApiBooleanWithOptions

usd_brep.brep_bounding_box(
brep: _omni_solid.Brep,
tight: bool = False,
) → tuple#

Axis-aligned bounding box of a Brep.

Parameters:
  • brep – Brep to query. Not modified.

  • tight – If True, compute the minimal bounding box by sampling each face’s surface (expensive). Default False returns the loose union of vertex / edge / face boxes.

Returns:

((min_x, min_y, min_z), (max_x, max_y, max_z)).

Return type:

tuple[tuple[float, float, float], tuple[float, float, float]]

See Also:
  • face_bounding_box – Single-face variant.

  • edge_bounding_box – Single-edge variant.

  • Brep.bounding_box – Method form on the Brep class.

Wraps: SmApiBrepBoundingBox

usd_brep.brep_closest_point(brep: _omni_solid.Brep, point: tuple) → tuple#

Find the globally closest point on a Brep to a query point.

Parameters:
  • brep – Brep to query. Not modified.

  • point – Query point as (x, y, z).

Returns:

(closest_point, distance) where closest_point lies on the Brep surface and distance is the Euclidean distance from point to closest_point.

Return type:

tuple[Point3d, float]

Notes

Returns one global minimum. For all globally closest solutions within solver tolerance use brep_closest_point_all.

See Also:
  • brep_closest_point_all – All globally closest solutions.

  • get_closest_point – Topology-driven variant returning a plain (x, y, z) tuple.

  • curve_closest_point – Curve variant.

  • surface_closest_point – Surface variant.

Wraps: SmApiBrepClosestPoint

usd_brep.brep_closest_point_all(brep: _omni_solid.Brep, point: tuple) → tuple#

Find all globally closest points on a Brep within solver tolerance.

Parameters:
  • brep – Brep to query. Not modified.

  • point – Query point as (x, y, z).

Returns:

(points, distances) where the lists are aligned. Element i is a closest-point candidate and the corresponding distance from point.

Return type:

tuple[list[tuple[float, float, float]], list[float]]

Notes

Useful when geometry has multiple equidistant or near-tied closest points (e.g. a point inside a sphere returns two antipodal candidates). For just the global minimum use brep_closest_point.

See Also:
  • brep_closest_point – Global-minimum variant.

  • curve_closest_point_all – Curve variant.

  • surface_closest_point – Surface variant returning one point and its known UV representations.

Wraps: SmApiBrepClosestPointAll

usd_brep.brep_copy(brep: _omni_solid.Brep) → _omni_solid.Brep#

Deep-copy a Brep into a fresh handle.

Parameters:

brep – Source Brep. Not modified.

Returns:

independent deep copy. Mutating the result does not affect the source. The new handle is owned by the SMLib kernel context (do not delete from Python).

Return type:

Brep

Notes

Useful when you need to apply an in-place mutator (e.g. fillet_edges, cut, translate) without disturbing the original Brep. Geometry types are preserved, including NURBS produced by turn_to_nurbs; no analytic recognition is performed.

See Also:

Brep.copy – Method form on the Brep class.

Wraps: SmApiBrepCopy

usd_brep.brep_distance(a: _omni_solid.Brep, b: _omni_solid.Brep) → float#

Distance between two Breps’ boundary surfaces.

Parameters:
  • a – First Brep.

  • b – Second Brep.

Returns:

gap between the two surfaces when the Breps are disjoint –

the wall clearance when one is nested inside the other – and 0.0 when they touch or interpenetrate. Equals the distance field of brep_relationship; use that when the number needs the arrangement to be meaningful.

Return type:

float

Wraps: SmApiBrepDistance

usd_brep.brep_relationship(a: _omni_solid.Brep, b: _omni_solid.Brep) → dict#

Classify how two Breps are arranged, with a distance.

Parameters:
  • a – First Brep.

  • b – Second Brep.

Returns:

{'relationship': str, 'distance': float}. relationship

is one of 'separate', 'touching', 'interpenetrating', 'a_contains_b', 'b_contains_a'. distance is the surface gap between the two surfaces – the wall clearance when one contains the other – and 0.0 when they touch or interpenetrate.

Return type:

dict

Note

Overlap/containment is decided by classifying sample points – each Brep’s vertices plus one interior point per face – against the other. A shallow or sliver overlap containing none of those points can still read as 'touching'; exact for typical CAD interference. Use brep_distance for just the distance number.

Wraps: SmApiBrepRelationship

usd_brep.chamfer_fillet(
brep: _omni_solid.Brep,
radius: float,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Chamfer (flat-bevel) every edge of a Brep.

Parameters:
  • brep – Brep to chamfer in place.

  • radius – Chamfer width: the straight-line distance across the chamfer face, between the lines where it meets the two adjacent faces. It is not the setback along each face: at a 90-degree edge each face is cut back by radius / sqrt(2). Must be positive and smaller than the minimum adjacent face dimension.

Notes

Applies to every edge with a constant-distance chamfer solver. fillet_edges with xsect_type=0 cuts flat between the lines where a circular fillet of that radius would meet the faces, so its radius is not a chamfer width: at a 90-degree edge it is the setback.

See Also:
  • circular_fillet – Round every edge instead of chamfering.

  • fillet_edges – Per-edge selection with cross-section choice.

Wraps: SmApiChamferFillet

usd_brep.circular_fillet(
brep: _omni_solid.Brep,
radius: float,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Apply a constant-radius circular fillet to every edge of a Brep.

Parameters:
  • brep – Brep to fillet in place.

  • radius – Fillet radius. Must be positive and smaller than the minimum adjacent face dimension. Rule of thumb: at most one third of the smallest adjacent face dimension to avoid adjacent fillets colliding.

Notes

Applies to every edge in the Brep. For selective filleting use fillet_edges.

See Also:
  • chamfer_fillet – Flat bevel instead of round.

  • fillet_edges – Per-edge selection with cross-section choice.

  • variable_radius_fillet – Radius varies along the edge.

  • remove_fillet – Defeature fillets.

Wraps: SmApiCircularFillet

usd_brep.compute_volume(
brep: _omni_solid.Brep,
relative_accuracy: float = 0.001,
) → float#

Compute the enclosed volume of a manifold-solid Brep.

Parameters:
  • brep – Manifold-solid Brep. Behaviour is undefined for sheet bodies (open shells); validate with is_manifold_solid first if uncertain.

  • relative_accuracy – Numerical-integration accuracy. Must be between 1.0e-1 (coarse, fast) and 1.0e-8 (fine, slow). Defaults to 1.0e-3; non-finite values raise RuntimeError.

Returns:

enclosed volume in cubic modeling units.

Return type:

float

Notes

Analytical primitives (boxes, spheres, cones) integrate to the closed-form value at any accuracy. Free-form NURBS bodies benefit from tighter accuracy.

See Also:

is_manifold_solid – Pre-check for a meaningful volume.

Wraps: SmApiBrepComputeVolume

usd_brep.convert_to_lines_and_arcs(
curve: _omni_solid.BSplineCurve,
) → List[_omni_solid.Curve]#

Convert a B-spline curve to a sequence of analytic lines and arcs.

Parameters:

curve – B-spline curve to convert.

Returns:

line and arc segments approximating the input curve. A line, an arc, or a curve smaller than the 0.001 fit tolerance is returned as a copy of itself. A degenerate curve (a point) raises RuntimeError.

Return type:

list[Curve]

Notes

Useful for downstream consumers (CAM toolpaths, DXF/IGES export) that prefer analytic geometry over general B-splines.

Wraps: SmApiConvertToLinesAndArcs

usd_brep.create_arc(
center: tuple,
radius: float,
start_angle_deg: float,
end_angle_deg: float,
) → _omni_solid.Curve#

Create a B-spline circular arc in the XY plane.

Parameters:
  • center – Center of the arc as (x, y, z). The arc lies in the plane Z = center.z.

  • radius – Radius of the arc. Must be positive.

  • start_angle_deg – Start angle measured counter-clockwise from the +X axis, in degrees.

  • end_angle_deg – End angle measured counter-clockwise from the +X axis, in degrees. Must differ from start_angle_deg.

Returns:

open B-spline arc swept counter-clockwise from start to end.

Return type:

Curve

See Also:

create_circle – Full closed circle.

Wraps: SmApiCreateArc

usd_brep.create_blend_primitive(
brep: _omni_solid.Brep,
edge1: _omni_solid.Edge,
face1: _omni_solid.Face,
edge2: _omni_solid.Edge,
face2: _omni_solid.Face,
same_dir_curves: bool = True,
) → _omni_solid.Face#

Create a G2 blend surface between two boundary edges on existing faces.

Parameters:
  • brep – Brep that will own the resulting blend face.

  • edge1 – First boundary edge on face1.

  • face1 – Target surface at the start of the blend.

  • edge2 – Second boundary edge on face2.

  • face2 – Target surface at the end of the blend.

  • same_dir_curves – If True (default), blend between the start of edge1’s curve and the start of edge2’s curve. If False, blend from the start of edge1’s curve to the end of edge2’s curve.

Returns:

resulting blend face inserted into brep.

Return type:

Face

Notes

“Blend” here means a continuity-controlled connecting patch (G2 by default in the kernel), distinct from edge-rounding fillets in the fillet_* family. Obtain edge and face handles from stable topology queries (brep.faces(), face.edges(), edge.faces()).

Wraps: SmApiCreateBlendPrimitive

usd_brep.create_box(
origin: tuple,
length: float,
width: float,
height: float,
) → _omni_solid.Brep#

Create a six-sided box or cube solid.

Parameters:
  • origin – Position at the lower-left corner of the solid as (x, y, z).

  • length – Distance along the X axis. Must be positive.

  • width – Distance along the Y axis. Must be positive.

  • height – Distance along the Z axis. Must be positive.

Returns:

axis-aligned box (6 planar faces, 12 edges, 8 vertices).

Return type:

Brep

Wraps: SmApiCreateBox

usd_brep.create_canonical_curve(points: List[tuple], knots: List[float], knot_multiplicities: List[int], weights: object = None, degree: int = 3, form: _omni_solid.BSplineCurveForm = <BSplineCurveForm.UNSPECIFIED: 6>) → _omni_solid.Curve#

Create a B-spline curve from a full canonical specification.

Parameters:
  • points – Control points as (x, y, z) tuples.

  • knots – Knot values, monotonically non-decreasing.

  • knot_multiplicities – Multiplicity of each knot. End-knot multiplicities must equal degree + 1; internal knot multiplicities must be at most degree.

  • weights – Optional list of per-control-point weights. None produces a non-rational B-spline. Defaults to None.

  • degree – Polynomial degree of the curve. Defaults to 3 (cubic).

  • form – Curve-form hint for downstream consumers. One of BSplineCurveForm.{POLYLINE, CIRCULAR_ARC, ELLIPTIC_ARC, PARABOLIC_ARC, HYPERBOLIC_ARC, HELICAL_ARC, UNSPECIFIED}. Defaults to UNSPECIFIED.

Returns:

B-spline curve constructed exactly per the supplied spec.

Return type:

Curve

See Also:

create_curve – Simpler version with auto-chosen knots and degree.

Wraps: SmApiCreateCanonicalCurve

usd_brep.create_circle(center: tuple, radius: float) → _omni_solid.Circle#

Create an analytic circle in the XY plane.

Parameters:
  • center – Center of the circle as (x, y, z). Each coordinate must be a valid double in [-1e18, 1e18]. The circle lies in the plane Z = center.z.

  • radius – Radius of the circle. Must be a valid double in [-1e18, 1e18] and greater than SM_EFF_ZERO (1e-12). An out-of-range center/radius, a radius at or below 1e-12, or a center whose magnitude dwarfs the radius so the extents collapse in double precision (e.g. center=(1e18,0,0) with radius=1) raises RuntimeError (SM_ERR_INVALID_INPUT).

Returns:

closed analytic circle. It is a BSplineCurve (so it

works anywhere a curve is accepted) and additionally exposes center(), radius(), normal(), x_axis(), and y_axis().

Return type:

Circle

Notes

The circle is constructed in the world XY plane and translated to center (x_axis = +X, y_axis = +Y, normal = +Z). For circles in non-axis-aligned planes use the C-API overload that takes an explicit axis placement (not currently bound).

See Also:
  • create_arc – Open circular arc with start/end angles.

  • create_ellipse – Ellipse with two principal radii.

Wraps: SmApiCreateCircle

usd_brep.create_cone(
origin: tuple,
radius_base: float,
radius_top: float,
height: float,
) → _omni_solid.Brep#

Create a solid cone.

Parameters:
  • origin – Position of the center of the base as (x, y, z).

  • radius_base – Radius at the base (Z = 0). Must be non-negative.

  • radius_top – Radius at the top (Z = height). Must be non-negative. Use 0 for a pointed cone; positive values produce a frustum (truncated cone).

  • height – Distance between base and top, along the Z axis. Must be positive.

Returns:

closed manifold solid (axis aligned along Z).

Return type:

Brep

See Also:
  • create_partial_cone – Conical sector between two angles.

  • create_cone_elliptic_ends – Cone with tilted elliptic end cross-sections.

Wraps: SmApiCreateCone

usd_brep.create_cone_elliptic_ends(
front_radius: float,
rear_radius: float,
height: float,
front_tilt_about_x_deg: float = 0.0,
rear_tilt_about_x_deg: float = 0.0,
front_tilt_about_y_deg: float = 0.0,
rear_tilt_about_y_deg: float = 0.0,
end_caps: bool = True,
) → _omni_solid.Brep#

Create a cone with elliptic ends and independent end tilts.

Parameters:
  • front_radius – Radius at the front end (before tilt). Must be positive.

  • rear_radius – Radius at the rear end (before tilt). Must be positive.

  • height – Distance between the centers of the two end ellipses. Must be positive.

  • front_tilt_about_x_deg – Front end rotation about the X axis, in degrees.

  • rear_tilt_about_x_deg – Rear end rotation about the X axis, in degrees.

  • front_tilt_about_y_deg – Front end rotation about the Y axis, in degrees.

  • rear_tilt_about_y_deg – Rear end rotation about the Y axis, in degrees.

  • end_caps – If True (default), close off the ends with cap faces.

Returns:

cone with tilted elliptic end cross-sections.

Return type:

Brep

Notes

Stability: this API is currently known to crash inside the kernel for some inputs (tracking ticket TBD; see source for details).

Naming differs from the C kernel: the SMLib parameters are dFront/RearYTiltDeg (rotation about X) and dFront/RearXTiltDeg (rotation about Y), where the X/Y letter refers to the direction the end tips toward. The Python names use the rotation axis directly to avoid that ambiguity.

See Also:

create_cone – Standard cone with circular cross-sections.

Wraps: SmApiCreateConeEllipticEnds

usd_brep.create_curve(points: List[tuple]) → _omni_solid.Curve#

Create a B-spline curve from a sequence of control points.

Parameters:

points – Ordered list of control points (x, y, z). Must contain at least four points.

Returns:

B-spline curve approximating the control polygon.

Return type:

Curve

Notes

The result is degree 3 (cubic) with knots spanning [0, 1]; the interior knots are not evenly spaced. The curve approximates the control points but is not guaranteed to pass through them.

See Also:
  • create_canonical_curve – Full B-spline spec with explicit knots, weights, degree, and form.

  • create_curve_approx_points – Fit (approximate) a curve to points.

  • create_curve_interp_points – Interpolate (pass through) points.

Wraps: SmApiCreateCurve

usd_brep.create_curve_approx_points(points: List[tuple]) → _omni_solid.Curve#

Create a B-spline curve that approximates (fits) a sequence of points.

Parameters:

points – Points to approximate as (x, y, z) tuples. Must contain at least two points.

Returns:

B-spline curve fit near the points (does not necessarily pass through them exactly).

Return type:

Curve

Notes

The result uses uniform knots on the parameter interval [0, 1].

See Also:
  • create_curve_interp_points – Interpolate (pass through) points exactly.

  • create_curve – Use the input points as control points instead of as fit targets.

Wraps: SmApiCreateCurveApproxPoints

usd_brep.create_curve_interp_points(points: List[tuple], *, parameterization: _omni_solid.CurveParameterization = <CurveParameterization.UNIFORM: 0>) → _omni_solid.Curve#

Create a B-spline curve that interpolates a sequence of points exactly.

Parameters:
  • points – Points to interpolate as (x, y, z) tuples. Requires at least four finite points (degree-3 fit); fewer points or a non-finite coordinate raises RuntimeError (SM_ERR_INVALID_INPUT). For the distance-based modes (CHORD_LENGTH and CENTRIPETAL) successive points must also be distinct: a coincident pair (including all-coincident input) has no defined spacing and raises RuntimeError (SM_ERR_INVALID_INPUT). UNIFORM tolerates duplicates.

  • parameterization – Knot spacing for the fit, a CurveParameterization value. UNIFORM (default) spaces knots evenly; CHORD_LENGTH and CENTRIPETAL space them by inter-point distance (centripetal reduces overshoot on sharp turns). Keyword-only.

Returns:

B-spline curve passing through every supplied point on the parameter interval [0, 1].

Return type:

Curve

See Also:
  • create_curve_approx_points – Fit (approximate) a curve to points.

  • create_curve – Use the input points as control points instead of as interpolation targets.

Wraps: SmApiCreateCurveInterpPoints

usd_brep.create_cylinder(
origin: tuple,
radius: float,
height: float,
) → _omni_solid.Brep#

Create a solid cylinder.

Parameters:
  • origin – Position of the center of the base as (x, y, z).

  • radius – Radius of the cylinder. Must be positive.

  • height – Distance between base and top, along the Z axis. Must be positive.

Returns:

capped manifold solid (axis aligned along Z).

Return type:

Brep

See Also:
  • create_partial_cylinder – Cylindrical sector between two angles.

  • create_cylindrical_box – Hollow cylinder sector defined by inside/outside radii.

Wraps: SmApiCreateCylinder

usd_brep.create_cylindrical_box(
origin: tuple,
length: float,
inside_radius: float,
outside_radius: float,
start_angle_deg: float,
end_angle_deg: float,
) → _omni_solid.Brep#

Create a cylindrical box (hollow cylinder sector).

Parameters:
  • origin – Position of the origin on the Z axis at the base as (x, y, z).

  • length – Length along the Z axis. Must be positive.

  • inside_radius – Inside radius from the Z axis. Must be positive.

  • outside_radius – Outside radius from the Z axis. Must be greater than inside_radius.

  • start_angle_deg – Start angle in the XY plane from the X axis, in degrees. Must be in [-360, 360].

  • end_angle_deg – End angle in the XY plane from the X axis, in degrees. Must be greater than start_angle_deg and at most 360 degrees beyond it.

Returns:

closed manifold solid (wedge-shaped section of a hollow cylinder, axis aligned along Z).

Return type:

Brep

See Also:
  • create_cylinder – Solid cylinder.

  • create_partial_cylinder – Solid cylinder sector (no inside hole).

Wraps: SmApiCreateCylindricalBox

usd_brep.create_ellipse(
origin: tuple,
radius1: float,
radius2: float,
) → _omni_solid.Curve#

Create an analytic ellipse in the XY plane.

Parameters:
  • origin – Center of the ellipse as (x, y, z). The ellipse lies in the plane Z = origin.z.

  • radius1 – Semi-axis length along the X direction. Must be positive.

  • radius2 – Semi-axis length along the Y direction. Must be positive.

Returns:

closed analytic ellipse.

Return type:

Curve

Notes

For radius1 == radius2 this produces a circle; prefer create_circle for that case.

See Also:

create_circle – Equal-radius case as a B-spline circle.

Wraps: SmApiCreateEllipse

usd_brep.create_extrude_surface(
curve: _omni_solid.BSplineCurve,
sweep_vector: tuple,
) → _omni_solid.Surface#

Create an extruded surface by sweeping a curve along a straight vector.

Parameters:
  • curve – Generatrix B-spline curve to extrude.

  • sweep_vector – Extrusion vector as (dx, dy, dz). Magnitude defines the extrusion length; direction defines the sweep direction. Must be non-zero.

Returns:

extruded surface.

Return type:

Surface

Notes

Produces a standalone surface, not a solid. For a solid extrusion of a closed profile use linear_sweep.

See Also:
  • create_sweep_surface – Sweep along an arbitrary path curve.

  • create_surface_revolution – Sweep along a circular axis.

  • linear_sweep – Solid extrusion of a closed profile.

Wraps: SmApiCreateExtrude

usd_brep.create_helix(
origin: tuple,
height: float,
radius_start: float,
radius_end: float,
turns: float,
*,
right_handed: bool = True,
tolerance: float = 0.0001,
) → _omni_solid.BSplineCurve#

Create a B-spline helix about the +Z axis.

Parameters:
  • origin – Base point (x, y, z). The helix is centered on the +Z axis through this point, running from Z = origin.z to origin.z + height and starting on the +X side.

  • height – Axial length along +Z. Must be in [1e-7, 1e18].

  • radius_start – Radius at the base (Z = origin.z). Must be in [1e-7, 1e18] (zero is rejected).

  • radius_end – Radius at the top (Z = origin.z + height). Must be in [1e-7, 1e18] (zero is rejected); a value different from radius_start produces a conical (tapered) helix.

  • turns – Number of full 360-degree revolutions over height. Fractional turns are allowed, but below ~1 turn the helix winds steeply (nearly straight): a tight tolerance may be unmeetable (raising SM_ERR_NOT_WITHIN_TOLERANCE – loosen it) and such near-straight paths may be rejected by pipe_sweep. Use turns >= 1 for a reliable sweep path. Must be in [1e-7, 124.25] (the upper bound is the fitter’s control-point limit).

  • right_handed – If True (default) the helix winds counter-clockwise about +Z; False gives a left-handed helix. Keyword-only.

  • tolerance – Guaranteed maximum 3D deviation of the returned curve from the true helix. Must be in [1e-6, 1e18]. This is a hard bound, not best-effort: the achieved deviation is verified after fitting and the call fails if it cannot be met (see Raises). Keyword-only.

Returns:

helical curve within tolerance of the analytic helix.

Return type:

BSplineCurve

Raises:

RuntimeError – if origin is not finite or any argument is outside the ranges above (NaN, infinity, non-positive, or too large all raise SM_ERR_INVALID_INPUT); or if the fit cannot meet tolerance (e.g. very many turns at a tight tolerance exceeds the fitter’s control-point limit), which raises SM_ERR_NOT_WITHIN_TOLERANCE and returns no curve.

Notes

The helix is built about the world +Z axis at origin. To orient it along another axis, transform the resulting curve.

See Also:

pipe_sweep – Sweep a circular profile along the helix to make a solid (spring, thread, coil). Best with turns >= 1; very low-turn (near-straight) helixes may be rejected, but the sweep never returns degenerate or fragmented topology.

Wraps: SmApiCreateHelix

usd_brep.create_line(start: tuple, direction: tuple) → _omni_solid.Curve#

Create an infinite line through a point in a given direction.

Parameters:
  • start – A point on the line as (x, y, z).

  • direction – Line direction as (dx, dy, dz). Must be non-zero; magnitude need not be unit length.

Returns:

analytical infinite line.

Return type:

Curve

See Also:

create_line_segment – Bounded line segment between two points.

Wraps: SmApiCreateLine

usd_brep.create_line_segment(start: tuple, end: tuple) → _omni_solid.Curve#

Create a straight line segment between two points.

Parameters:
  • start – Start point of the segment as (x, y, z).

  • end – End point of the segment as (x, y, z). Must be distinct from start.

Returns:

analytical line segment.

Return type:

Curve

See Also:

create_line – Infinite line through a point in a direction.

Wraps: SmApiCreateLineSegment

usd_brep.create_offset_profile(curves: List[_omni_solid.Curve], distance: float, *, offset_type: _omni_solid.OffsetType = <OffsetType.BOTH: 3>, round_corners: bool = True, shell_result: bool = False) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Create an offset region from a closed loop of planar curves.

Parameters:
  • curves – Coplanar curves forming at least one closed loop.

  • distance – Offset distance. Must be positive.

  • offset_type – OffsetType selector. LEFT / RIGHT produce a one-sided offset; BOTH (default) produces a two-sided band region. Keyword-only.

  • round_corners – If True (default), round expanding corners. False extends the corners linearly until they meet. Keyword-only.

  • shell_result – If True, return a shell topology instead of a face region. Only valid when offset_type is LEFT or RIGHT - not BOTH. Defaults to False. Keyword-only.

Returns:

sheet-body Brep representing the offset region.

Return type:

Brep

Notes

This is a curve-input operation that creates a new Brep, distinct from offset_brep which offsets an existing Brep’s surfaces.

See Also:
  • offset_brep – Offset the surfaces of an existing Brep.

  • offset_curve – Offset a single B-spline curve in 2D.

  • create_planar_faces – Build a planar Brep from curve loops without offsetting.

Wraps: SmApiCreateOffsetProfile

usd_brep.create_offset_surface(
surface: _omni_solid.Surface,
distance: float,
) → _omni_solid.Surface#

Create a surface offset from an existing surface along its normals.

Parameters:
  • surface – Source surface.

  • distance – Signed offset distance. Positive offsets along the surface normal; negative offsets opposite the normal. Must be non-zero.

Returns:

offset surface.

Return type:

Surface

Notes

If abs(distance) exceeds the surface’s minimum radius of curvature the result may self-intersect. An offset that collapses the surface (a sphere’s radius, a torus’s minor radius, or both cone radii shrinking to zero) produces no surface and raises RuntimeError.

See Also:
  • offset_curve – Offset a single curve in 2D.

  • offset_brep – Offset every face of a Brep.

Wraps: SmApiCreateOffsetSurface

usd_brep.create_partial_cone(
origin: tuple,
radius_base: float,
radius_top: float,
height: float,
start_angle_deg: float,
end_angle_deg: float,
) → _omni_solid.Brep#

Create a partial cone with start and end angles.

Parameters:
  • origin – Position of the center of the base as (x, y, z).

  • radius_base – Radius at the base. Must be non-negative.

  • radius_top – Radius at the top. Must be non-negative. Use 0 for a pointed apex.

  • height – Height of the cone, along the Z axis. Must be positive.

  • start_angle_deg – Start angle in the XY plane from the X axis, in degrees.

  • end_angle_deg – End angle in the XY plane from the X axis, in degrees. Must be greater than start_angle_deg.

Returns:

conical sector between start_angle_deg and end_angle_deg.

Return type:

Brep

See Also:
  • create_cone – Full cone.

  • create_partial_cylinder – Cylindrical sector (equal base and top radii).

Wraps: SmApiCreatePartialCone

usd_brep.create_partial_cylinder(
origin: tuple,
radius: float,
height: float,
start_angle_deg: float,
end_angle_deg: float,
) → _omni_solid.Brep#

Create a partial cylinder with start and end angles.

Parameters:
  • origin – Position of the center of the base as (x, y, z).

  • radius – Radius of the cylinder. Must be positive.

  • height – Height of the cylinder, along the Z axis. Must be positive.

  • start_angle_deg – Start angle in the XY plane from the X axis, in degrees.

  • end_angle_deg – End angle in the XY plane from the X axis, in degrees. Must be greater than start_angle_deg.

Returns:

cylindrical sector between start_angle_deg and end_angle_deg.

Return type:

Brep

Notes

Internally delegates to SmApiCreatePartialCone with equal base and top radii.

See Also:
  • create_cylinder – Full cylinder.

  • create_cylindrical_box – Hollow cylinder sector with inside/outside radii.

  • create_partial_cone – Conical sector with independent base/top radii.

Wraps: SmApiCreatePartialCylinder

usd_brep.create_partial_sphere(
origin: tuple,
radius: float,
start_angle_deg: float,
end_angle_deg: float,
) → _omni_solid.Brep#

Create a spherical wedge (azimuthal sector swept about the Z axis).

Parameters:
  • origin – Center of the sphere as (x, y, z).

  • radius – Radius of the sphere. Must be positive.

  • start_angle_deg – Start of the azimuthal sweep, measured in the XY plane from the X axis, in degrees.

  • end_angle_deg – End of the azimuthal sweep, measured in the XY plane from the X axis, in degrees. Must be greater than start_angle_deg.

Returns:

spherical wedge (lune) bounded by the two meridian half-disks at start_angle_deg and end_angle_deg, sweeping about the Z axis.

Return type:

Brep

Notes

The angular sweep is azimuthal (longitude-like, about Z), NOT latitudinal. create_partial_sphere(o, r, 0, 180) produces a hemisphere split along the YZ plane (an orange-wedge half), not the upper equatorial cap. Implementation: builds a pole-to-pole meridian half-circle at start_angle_deg and rotationally sweeps it about Z by end_angle_deg - start_angle_deg.

See Also:
  • create_sphere – Full sphere.

  • create_sphere_no_pole – Full sphere without polar singularities.

Wraps: SmApiCreatePartialSphere

usd_brep.create_partial_torus(
origin: tuple,
radius_major: float,
radius_minor: float,
start_angle_deg: float,
end_angle_deg: float,
) → _omni_solid.Brep#

Create a partial torus with start and end angles.

Parameters:
  • origin – Position of the center of the torus as (x, y, z).

  • radius_major – Major radius (center to tube center). Must be positive.

  • radius_minor – Minor radius (tube cross-section). Must be positive.

  • start_angle_deg – Start angle in the XY plane from the X axis, in degrees.

  • end_angle_deg – End angle in the XY plane from the X axis, in degrees. Must be greater than start_angle_deg.

Returns:

toroidal sector between start_angle_deg and end_angle_deg.

Return type:

Brep

See Also:

create_torus – Full torus.

Wraps: SmApiCreatePartialTorus

usd_brep.create_planar_circle(origin: tuple, radius: float) → _omni_solid.Brep#

Create a circular planar face (sheet body, not a solid).

Parameters:
  • origin – Center of the circular face as (x, y, z).

  • radius – Radius of the circle. Must be positive.

Returns:

single-face sheet body in the XY plane.

Return type:

Brep

See Also:

create_plane – Rectangular sheet body in the XY plane.

Wraps: SmApiCreatePlanarCircle

usd_brep.create_planar_faces(
curves: List[_omni_solid.Curve],
) → _omni_solid.Brep#

Consumes: curves; returns new Brep.

Build a sheet-body Brep made of planar faces from one or more closed planar curve loops.

Parameters:

curves – Coplanar curves forming one or more closed loops. Curves may be supplied in any order and any orientation, but they must not intersect each other and each endpoint must be coincident with exactly one other endpoint. Consumed on success: the new faces use them, so do not reuse them. On failure, the curves remain owned by the caller.

Returns:

sheet-body Brep whose faces are the planar regions bounded by the input loops.

Return type:

Brep

Notes

The plane of the result is inferred from the input curves; do not pass a plane normal. Multiple coplanar loops produce one face per loop (or with-holes faces if loops nest), all packed into a single Brep. Returns a sheet body (open shell), not a manifold solid - use linear_sweep to extrude into a solid.

See Also:
  • create_plane – Single-rectangle planar sheet.

  • linear_sweep – Solid extrusion of a closed profile.

Wraps: SmApiCreatePlanarFaces

usd_brep.create_plane(
origin: tuple,
length: float,
width: float,
) → _omni_solid.Brep#

Create a planar rectangular face (sheet body, not a solid).

Parameters:
  • origin – Position of the (minU, minV) corner as (x, y, z).

  • length – Length along the X axis. Must be positive.

  • width – Width along the Y axis. Must be positive.

Returns:

single-face sheet body in the XY plane (1 face, 4 edges, 4 vertices). is_manifold_solid returns False.

Return type:

Brep

See Also:

create_planar_circle – Circular sheet body in the XY plane.

Wraps: SmApiCreatePlane

usd_brep.create_pyramid(
origin: tuple,
length: float,
height: float,
) → _omni_solid.Brep#

Create a pyramid with a square base and an apex point.

Parameters:
  • origin – Position of the center of the base as (x, y, z).

  • length – Length and width of the square base. Must be positive.

  • height – Height from base to apex, along the Z axis. Must be positive.

Returns:

closed manifold solid (square base in the XY plane, apex on the Z axis).

Return type:

Brep

See Also:

create_cone – Pointed solid with a circular base (use radius_top=0).

Wraps: SmApiCreatePyramid

usd_brep.create_rectangle(
center: tuple,
length: float,
width: float,
) → List[_omni_solid.Curve]#

Create a rectangle as four B-spline line segments.

Parameters:
  • center – Center of the rectangle as (x, y, z). The rectangle lies in the plane Z = center.z.

  • length – Total length along the X axis. Must be positive and finite.

  • width – Total width along the Y axis. Must be positive and finite.

Returns:

four line segments forming a closed loop, ordered head to tail.

Return type:

list[Curve]

See Also:

create_regular_polygon – N-sided regular polygon as line segments.

Wraps: SmApiCreateRectangle

usd_brep.create_regular_polygon(
center: tuple,
sides: int,
radius: float,
) → List[_omni_solid.Curve]#

Create a regular polygon as a list of B-spline line segments.

Parameters:
  • center – Center of the polygon as (x, y, z). The polygon lies in the plane Z = center.z.

  • sides – Number of sides. Must be at least 3.

  • radius – Radius of the circumscribed circle (vertex-to-center distance). Must be positive and finite.

Returns:

sides line segments forming a closed loop, ordered head to tail.

Return type:

list[Curve]

See Also:

create_rectangle – Four-sided centered rectangle (length/width).

Wraps: SmApiCreateRegularPolygon

usd_brep.create_ruled_surface(
curve1: _omni_solid.BSplineCurve,
curve2: _omni_solid.BSplineCurve,
) → _omni_solid.Surface#

Create a ruled surface that linearly interpolates between two curves.

Parameters:
  • curve1 – First boundary B-spline curve.

  • curve2 – Second boundary B-spline curve.

Returns:

ruled surface formed by straight lines connecting corresponding points on the two curves.

Return type:

Surface

Notes

Best results require compatible parameterizations on the two curves. If they differ, call make_curves_compatible first.

See Also:
  • create_skin_surface – Lofted surface through three or more profiles.

  • make_curves_compatible – Reparameterize curves to share knots.

Wraps: SmApiCreateRuledSurface

usd_brep.create_silhouette_curves(
brep: _omni_solid.Brep,
plane_point: tuple,
plane_normal: tuple,
) → List[_omni_solid.Curve]#

Pure: returns new list[Curve]; brep unchanged.

Compute silhouette curves of a Brep as seen from a viewing plane.

Parameters:
  • brep – Brep to query. Not modified.

  • plane_point – Unused; the silhouette depends only on plane_normal. Accepted as (x, y, z) for compatibility.

  • plane_normal – Plane normal as (dx, dy, dz), interpreted as the viewing direction. Must be non-zero; does not need to be unit-length.

Returns:

silhouette curves on the Brep where the surface normal is perpendicular to the viewing direction.

Return type:

list[Curve]

Notes

Stability: this API is currently known to crash inside the kernel on some inputs. Differs from project_brep_onto_plane in that silhouettes pick up the curved-surface outline (e.g. the apparent edge of a sphere), not just the existing topological edges.

See Also:

project_brep_onto_plane – Edge-only projection variant.

Wraps: SmApiCreateSilhouetteCurves

usd_brep.create_skin_from_faces(
faces: List[_omni_solid.Face],
degree: int = 1,
) → tuple#

Create a lofted solid between matching loops on a sequence of faces.

Parameters:
  • faces – Sequence of faces whose boundary loops should be lofted between.

  • degree – Degree in the loft direction. 1 = linear (default), 2 = quadratic, 3 = cubic. Must be 1, 2, or 3.

Returns:

(new_faces, brep) where new_faces is the list of resulting lofted faces and brep is the lofted solid.

Return type:

tuple

See Also:

create_skin_primitive – Loft from raw cross-section curves instead of faces.

Wraps: SmApiCreateSkinFromFaces

usd_brep.create_skin_primitive(
curves_per_profile: List[int],
curves: List[_omni_solid.Curve],
degree: int = 1,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged. Create a lofted solid (skin) from a set of cross-section profile curves.

Parameters:
  • curves_per_profile – Number of curves in each cross-section profile. At least two positive counts are required, and sum(curves_per_profile) must equal len(curves).

  • curves – All profile curve segments concatenated, in profile order.

  • degree – Degree in the loft direction. 1 = linear (default), 2 = quadratic, 3 = cubic. Must be 1, 2, or 3.

  • cap_ends – If True (default), cap the first and last profiles to close the solid. Intermediate profiles guide the loft and do not create transverse faces.

Returns:

lofted solid.

Return type:

Brep

Notes

Input Curves remain valid and unchanged after both successful and failed calls. Planar profiles may contain matching outer and inner loops.

See Also:
  • create_skin_from_faces – Loft between boundary loops of existing faces.

  • create_swung_primitive – Surface of revolution from XY/XZ profiles.

Wraps: SmApiCreateSkinPrimitive

usd_brep.create_skin_surface(
profiles: List[_omni_solid.BSplineCurve],
) → _omni_solid.Surface#

Create a lofted (skinned) surface through a sequence of profile curves.

Parameters:

profiles – Ordered list of B-spline profile curves. Must contain at least two profiles.

Returns:

lofted surface passing through every profile.

Return type:

Surface

Notes

Best results require compatible parameterizations across all profiles. If they differ, call make_curves_compatible first.

See Also:
  • create_ruled_surface – Two-curve case (linear ruling).

  • make_curves_compatible – Reparameterize profiles to share knots.

Wraps: SmApiCreateSkin

usd_brep.create_sphere(origin: tuple, radius: float) → _omni_solid.Brep#

Create a solid sphere with poles.

Parameters:
  • origin – Center of the sphere as (x, y, z).

  • radius – Radius of the sphere. Must be non-zero; a negative radius gives the same sphere with a reversed (inside-out) parameterization.

Returns:

closed manifold solid.

Return type:

Brep

Notes

The standard NURBS sphere has degenerate poles at top and bottom and a seam edge where the periodic surface wraps.

See Also:
  • create_sphere_no_pole – Sphere built from patches that avoid pole singularities.

  • create_partial_sphere – Spherical sector between two angles.

Wraps: SmApiCreateSphere

usd_brep.create_sphere_no_pole(
center: tuple,
radius: float,
) → _omni_solid.Brep#

Create a sphere without singularities at the poles.

Parameters:
  • center – Center of the sphere as (x, y, z).

  • radius – Radius of the sphere. Must be non-zero; a negative radius gives the same sphere with a reversed (inside-out) parameterization.

Returns:

closed manifold solid.

Return type:

Brep

Notes

Constructs the sphere from patches that avoid the degenerate pole vertices of the standard NURBS sphere.

See Also:
  • create_sphere – Standard NURBS sphere (with poles).

  • create_partial_sphere – Spherical sector between two angles.

Wraps: SmApiCreateSphereNoPole

usd_brep.create_surface_from_corner_points(
corner_umin_vmin: tuple,
corner_umax_vmin: tuple,
corner_umin_vmax: tuple,
corner_umax_vmax: tuple,
) → _omni_solid.Surface#

Create a bilinear B-spline surface from four corner points.

Parameters:
  • corner_umin_vmin – Corner at (u=0, v=0) as (x, y, z).

  • corner_umax_vmin – Corner at (u=1, v=0) as (x, y, z).

  • corner_umin_vmax – Corner at (u=0, v=1) as (x, y, z).

  • corner_umax_vmax – Corner at (u=1, v=1) as (x, y, z).

Returns:

bilinear B-spline patch interpolating the four corners.

Return type:

Surface

Notes

Useful as a quick test surface or as a base for further trimming operations. Corners need not be coplanar - if they are not, the result is a doubly-curved hyperbolic paraboloid (saddle) patch.

See Also:

create_surface_from_points – Surface from a control-point grid.

Wraps: SmApiCreateSurfaceFromCornerPoints

usd_brep.create_surface_from_ordered_points(
points: List[tuple],
rows: int,
cols: int,
) → _omni_solid.Surface#

Create a B-spline surface that interpolates an ordered grid of points.

Parameters:
  • points – Grid of points in row-major order: P[row][col] = points[row * cols + col]. Total length must equal rows * cols.

  • rows – Number of rows in the point grid. Must be at least 2.

  • cols – Number of columns in the point grid. Must be at least 2.

Returns:

B-spline surface passing through every input point.

Return type:

Surface

Notes

Unlike create_surface_from_points (which uses the inputs as control points), this fits a surface that interpolates the points exactly.

See Also:
  • create_surface_from_points – Use inputs as control points instead.

  • create_surface_from_random_points – Fit through unordered points.

Wraps: SmApiCreateSurfaceFromOrderedPoints

usd_brep.create_surface_from_points(
control_points: List[tuple],
rows: int,
cols: int,
) → _omni_solid.Surface#

Create a B-spline surface from a grid of control points.

Parameters:
  • control_points – Grid of control points in row-major order: P[row][col] = control_points[row * cols + col]. Total length must equal rows * cols.

  • rows – Number of rows in the control-point grid. Must be at least 2.

  • cols – Number of columns in the control-point grid. Must be at least 2.

Returns:

B-spline surface that approximates the control polygon.

Return type:

Surface

Notes

The surface approximates the control points but does not necessarily interpolate them. For interpolation through a fixed grid use create_surface_from_ordered_points.

See Also:
  • create_surface_from_corner_points – Bilinear patch from 4 corners.

  • create_surface_from_ordered_points – Fit through an ordered grid.

  • create_surface_from_random_points – Fit through unordered points.

Wraps: SmApiCreateSurface

usd_brep.create_surface_from_random_points(
points: List[tuple],
) → _omni_solid.Surface#

Fit a B-spline surface through an unordered cloud of points.

Parameters:

points – Unordered point cloud as a list of (x, y, z) tuples.

Returns:

B-spline surface fit to the input cloud.

Return type:

Surface

Notes

The kernel infers a parameterization from the spatial distribution of the points; results are sensitive to point density and outlier points. For known grid topology prefer create_surface_from_ordered_points.

See Also:

create_surface_from_ordered_points – Fit through an ordered grid.

Wraps: SmApiCreateSurfaceFromRandomPoints

usd_brep.create_surface_revolution(
curve: _omni_solid.BSplineCurve,
origin: tuple,
axis: tuple,
angle_deg: float,
) → _omni_solid.Surface#

Create a surface of revolution by rotating a curve about an axis.

Parameters:
  • curve – Generatrix B-spline curve to revolve.

  • origin – Point on the axis of revolution as (x, y, z).

  • axis – Direction vector of the axis as (dx, dy, dz). Must be non-zero.

  • angle_deg – Sweep angle, in degrees. Use 360 for a closed surface of revolution.

Returns:

surface of revolution.

Return type:

Surface

Notes

The generatrix should not cross the rotation axis - that produces self-intersection. The result is a standalone surface, not a solid; for a solid of revolution use rotational_sweep.

See Also:
  • create_extrude_surface – Linear sweep along a vector.

  • create_sweep_surface – Sweep along a path curve.

Wraps: SmApiCreateSurfaceRevolution

usd_brep.create_sweep_surface(
curve: _omni_solid.BSplineCurve,
path: _omni_solid.BSplineCurve,
) → _omni_solid.Surface#

Create a swept surface by sweeping a profile curve along a path curve.

Parameters:
  • curve – Generatrix profile B-spline curve.

  • path – Sweep-path B-spline curve.

Returns:

swept surface.

Return type:

Surface

See Also:
  • create_extrude_surface – Sweep along a straight vector.

  • create_surface_revolution – Sweep around an axis.

  • pipe_sweep – Solid pipe along a path.

Wraps: SmApiCreateSweep

usd_brep.create_swung_primitive(
xy_curves: List[_omni_solid.Curve],
xz_curves: List[_omni_solid.Curve],
scale: float = 1.0,
) → _omni_solid.Brep#

Create a swung solid from XY and XZ profile curves.

Parameters:
  • xy_curves – Curves defining the XY profile.

  • xz_curves – Curves defining the XZ profile.

  • scale – Scale factor (default 1.0). Must be positive.

Returns:

swung solid.

Return type:

Brep

See Also:

create_skin_primitive – Lofted solid from cross-section profile curves.

Wraps: SmApiCreateSwungPrimitive

usd_brep.create_torus(
origin: tuple,
radius_major: float,
radius_minor: float,
) → _omni_solid.Brep#

Create a solid torus.

Parameters:
  • origin – Position of the center of the torus as (x, y, z).

  • radius_major – Distance from the torus center to the tube center. Must be positive.

  • radius_minor – Radius of the tube cross-section. Must be positive.

Returns:

closed manifold solid (major circle in the XY plane, tube circling around Z).

Return type:

Brep

Notes

For a standard torus radius_major should be greater than radius_minor. Equal radii give a self-intersecting horn torus; radius_minor > radius_major gives a spindle torus.

See Also:

create_partial_torus – Toroidal sector between two angles.

Wraps: SmApiCreateTorus

usd_brep.curve_closest_point(curve: _omni_solid.Curve, point: tuple) → tuple#

Find the globally closest point on a curve to a query point.

Parameters:
  • curve – Curve to query. Not modified.

  • point – Query point as (x, y, z).

Returns:

(closest_point, parameter, distance) where parameter is the curve parameter at closest_point.

Return type:

tuple[Point3d, float, float]

See Also:
  • curve_closest_point_all – All globally closest solutions.

  • brep_closest_point – Brep variant.

  • surface_closest_point – Surface variant.

  • evaluate_curve – Evaluate the curve at a known parameter.

Wraps: SmApiCurveClosestPoint

usd_brep.curve_closest_point_all(
curve: _omni_solid.Curve,
point: tuple,
) → tuple#

Find all globally closest points on a curve within solver tolerance.

Parameters:
  • curve – Curve to query. Not modified.

  • point – Query point as (x, y, z).

Returns:

(points, parameters, distances) where the three lists are aligned by index.

Return type:

tuple[list[tuple[float, float, float]], list[float], list[float]]

See Also:
  • curve_closest_point – Global-minimum variant.

  • brep_closest_point_all – Brep variant.

Wraps: SmApiCurveClosestPointAll

usd_brep.curve_sweep(
profile_curves: List[_omni_solid.Curve],
path_curve: _omni_solid.BSplineCurve,
scale_reference: _omni_solid.BSplineCurve = None,
scale_curve: _omni_solid.BSplineCurve = None,
*,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Sweep a profile along a path curve, with optional variable scaling.

Parameters:
  • profile_curves – Profile curves to sweep.

  • path_curve – B-spline path curve.

  • scale_reference – Optional B-spline reference curve defining the baseline scale at each point along the path. None for no scaling.

  • scale_curve – Optional B-spline curve whose distance from scale_reference defines the scale factor at each point. None for no scaling. Must be supplied together with scale_reference.

  • cap_ends – If True (default), cap both ends so a closed profile produces a manifold solid. If False, return the open swept shell. Capping requires a closed profile.

Returns:

swept body, with cross-sections scaled per the optional scale curves.

Return type:

Brep

See Also:
  • pipe_sweep – Constant-radius circular cross-section along a path.

  • curve_sweep_from_faces – Same operation taking face edge loops.

  • curve_sweep_from_edges – Same operation taking edges.

Wraps: SmApiCreateCurveSweep

usd_brep.curve_sweep_from_edges(
edges: List[_omni_solid.Edge],
path_curve: _omni_solid.BSplineCurve,
scale_reference: _omni_solid.BSplineCurve = None,
scale_curve: _omni_solid.BSplineCurve = None,
*,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Sweep edges along a path curve, with optional scaling.

Parameters:
  • edges – Edges whose curves define the swept profiles.

  • path_curve – B-spline path curve.

  • scale_reference – Optional B-spline scale reference; see curve_sweep for details. None for no scaling.

  • scale_curve – Optional B-spline scale curve. Must be supplied together with scale_reference.

  • cap_ends – If True (default), cap both ends so a closed profile produces a manifold solid. If False, return the open swept shell.

Returns:

swept body.

Return type:

Brep

See Also:
  • curve_sweep – Same operation taking standalone profile curves.

  • curve_sweep_from_faces – Same operation taking face edge loops.

Wraps: SmApiCreateCurveSweepFromEdges

usd_brep.curve_sweep_from_faces(
faces: List[_omni_solid.Face],
path_curve: _omni_solid.BSplineCurve,
scale_reference: _omni_solid.BSplineCurve = None,
scale_curve: _omni_solid.BSplineCurve = None,
*,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Sweep face edge loops along a path curve, with optional scaling.

Parameters:
  • faces – Faces whose outer-edge loops define the swept profiles.

  • path_curve – B-spline path curve.

  • scale_reference – Optional B-spline scale reference; see curve_sweep for details. None for no scaling.

  • scale_curve – Optional B-spline scale curve. Must be supplied together with scale_reference.

  • cap_ends – If True (default), cap both ends so a closed profile produces a manifold solid. If False, return the open swept shell.

Returns:

swept body.

Return type:

Brep

See Also:
  • curve_sweep – Same operation taking standalone profile curves.

  • curve_sweep_from_edges – Same operation taking edges.

Wraps: SmApiCreateCurveSweepFromFaces

usd_brep.cut(
brep: _omni_solid.Brep,
plane_point: tuple,
plane_normal: tuple,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Cut a Brep with a plane, keeping the half-space on the positive normal side.

Parameters:
  • brep – Brep to cut in place. The removed half is discarded.

  • plane_point – Any point on the cutting plane as (x, y, z).

  • plane_normal – Plane normal as (dx, dy, dz). The half-space in the direction of this normal is kept; flip the normal to keep the other half. Must be non-zero; does not need to be unit-length.

Notes

A new planar face is created at the cut. If the plane does not intersect the Brep, the Brep is unchanged. For a non-destructive section curve, use intersect_brep_with_plane.

See Also:
  • intersect_brep_with_plane – Non-destructive section curves.

  • project_and_trim – Trim a Brep using a projected curve loop.

  • trim_project_parallel – Trim faces with parallel curve projection.

Wraps: SmApiCut

usd_brep.draft_sweep(curves: List[_omni_solid.Curve], height: float, angle_deg: float, *, fillet_corners: bool = False, cap_ends: _omni_solid.CapEnds = <CapEnds.BOTH: 3>) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Extrude a planar profile with a draft (taper) angle.

Parameters:
  • curves – Profile curves. Must form a closed planar loop.

  • height – Extrusion height, in modeling units. Must be non-zero.

  • angle_deg – Draft angle in degrees. 0 produces a straight extrusion (equivalent to linear_sweep); positive values taper the walls inward.

  • fillet_corners – If True, round expanding corners between adjacent drafted faces (SM_OC_FILLET_CORNER). If False (default), extend corners linearly until they intersect (SM_OC_LINEAR_EXTENSION). Keyword-only.

  • cap_ends – CapEnds selector. START caps the original profile end; END caps the drafted (offset) end; BOTH (default) caps both; NONE leaves the result open. Keyword-only.

Returns:

drafted body.

Return type:

Brep

See Also:
  • taper_extrude – Similar with an explicit inner/outer draft convention and signed height.

  • linear_sweep – Zero-draft case.

Wraps: SmApiCreateDraftSweep

usd_brep.drop_curve_to_surface(
curve: _omni_solid.BSplineCurve,
surface: _omni_solid.Surface,
) → List[_omni_solid.Curve]#

Drop a 3D curve onto a surface along the surface normals.

Parameters:
  • curve – 3D B-spline curve to drop.

  • surface – Target surface.

Returns:

3D curves on the surface produced by drop-and-trim.

Return type:

list[Curve]

Notes

Internally drops the curve into the surface’s natural UV domain, trims against the domain, and lifts the trimmed UV curves back to 3D. Equivalent to project_curve_to_surface but uses a fixed drop tolerance (project_curve_to_surface derives a tolerance from the curve’s bounding box).

See Also:
  • project_curve_to_surface – Same operation with a bbox-derived tolerance.

  • lift_uv_curve – Inverse operation - lift a 2D UV curve to 3D.

Wraps: SmApiDropCurveToSrf

usd_brep.edge_bounding_box(
edge: _omni_solid.Edge,
tight: bool = False,
) → tuple#

Axis-aligned bounding box of a single edge.

Parameters:
  • edge – Edge to query. Not modified.

  • tight – If True, evaluate the edge’s curve at sample points for a minimal box (expensive). Default False returns the loose curve-control-polygon box.

Returns:

((min_x, min_y, min_z), (max_x, max_y, max_z)).

Return type:

tuple[tuple[float, float, float], tuple[float, float, float]]

See Also:
  • Edge.bounding_box – Method form on the Edge class.

  • brep_bounding_box – Whole-Brep variant.

Wraps: SmApiEdgeBoundingBox

usd_brep.edge_length(
edge: _omni_solid.Edge,
desired_accuracy: float = 1e-06,
) → float#

3D arc length of an edge over its parametric interval.

Parameters:
  • edge – Edge to query. Not modified.

  • desired_accuracy – Absolute distance tolerance for the arc-length integration. Defaults to 1e-6 modeling units.

Returns:

arc length in modeling units.

Return type:

float

See Also:

Edge.length – Method form on the Edge class.

Wraps: SmApiEdgeComputeLength

usd_brep.evaluate_continuity(
curve: _omni_solid.Curve,
parameter: float,
) → _omni_solid.ContinuityType#

Classify the parametric continuity of a curve at a given parameter.

Parameters:
  • curve – Curve to evaluate.

  • parameter – Parameter within curve.parameter_range() (endpoints included).

Returns:

continuity classification at the parameter, including mixed parametric/geometric classes such as C1_G2_G3.

Return type:

ContinuityType

Raises:

RuntimeError – SM_ERR_INVALID_INPUT for a null curve or a parameter outside the range (including NaN); otherwise reports the kernel’s continuity-evaluation failure.

Notes

Internally evaluates the curve from the left and from the right and compares position, tangent direction, and higher-derivative agreement to assign the continuity class.

See Also:

evaluate_curve – Position and derivative values at a parameter.

Wraps: SmApiEvaluateContinuity

usd_brep.evaluate_csg_tree(
breps: List[_omni_solid.Brep],
postfix_tree: List[int],
) → List[_omni_solid.Brep]#

Mutates: breps; returns the rewritten breps list (result first).

Evaluate a CSG tree of boolean operations expressed in postfix form.

Parameters:
  • breps – Input Breps referenced by index from postfix_tree. Modified in place: the result and any unused inputs are returned in the output list.

  • postfix_tree – CSG expression in postfix (reverse Polish) notation. Operand entries are non-negative indices into breps; operator entries encode BooleanOp values.

Returns:

result Brep first, followed by any input Breps that were not consumed by the tree.

Return type:

list[Brep]

See Also:
  • merge_breps – Single-operation N-ary combine.

  • boolean – Pairwise boolean.

Wraps: SmApiBooleanTrees

usd_brep.evaluate_curve(curve: _omni_solid.Curve, parameter: float) → dict#

Evaluate a curve at a parametric value, returning point and derivatives.

Parameters:
  • curve – Curve to evaluate.

  • parameter – Parameter value, in the curve’s natural parametric domain.

Returns:

with keys "point" (3D position), "tangent" (first derivative) and "curvature" (second derivative). Each value is an (x, y, z) tuple.

Return type:

dict

See Also:
  • Curve.evaluate – Position-only convenience method.

  • Curve.parameter_range – Valid range for parameter.

  • evaluate_continuity – Continuity classification at a parameter.

Wraps: SmApiEvaluateCurve

usd_brep.evaluate_surface_derivatives(
surface: _omni_solid.Surface,
u: float,
v: float,
) → tuple#

Evaluate position and first partial derivatives at a parametric point.

Parameters:
  • surface – Surface to evaluate. Not modified.

  • u – Parametric U coordinate.

  • v – Parametric V coordinate.

Returns:

tuple[tuple[float, float, float], tuple[float, float, float], tuple[float, float, float]]: ((px, py, pz), (dux, duy, duz), (dvx, dvy, dvz)) - the 3D point, the partial derivative with respect to U, and the partial derivative with respect to V.

Notes

The cross product du cross dv, normalized, is the surface normal at (u, v) and matches the result of evaluate_surface_normal (up to sign).

See Also:
  • evaluate_surface_point – 3D position alone.

  • evaluate_surface_normal – Normal alone.

Wraps: SmApiEvaluateSurfaceDerivatives

usd_brep.evaluate_surface_normal(
surface: _omni_solid.Surface,
u: float,
v: float,
) → tuple#

Evaluate the surface normal at a parametric (u, v) point.

Parameters:
  • surface – Surface to evaluate. Not modified.

  • u – Parametric U coordinate.

  • v – Parametric V coordinate.

Returns:

unit normal (nx, ny, nz).

Return type:

tuple[float, float, float]

Notes

The normal direction follows the surface’s intrinsic orientation (sign of du cross dv); on a Brep face it may be flipped relative to the face’s outward normal.

See Also:
  • evaluate_surface_point – 3D position at the same point.

  • evaluate_surface_derivatives – Underlying du, dv.

Wraps: SmApiEvaluateSurfaceNormal

usd_brep.evaluate_surface_point(
surface: _omni_solid.Surface,
u: float,
v: float,
) → tuple#

Evaluate the 3D position of a surface at a parametric (u, v) point.

Parameters:
  • surface – Surface to evaluate. Not modified.

  • u – Parametric U coordinate. Must lie in the surface’s U range.

  • v – Parametric V coordinate. Must lie in the surface’s V range.

Returns:

3D point (x, y, z) on the surface.

Return type:

tuple[float, float, float]

See Also:
  • evaluate_surface_normal – Surface normal at the same point.

  • evaluate_surface_derivatives – Point + first partials.

  • surface_closest_point – Inverse query (3D point -> (u, v)).

Wraps: SmApiEvaluateSurfacePoint

usd_brep.face_area(
face: _omni_solid.Face,
relative_accuracy: float = 0.001,
) → float#

Surface area of a face within its trim boundary.

Parameters:
  • face – Face to query. Not modified.

  • relative_accuracy – Numerical-integration accuracy in [1e-4, 1e-1]. Defaults to 1e-3. Out-of-range values are clamped.

Returns:

positive surface area in square modeling units. The return is unsigned regardless of face orientation.

Return type:

float

See Also:
  • Face.area – Method form on the Face class.

  • compute_volume – Brep volume counterpart.

Wraps: SmApiFaceComputeArea

usd_brep.face_bounding_box(
face: _omni_solid.Face,
tight: bool = False,
) → tuple#

Axis-aligned bounding box of a single face.

Parameters:
  • face – Face to query. Not modified.

  • tight – If True, sample the face’s surface within its trim boundary for a minimal box (expensive). Default False returns the loose face-level box.

Returns:

((min_x, min_y, min_z), (max_x, max_y, max_z)).

Return type:

tuple[tuple[float, float, float], tuple[float, float, float]]

See Also:
  • Face.bounding_box – Method form on the Face class.

  • brep_bounding_box – Whole-Brep variant.

Wraps: SmApiFaceBoundingBox

usd_brep.fillet_edges(
brep: _omni_solid.Brep,
edges: List[_omni_solid.Edge],
*,
radius: float,
xsect_type: int = 1,
continuity: int = 1,
thumbweight: float = 1.0,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Fillet selected edges of a Brep with a chosen cross-section type.

Parameters:
  • brep – Brep to fillet in place.

  • edges – Edges of brep to fillet (typically a subset of brep.edges()).

  • radius – Fillet radius. Must be positive. Keyword-only.

  • xsect_type – Cross-section integer: 0 = linear (not the constant-distance chamfer_fillet solver), 1 = circular (default), 2 = blend (variable continuity blend curve). These are not the FilletXSect values: FilletXSect.LINEAR is 1 and selects circular. Keyword-only.

  • continuity – For xsect_type == 2: 1 = G1 (tangent), 2 = G2 (curvature), 3 = G3. Ignored for other cross-section types. Defaults to 1. Where three filleted edges meet, only G1 continuity is guaranteed across the corner-patch boundary. Keyword-only.

  • thumbweight – Fullness control for blend cross-sections; values greater than 1 produce a fuller blend, less than 1 a thinner one. Ignored unless xsect_type == 2. Defaults to 1.0. Keyword-only.

Notes

Use G2 for visible consumer surfaces, G3 for automotive Class-A.

See Also:
  • circular_fillet – Apply a circular fillet to all edges.

  • chamfer_fillet – Apply a chamfer to all edges.

  • variable_radius_fillet – Linearly varying radius along the edge.

  • fillet_edges_per_edge – Per-edge radius and cross-section.

  • fillet_preview – Compute the fillet surfaces without modifying the Brep.

Wraps: SmApiFilletEdges

usd_brep.fillet_edges_per_edge(
brep: _omni_solid.Brep,
edges: List[_omni_solid.Edge],
radii: List[float],
xsect_types: List[_omni_solid.FilletXSect],
*,
continuity: int = 1,
thumbweight: float = 1.0,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Fillet selected edges with a per-edge radius and cross-section type.

Parameters:
  • brep – Brep to fillet in place.

  • edges – Edges to fillet.

  • radii – Per-edge fillet radius. Length must equal len(edges). Each value must be positive.

  • xsect_types – Per-edge cross-section as a list of FilletXSect values. Length must equal len(edges).

  • continuity – For blend cross-sections: 1 = G1, 2 = G2, 3 = G3. At a vertex where three filleted edges meet, only G1 continuity is guaranteed across the corner-patch boundary. Defaults to 1. Keyword-only.

  • thumbweight – Fullness control for blend cross-sections. Defaults to 1.0. Keyword-only.

See Also:
  • fillet_edges – Single radius and cross-section across all edges.

  • variable_radius_fillet – Radius varies along each edge.

Wraps: SmApiFilletEdgesPerEdge

usd_brep.fillet_preview(
brep: _omni_solid.Brep,
edges: List[_omni_solid.Edge],
*,
radius: float,
) → List[_omni_solid.Surface]#

Pure: returns new list[Surface]; brep unchanged.

Compute the fillet surfaces for a set of edges without modifying the Brep.

Parameters:
  • brep – Brep providing the edge context. Not modified.

  • edges – Edges to preview filleting on.

  • radius – Fillet radius. Must be positive. Keyword-only.

Returns:

standalone surfaces representing the fillet geometry that fillet_edges would produce with the same radius.

Return type:

list[Surface]

Notes

Stability: this API is currently known to crash inside the kernel for some inputs.

See Also:

fillet_edges – Apply the fillet for real (modifies the Brep).

Wraps: SmApiFilletPreview

usd_brep.find_edge(brep: _omni_solid.Brep, point: tuple) → tuple#

Locate the edge of a Brep nearest to a point and the parameter on it.

Parameters:
  • brep – Brep to search. Not modified.

  • point – Query point as (x, y, z). Should be on or near an edge for a meaningful result.

Returns:

(edge_index, parameter) where edge_index is the index into the Brep’s internal edge list and parameter is the curve parameter on that edge closest to point.

Return type:

tuple[int, float]

Notes

There is no distance limit: a point far from every edge still returns the nearest edge. Check the distance, for example by evaluating the edge at parameter, if point may be off the Brep.

Use the index against get_edges_via_api(brep) (or the class-method brep.edges()) to recover the Edge handle.

See Also:
  • find_face – Face-locating counterpart.

  • get_edges_via_api – Resolve the index to an Edge.

  • curve_closest_point – Closest-point on an isolated curve.

Wraps: SmApiFindEdge

usd_brep.find_face(brep: _omni_solid.Brep, point: tuple) → _omni_solid.Face#

Locate the face of a Brep nearest to a point.

Parameters:
  • brep – Brep to search. Not modified.

  • point – Query point as (x, y, z). Should be on or near a face for a meaningful result.

Returns:

the located face. Owned by brep - do not delete.

Return type:

Face

Notes

Wraps the kernel entry point named SmApiFindFaces (plural) despite returning a single face - the kernel name reflects that an early version returned several candidates.

See Also:
  • find_edge – Edge-locating counterpart.

  • surface_closest_point – Closest-point on an isolated surface.

Wraps: SmApiFindFaces

usd_brep.get_closest_point(brep: _omni_solid.Brep, point: tuple) → tuple#

Find the closest point on a Brep using the topology-driven solver.

Parameters:
  • brep – Brep to query. Not modified.

  • point – Query point as (x, y, z).

Returns:

((x, y, z), distance). The point is returned as a plain Python tuple rather than a Point3d.

Return type:

tuple[tuple[float, float, float], float]

Notes

Same computation as brep_closest_point: both wrappers call the same kernel point solve with the same options. The only difference is that this one returns the point as a plain tuple; it is kept for compatibility. Prefer brep_closest_point for a Point3d return.

See Also:
  • brep_closest_point – Closest-point with Point3d return.

  • brep_closest_point_all – All globally closest solutions.

Wraps: SmApiGetClosestPoint

usd_brep.get_edges_via_api(brep: _omni_solid.Brep) → List[_omni_solid.Edge]#

Return all edges of a Brep using the SmAPI helper.

Parameters:

brep – Brep to query. Not modified.

Returns:

edges in the Brep’s internal order.

Return type:

list[Edge]

Notes

Functionally equivalent to the class method brep.edges(). The _via_api suffix disambiguates the SmAPI entry point (SmApiGetEdges) from the class accessor and from the PolyBrep.get_edges method on tessellated meshes.

See Also:
  • get_faces_via_api – Face counterpart.

  • find_edge – Locate an edge by a 3D point.

Wraps: SmApiGetEdges

usd_brep.get_faces_via_api(brep: _omni_solid.Brep) → List[_omni_solid.Face]#

Return all faces of a Brep using the SmAPI helper.

Parameters:

brep – Brep to query. Not modified.

Returns:

faces in the Brep’s internal order.

Return type:

list[Face]

Notes

Functionally equivalent to the class method brep.faces(). The _via_api suffix disambiguates the SmAPI entry point (SmApiGetFaces) from the class accessor and from the PolyBrep.get_faces method on tessellated meshes.

See Also:
  • get_edges_via_api – Edge counterpart.

  • find_face – Locate a face by a 3D point.

Wraps: SmApiGetFaces

usd_brep.heal_brep(brep: _omni_solid.Brep) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Run the BRep healer to fix common geometric and topological defects.

Parameters:

brep – Brep to heal in place.

Notes

Runs the full healer sequence (SM_HO_ALL) on the Brep. Supported repairs include adjusting tolerances to measured gaps, combining coincident vertices, removing degeneracies, and repairing periodic seams and sheet/region classifications. General geometric gap closing and endpoint refitting are not implemented. Validate the resulting topology when required.

Most useful for geometry that came in from outside the kernel (USD import, manual topology edits). Programmatically built geometry from this API is normally already clean. The USD import path runs healing on every imported Brep when its heal parameter is True; Python imports default to False.

See Also:
  • stitch_into_solid – Recover topological connectivity for loose face collections.

  • is_manifold_solid – Validation after healing.

Wraps: SmApiHealBrep

usd_brep.intersect_brep_with_plane(
brep: _omni_solid.Brep,
plane_point: tuple,
plane_normal: tuple,
) → List[_omni_solid.Curve]#

Compute the section curves where a plane cuts through a Brep.

Parameters:
  • brep – Brep to section. Not modified.

  • plane_point – Any point on the cutting plane as (x, y, z).

  • plane_normal – Normal vector of the cutting plane as (dx, dy, dz). Must be non-zero; does not need to be unit-length.

Returns:

section curves. Each connected cross-section loop becomes a closed curve.

Return type:

list[Curve]

Notes

Non-destructive query. To actually cut the Brep, use cut instead.

See Also:
  • cut – Destructive plane-cut variant.

  • intersect_breps – Brep-versus-Brep intersection.

Wraps: SmApiIntersectBrepWithPlane

usd_brep.intersect_breps(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
) → tuple#

Compute the intersection curves and points between two Breps.

Parameters:
  • brep1 – First Brep. Not modified.

  • brep2 – Second Brep. Not modified.

Returns:

(curves, points) where curves are the surface-surface intersection curves and points are isolated tangential or degenerate intersections.

Return type:

tuple[list[Curve], list[Point3d]]

Notes

Pure query - inputs are not consumed (unlike boolean). The underlying machinery is the same surface-surface intersector that powers booleans, but with no inside/outside classification or face removal. Useful for interference checking: a non-empty result means the two bodies overlap or touch.

See Also:
  • boolean – Same intersection plus boolean classification.

  • intersect_brep_with_plane – Section a Brep by a plane.

  • intersect_curve_brep – Curve-versus-Brep intersection.

Wraps: SmApiIntersectBreps

usd_brep.intersect_curve_brep(
curve: _omni_solid.Curve,
brep: _omni_solid.Brep,
) → tuple#

Compute the intersection of a curve with a Brep.

Parameters:
  • curve – Input curve. Not modified.

  • brep – Input Brep. Not modified.

Returns:

(curves, points). curves cover any segments where the input curve lies on a face of the Brep; points are the isolated entry/exit and tangent points.

Return type:

tuple[list[Curve], list[tuple[float, float, float]]]

Notes

Tests against every trimmed face of the Brep. For a single face use intersect_curve_face.

See Also:
  • intersect_curve_face – Single-face variant.

  • intersect_curve_surface – Untrimmed-surface variant.

Wraps: SmApiIntersectCurveBrep

usd_brep.intersect_curve_face(
curve: _omni_solid.Curve,
face: _omni_solid.Face,
) → tuple#

Compute the intersection of a curve with a single trimmed face.

Parameters:
  • curve – Input curve. Not modified.

  • face – Input trimmed face. Not modified.

Returns:

(curves, points). The face trim is honored, so only crossings that fall inside the face’s trimming loops are reported.

Return type:

tuple[list[Curve], list[tuple[float, float, float]]]

See Also:
  • intersect_curve_surface – Untrimmed-surface variant.

  • intersect_curve_brep – Whole-Brep variant.

Wraps: SmApiIntersectCurveFace

usd_brep.intersect_curve_surface(
curve: _omni_solid.Curve,
surface: _omni_solid.Surface,
) → tuple#

Compute the intersection of a curve with a surface.

Parameters:
  • curve – Input curve. Not modified.

  • surface – Input surface. Not modified.

Returns:

(curves, points). curves cover any segments where the input curve lies on the surface; points are the isolated crossing points.

Return type:

tuple[list[Curve], list[tuple[float, float, float]]]

See Also:
  • intersect_curve_face – Trimmed-face variant.

  • intersect_curve_brep – Whole-Brep variant.

Wraps: SmApiIntersectCurveSurface

usd_brep.intersect_curves(
curve1: _omni_solid.Curve,
curve2: _omni_solid.Curve,
) → tuple#

Compute the intersection points of two curves.

Parameters:
  • curve1 – First curve. Not modified.

  • curve2 – Second curve. Not modified.

Returns:

(points, params_on_curve1, params_on_curve2) where each list has the same length. Element i is the same intersection expressed as a 3D point and as parameters on the two input curves.

Return type:

tuple[list[tuple[float, float, float]], list[float], list[float]]

Notes

Useful for finding profile crossings, computing trim parameters, and building intersection graphs.

See Also:
  • intersect_curve_surface – Curve-versus-surface intersection.

  • intersect_curve_brep – Curve-versus-Brep intersection.

  • intersect_curve_face – Curve-versus-trimmed-face intersection.

Wraps: SmApiIntersectCurves

usd_brep.intersect_faces(
face1: _omni_solid.Face,
face2: _omni_solid.Face,
) → tuple#

Compute the intersection of two trimmed faces.

Parameters:
  • face1 – First trimmed face. Not modified.

  • face2 – Second trimmed face. Not modified.

Returns:

(curves, points) where curves are the 3D intersection curves clipped to both face trims and points are isolated tangential intersections.

Return type:

tuple[list[Curve], list[tuple[float, float, float]]]

Notes

Differs from intersect_surfaces in that the intersection is clipped by each face’s trimming loops.

See Also:

intersect_surfaces – Untrimmed surface variant.

Wraps: SmApiIntersectFaces

usd_brep.intersect_surfaces(
surface1: _omni_solid.Surface,
surface2: _omni_solid.Surface,
) → List[_omni_solid.Curve]#

Compute the intersection curves of two surfaces.

Parameters:
  • surface1 – First surface. Not modified.

  • surface2 – Second surface. Not modified.

Returns:

3D intersection curves on both surfaces.

Return type:

list[Curve]

Notes

Operates on untrimmed surfaces. For face-versus-face (trimmed) intersection use intersect_faces.

See Also:
  • intersect_faces – Trimmed-face variant.

  • intersect_breps – Whole-Brep intersection.

Wraps: SmApiIntersectSurfaces

usd_brep.is_manifold_solid(brep: _omni_solid.Brep) → bool#

Check whether a Brep is a closed manifold solid.

Parameters:

brep – Brep to validate. Not modified.

Returns:

True if every edge is shared by exactly two faces (no lamina edges, no non-manifold junctions); False otherwise.

Return type:

bool

Notes

Sheet bodies (open shells, planar circles, etc.) return False. A False result is not necessarily an error - the Brep may be intentionally a sheet body. Use as a post-condition for booleans, sweeps, or stitching that should have produced solids.

See Also:
  • compute_volume – Requires a manifold solid to be meaningful.

  • stitch_into_solid – Recover manifold topology from loose faces.

Wraps: SmApiBrepIsManifoldSolid

usd_brep.lift_uv_curve(
uv_curve: _omni_solid.BSplineCurve,
surface: _omni_solid.Surface,
) → List[_omni_solid.Curve]#

Lift a 2D UV-space curve onto a surface, producing 3D curves.

Parameters:
  • uv_curve – 2D B-spline curve in the surface’s parametric domain.

  • surface – Surface providing the UV-to-3D mapping.

Returns:

3D curves on the surface corresponding to the UV input.

Return type:

list[Curve]

See Also:
  • drop_curve_to_surface – Inverse - drop a 3D curve onto a surface.

  • project_curve_to_surface – Inverse with bbox-derived tolerance.

Wraps: SmApiLiftUVCurveFromSrf

usd_brep.linear_sweep(
curves: List[_omni_solid.Curve],
direction: tuple,
distance: float,
*,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Extrude a profile along a straight direction to create a Brep.

Parameters:
  • curves – Profile curves. For a manifold solid the curves must form a closed planar loop; open curves produce a sheet body.

  • direction – Sweep direction as (dx, dy, dz). Magnitude is ignored - the actual sweep length is distance.

  • distance – Sweep length, in modeling units. Must be non-zero.

  • cap_ends – If True (default), close both ends with planar cap faces (manifold solid). False produces an open shell. Keyword-only.

Returns:

extruded body.

Return type:

Brep

See Also:
  • rotational_sweep – Revolve a profile about an axis.

  • draft_sweep – Extrude with a draft angle (taper).

  • linear_sweep_with_repetitions – Multiple end-to-end linear sweeps.

  • create_extrude_surface – Surface-only extrusion (no caps).

Wraps: SmApiCreateLinearSweep

usd_brep.linear_sweep_with_repetitions(
curves: List[_omni_solid.Curve],
direction: tuple,
distance: float,
*,
repetitions: int,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Linear sweep repeated end-to-end repetitions times.

Parameters:
  • curves – Profile curves (closed loop for a manifold result).

  • direction – Sweep direction as (dx, dy, dz). Magnitude is ignored.

  • distance – Length of each individual sweep step. Must be non-zero.

  • repetitions – Number of end-to-end sweeps. Must be at least 1. Keyword-only.

  • cap_ends – If True (default), cap the start of the first repetition and the end of the last repetition. Keyword-only.

Returns:

extruded body of total length distance * repetitions.

Return type:

Brep

See Also:
  • linear_sweep – Single-step linear extrusion.

  • rotational_sweep_with_repetitions – Repeated rotational sweeps.

Wraps: SmApiCreateLinearSweepWithRepetitions

usd_brep.make_curves_compatible(curves: List[_omni_solid.BSplineCurve]) → None#

Reparameterize a list of B-spline curves to share a compatible knot vector.

Parameters:

curves – B-spline curves to make compatible. Must contain at least two curves. The curves are modified in place, one at a time, so a failure can leave some of them already modified.

Notes

Required before operations that need aligned parameterizations across curves, e.g. skinning (create_skin_surface) and ruled surfaces (create_ruled_surface). The original curve handles are preserved but their internal knot vectors are rewritten.

See Also:
  • create_skin_surface – Lofted surface across multiple compatible curves.

  • create_ruled_surface – Linear ruling between two compatible curves.

Wraps: SmApiMakeCurvesCompatible

usd_brep.material_census(brep: _omni_solid.Brep) → dict#

Count a Brep’s material (solid) regions and enclosed void cavities.

SMLib stores every connected 3D region as its own region, so nested shells are counted unambiguously: a solid with a hollow cavity that itself contains a nested solid reports solid_count == 2 and void_count == 1. A single simple solid is solid_count == 1, void_count == 0.

Parameters:

brep – Brep to query. Not modified.

Returns:

{'solid_count': int, 'void_count': int}. solid_count is the number of material (solid) regions. void_count is the number of enclosed void cavities and excludes the single infinite (unbounded) region.

Return type:

dict

Notes

The counts reflect the Brep’s current void flags, which SMLib construction and boolean operations set and a correct import preserves. Only a malformed Brep with unset flags needs them re-established (FindAndSetInfiniteRegion + SetRegionIsVoidFlagsForNestedSolids).

See Also:
  • is_manifold_solid – Whether the Brep is a closed manifold solid.

  • compute_volume – Enclosed volume (cavities subtracted).

Wraps: SmApiBrepMaterialCensus

usd_brep.merge_breps(
breps: List[_omni_solid.Brep],
*,
operation: _omni_solid.BooleanOp,
) → _omni_solid.Brep#

Consumes: breps; returns new Brep.

Combine a list of Breps in one boolean call.

Parameters:
  • breps – Two or more unique Breps to combine. Once input validation succeeds, all input Brep handles are consumed.

  • operation – BooleanOp.{UNION, DIFFERENCE, INTERSECTION, MERGE}. Keyword-only.

Returns:

combined body.

Return type:

Brep

Notes

Operands retain the kernel’s longstanding last-to-first evaluation order. For example, DIFFERENCE on [a, b, c] computes (c - b) - a. Lists with fewer than two entries, None, or duplicate handles are rejected without consuming any inputs.

See Also:
  • boolean – Pairwise version.

  • evaluate_csg_tree – Mixed-operation CSG tree in postfix form.

Wraps: SmApiMergeBreps

usd_brep.non_manifold_boolean(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
*,
operation: _omni_solid.BooleanOp,
) → _omni_solid.Brep#

Consumes: brep1, brep2; returns new Brep.

Boolean combine two Breps allowing non-manifold (>2 faces per edge) results.

Parameters:
  • brep1 – Primary body. Consumed by the operation.

  • brep2 – Second body. Consumed by the operation.

  • operation – BooleanOp.{UNION, DIFFERENCE, INTERSECTION, MERGE}. Keyword-only.

Returns:

combined body that may contain non-manifold topology.

Return type:

Brep

Notes

Differs from boolean in that it does not enforce manifold output - useful for assembly modeling where multiple bodies share faces or edges.

See Also:
  • boolean – Manifold-only variant.

  • boolean_merge – Single-operation merge.

Wraps: SmApiNonManifoldBoolean

usd_brep.non_manifold_linear_sweep(
brep_to_sweep: _omni_solid.Brep,
direction: tuple,
distance: float,
*,
region_brep: object = None,
do_stitching: bool = True,
do_merge: bool = False,
faces: object = None,
edges: object = None,
vertices: object = None,
) → _omni_solid.Brep#

Mutates: brep_to_sweep; returns the same handle for chaining.

Linearly sweep selected topology of a Brep, with stitching and merging.

Parameters:
  • brep_to_sweep – Brep containing the topology to sweep. Modified in place.

  • direction – Sweep direction as (dx, dy, dz). Must be non-zero; does not need to be unit-length.

  • distance – Sweep distance, in modeling units. Must be non-zero.

  • region_brep – Optional Brep that defines the target region. Must be None (default) or brep_to_sweep itself; any other Brep raises ValueError, because only brep_to_sweep is stitched, validated and returned. Keyword-only.

  • do_stitching – If True (default), stitch the swept geometry back into brep_to_sweep. Keyword-only.

  • do_merge – If True, run a merge pass that catches self-intersections. Defaults to False. Keyword-only.

  • faces – Optional list of faces to sweep into solids. Keyword-only.

  • edges – Optional list of edges to sweep into faces. Keyword-only.

  • vertices – Optional list of vertices to sweep into edges. Keyword-only.

Returns:

the same brep_to_sweep handle, for chaining.

Return type:

Brep

Notes

Used to grow specific topology (a face, an edge, a vertex) of an existing Brep into higher-dimensional features without rebuilding the whole body.

All three None sweeps the whole brep_to_sweep; naming any of them sweeps only what is listed, so faces=[], edges=[], vertices=[v] sweeps just v. Only-empty sequences select nothing and raise ValueError.

See Also:
  • non_manifold_rotational_sweep – Rotational variant.

  • linear_sweep – Standard linear sweep that returns a new Brep.

Wraps: SmApiNonManifoldSweep

usd_brep.non_manifold_rotational_sweep(
brep_to_sweep: _omni_solid.Brep,
base_point: tuple,
axis: tuple,
angle_deg: float,
*,
region_brep: object = None,
do_stitching: bool = True,
do_merge: bool = False,
faces: object = None,
edges: object = None,
vertices: object = None,
) → _omni_solid.Brep#

Mutates: brep_to_sweep; returns the same handle for chaining.

Rotationally sweep selected topology of a Brep, with stitching and merging.

Parameters:
  • brep_to_sweep – Brep containing the topology to sweep. Modified in place.

  • base_point – A point on the rotation axis as (x, y, z).

  • axis – Direction of the rotation axis as (dx, dy, dz).

  • angle_deg – Sweep angle, in degrees.

  • region_brep – Optional Brep that defines the target region. Must be None (default) or brep_to_sweep itself; any other Brep raises ValueError, because only brep_to_sweep is stitched, validated and returned. Keyword-only.

  • do_stitching – If True (default), stitch the swept geometry back into brep_to_sweep. Keyword-only.

  • do_merge – If True, run a merge pass that catches self-intersections. Defaults to False. Keyword-only.

  • faces – Optional list of faces to sweep. Keyword-only.

  • edges – Optional list of edges to sweep. Keyword-only.

  • vertices – Optional list of vertices to sweep. Keyword-only.

Returns:

the same brep_to_sweep handle, for chaining.

Return type:

Brep

Notes

All three None sweeps the whole brep_to_sweep; naming any of them sweeps only what is listed, so faces=[], edges=[], vertices=[v] sweeps just v. Only-empty sequences select nothing and raise ValueError.

See Also:
  • non_manifold_linear_sweep – Linear variant.

  • rotational_sweep – Standard rotational sweep that returns a new Brep.

Wraps: SmApiNonManifoldRotationalSweep

usd_brep.offset_brep(
brep: _omni_solid.Brep,
distance: float,
*,
extended_offset: bool = True,
self_intersection: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; brep unchanged.

Create a new Brep whose surfaces are uniformly offset from an existing Brep.

Parameters:
  • brep – Source Brep. Not modified.

  • distance – Offset distance. Positive offsets outward along surface normals (larger shape); negative offsets inward (smaller). Must be smaller than the minimum radius of curvature in any concave region to avoid invalid geometry.

  • extended_offset – If True (default), extend offset surfaces at convex edges until they intersect, producing sharp corners. False may leave gaps. Keyword-only.

  • self_intersection – If True (default), detect and resolve self-intersections in concave regions. Keyword-only.

Returns:

offset Brep.

Return type:

Brep

See Also:
  • shell_brep – Hollow-out variant with selected faces left open.

  • create_offset_surface – Offset a single surface in 3D.

  • offset_curve – Offset a single curve in 2D.

Wraps: SmApiOffsetBrepFull

usd_brep.offset_curve(
curve: _omni_solid.BSplineCurve,
distance: float,
) → _omni_solid.Curve#

Create a curve offset from an existing curve by a signed distance.

Parameters:
  • curve – Source B-spline curve to offset.

  • distance – Offset distance. Positive offsets to the right of the curve direction; negative offsets to the left. Must be non-zero.

Returns:

offset curve.

Return type:

Curve

Notes

The offset is taken in the curve’s local plane. A straight curve has no plane of its own and is offset in the XY plane (normal +Z), or in the XZ plane (normal +Y) if it is parallel to Z. If abs(distance) exceeds the curve’s minimum radius of curvature the result may self-intersect.

See Also:
  • create_offset_profile – Offset a closed loop of curves into a Brep face.

  • create_offset_surface – Offset a surface in 3D.

Wraps: SmApiOffsetCurve

usd_brep.order_curves(
curves: List[_omni_solid.BSplineCurve],
) → List[_omni_solid.BSplineCurve]#

Reorder a list of B-spline curves into loop sequence.

Parameters:

curves – Coplanar B-spline curves that form one or more closed loops. Must contain at least two curves.

Returns:

the same curves, grouped loop by loop in connection order.

Return type:

list[BSplineCurve]

Notes

Curves are not reversed, and the per-curve orientation and loop boundaries are not reported, so consecutive curves need not meet head to tail: a curve may connect through its end rather than its start. The curves themselves are not modified - only the ordering of the returned list changes. Open or non-planar input fails.

Wraps: SmApiOrderCurves

usd_brep.piecewise_merge(
brep1: _omni_solid.Brep,
brep2: _omni_solid.Brep,
create_new_breps_for_faces: bool = False,
) → _omni_solid.Brep#

Consumes: brep1; returns new Brep. brep2 is referenced (not consumed).

Merge faces of one Brep into another, preserving the second.

Parameters:
  • brep1 – Primary body. Modified by the operation.

  • brep2 – Donor body. Not consumed - its faces are referenced (or copied) into the result.

  • create_new_breps_for_faces – If True, treat each face of brep2 as a standalone sheet body (one Brep per face) when merging. Defaults to False.

Returns:

merged result.

Return type:

Brep

See Also:
  • boolean_merge – Standard merge (consumes both bodies).

  • non_manifold_boolean – Non-manifold-allowing boolean.

Wraps: SmApiPiecewiseMerge

usd_brep.pipe_sweep(
path: _omni_solid.Curve,
*,
radius: float,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Sweep a circular cross-section along a path curve to create a pipe.

Parameters:
  • path – Sweep-path B-spline curve. TypeError is raised if a non-B-spline curve is passed.

  • radius – Pipe radius. Must be positive and smaller than the path curve’s minimum radius of curvature to avoid self-intersection. Keyword-only.

  • cap_ends – If True (default), close the ends of the pipe with planar cap faces (manifold solid). Keyword-only.

Returns:

pipe body.

Return type:

Brep

See Also:
  • curve_sweep – Variable-radius sweep with an arbitrary profile and optional scale curves.

  • sweep_along_planar_path – Sweep along a planar polyline.

Wraps: SmApiCreatePipeSweep

usd_brep.poly_boolean(
poly_brep1: _omni_solid.PolyBrep,
poly_brep2: _omni_solid.PolyBrep,
operation: _omni_solid.PolyBooleanOp,
) → _omni_solid.PolyBrep#

Combine two polygon meshes with a boolean operation.

Parameters:
  • poly_brep1 – Primary mesh. For DIFFERENCE this is the workpiece. Consumed by the operation.

  • poly_brep2 – Tool mesh. For DIFFERENCE this is the cutting shape. Consumed by the operation.

  • operation – PolyBooleanOp.{UNION, INTERSECTION, DIFFERENCE, MERGE, PARTIAL_MERGE}.

Returns:

combined mesh. The two input meshes are consumed and must not be reused.

Return type:

PolyBrep

Notes

Operates on triangulated geometry, so the result is approximate and quality scales with input mesh density - intersection curves are followed along triangle edges. For exact NURBS booleans, work in the Brep domain with boolean and tessellate at the end. Both input meshes should be manifold (closed) for best results; check with poly_brep_is_manifold_via_api if unsure.

DIFFERENCE is order-sensitive: poly_boolean(A, B, DIFFERENCE) removes B from A.

See Also:
  • poly_boolean_union – Convenience wrapper for UNION.

  • poly_boolean_difference – Convenience wrapper for DIFFERENCE.

  • poly_boolean_intersection – Convenience wrapper for INTERSECTION.

  • poly_boolean_merge – Convenience wrapper for MERGE.

  • boolean – Exact-NURBS Brep equivalent.

  • tessellate – Convert a Brep to a PolyBrep first.

Wraps: SmApiPolyBoolean

usd_brep.poly_boolean_difference(
poly_brep1: _omni_solid.PolyBrep,
poly_brep2: _omni_solid.PolyBrep,
) → _omni_solid.PolyBrep#

Compute the boolean difference (subtractive) of two polygon meshes.

Parameters:
  • poly_brep1 – Workpiece mesh. Consumed by the operation.

  • poly_brep2 – Tool mesh to subtract. Consumed by the operation.

Returns:

poly_brep1 with poly_brep2 carved out.

Return type:

PolyBrep

Notes

Order-sensitive: swap the arguments to subtract the other way.

See Also:
  • poly_boolean – Generic operation taking a PolyBooleanOp value.

  • poly_boolean_union – Additive variant.

  • poly_boolean_intersection – Common-overlap variant.

  • boolean_difference – Exact-NURBS Brep equivalent.

Wraps: SmApiPolyBooleanDifference

usd_brep.poly_boolean_intersection(
poly_brep1: _omni_solid.PolyBrep,
poly_brep2: _omni_solid.PolyBrep,
) → _omni_solid.PolyBrep#

Compute the boolean intersection (common overlap) of two polygon meshes.

Parameters:
  • poly_brep1 – First mesh. Consumed by the operation.

  • poly_brep2 – Second mesh. Consumed by the operation.

Returns:

region inside both meshes. If the inputs are disjoint the result has no volume.

Return type:

PolyBrep

See Also:
  • poly_boolean – Generic operation taking a PolyBooleanOp value.

  • poly_boolean_union – Additive variant.

  • poly_boolean_difference – Subtractive variant.

  • boolean_intersection – Exact-NURBS Brep equivalent.

Wraps: SmApiPolyBooleanIntersection

usd_brep.poly_boolean_merge(
poly_brep1: _omni_solid.PolyBrep,
poly_brep2: _omni_solid.PolyBrep,
) → _omni_solid.PolyBrep#

Combine two polygon meshes without removing any faces.

Parameters:
  • poly_brep1 – First mesh. Consumed by the operation.

  • poly_brep2 – Second mesh. Consumed by the operation.

Returns:

merged mesh containing all faces of both inputs. Where the meshes touch, the result is non-manifold (more than two faces meet at an edge).

Return type:

PolyBrep

Notes

Equivalent to poly_boolean(a, b, PolyBooleanOp.MERGE). Useful for assemblies of touching but non-penetrating meshes. For finer control over how the seam is treated, use the generic poly_boolean with PARTIAL_MERGE.

See Also:
  • poly_boolean_union – Material from either, shared region merged.

  • poly_boolean – Generic form (offers PARTIAL_MERGE).

  • boolean_merge – Exact-NURBS Brep equivalent.

Wraps: SmApiPolyBooleanMerge

usd_brep.poly_boolean_union(
poly_brep1: _omni_solid.PolyBrep,
poly_brep2: _omni_solid.PolyBrep,
) → _omni_solid.PolyBrep#

Compute the boolean union (additive) of two polygon meshes.

Parameters:
  • poly_brep1 – First mesh. Consumed by the operation.

  • poly_brep2 – Second mesh. Consumed by the operation.

Returns:

union mesh (material from either body).

Return type:

PolyBrep

See Also:
  • poly_boolean – Generic operation taking a PolyBooleanOp value.

  • poly_boolean_difference – Subtractive variant.

  • poly_boolean_intersection – Common-overlap variant.

  • boolean_union – Exact-NURBS Brep equivalent.

Wraps: SmApiPolyBooleanUnion

usd_brep.poly_brep_is_manifold_via_api(poly_brep: _omni_solid.PolyBrep) → bool#

Check whether a polygon mesh is a closed manifold solid (SmAPI helper).

Parameters:

poly_brep – Mesh to validate. Not modified.

Returns:

True if every edge of the mesh is shared by exactly two faces; False otherwise.

Return type:

bool

Notes

Functionally equivalent to the class method poly_brep.is_manifold_solid(). The _via_api suffix disambiguates the SmAPI entry point (SmApiPolyBrepIsManifoldSolid) from the class accessor and from the Brep-level is_manifold_solid query.

See Also:
  • poly_brep_volume_via_api – Volume counterpart.

  • is_manifold_solid – Exact-NURBS Brep equivalent.

Wraps: SmApiPolyBrepIsManifoldSolid

usd_brep.poly_brep_volume_via_api(poly_brep: _omni_solid.PolyBrep) → float#

Compute the enclosed volume of a polygon mesh (SmAPI helper).

Parameters:

poly_brep – Manifold-solid mesh. Behaviour is undefined for open shells; validate with poly_brep_is_manifold_via_api first if uncertain.

Returns:

enclosed volume in cubic modeling units. The result approximates the source NURBS volume to within tessellation error.

Return type:

float

Notes

Functionally similar to poly_brep.compute_properties (origin)['volume']. The _via_api suffix disambiguates the SmAPI entry point (SmApiPolyBrepComputeVolume) from the class accessor.

See Also:
  • poly_brep_is_manifold_via_api – Manifold-solid pre-check.

  • compute_volume – Exact-NURBS Brep equivalent.

  • tessellate – Source step that produces the mesh.

Wraps: SmApiPolyBrepComputeVolume

usd_brep.project_and_trim(
brep: _omni_solid.Brep,
curve: _omni_solid.BSplineCurve,
projection_dir: tuple,
ref_point: tuple,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Project a curve onto a Brep and trim using the projected loop.

Parameters:
  • brep – Brep to trim in place.

  • curve – B-spline curve to project. Typically a closed loop.

  • projection_dir – Projection direction as (dx, dy, dz). Must be non-zero; does not need to be unit-length.

  • ref_point – A point in 3D as (x, y, z) whose projection onto the Brep lies on the side that should be kept.

Notes

The kernel projects curve along projection_dir onto the Brep faces, then trims away the side that does not contain the projection of ref_point.

See Also:
  • cut – Plane-based version (no curve projection).

  • trim_project_parallel – More general variant with split / keep / delete behavior selected by TrimType.

  • project_curve – Non-destructive curve-onto-Brep projection.

Wraps: SmApiProjectAndTrim

usd_brep.project_brep_onto_plane(
brep: _omni_solid.Brep,
plane_point: tuple,
plane_normal: tuple,
) → List[_omni_solid.Curve]#

Pure: returns new list[Curve]; brep unchanged.

Project the edges of a Brep onto a plane.

Parameters:
  • brep – Brep to project. Not modified.

  • plane_point – Any point on the projection plane as (x, y, z).

  • plane_normal – Plane normal as (dx, dy, dz). Projection runs along this direction. Must be non-zero; does not need to be unit-length.

Returns:

outline curves on the plane.

Return type:

list[Curve]

Notes

Useful for 2D drawings, shadow projections, and silhouette-style outlines. Non-destructive query.

See Also:
  • create_silhouette_curves – Silhouette of curved surfaces (not just edges).

  • intersect_brep_with_plane – Section curves at the plane instead of projection onto it.

Wraps: SmApiProjectBrepOntoPlane

usd_brep.project_curve(
brep: _omni_solid.Brep,
curve: _omni_solid.BSplineCurve,
projection_vector: tuple,
) → List[_omni_solid.Curve]#

Pure: returns new list[Curve]; brep unchanged.

Project a curve onto the faces of a Brep.

Parameters:
  • brep – Target Brep. Not modified.

  • curve – B-spline curve to project.

  • projection_vector – Projection direction as (dx, dy, dz). Magnitude is ignored.

Returns:

3D projected curves on the Brep faces.

Return type:

list[Curve]

Notes

Non-destructive query - the Brep is not modified. Wraps the Brep variant of SmApiProjectCurve (declared in SmApiBrep.h); the curve-onto-single-surface variant from SmApiCurves.h is exposed separately as project_curve_to_surface.

See Also:
  • project_curve_to_surface – Single-surface (uv + 3D) variant.

  • project_and_trim – Project and use the result to trim the Brep.

  • drop_curve_to_surface – Curve drop / trim onto a surface.

Wraps: SmApiProjectCurve (Brep overload)

usd_brep.project_curve_to_surface(
curve: _omni_solid.BSplineCurve,
surface: _omni_solid.Surface,
) → List[_omni_solid.Curve]#

Project a 3D curve onto a surface along the surface normals.

Parameters:
  • curve – 3D B-spline curve to project.

  • surface – Target surface.

Returns:

3D curves on the surface produced by drop-and-trim.

Return type:

list[Curve]

Notes

Internally identical to drop_curve_to_surface but derives the drop tolerance from the input curve’s bounding-box diagonal (clamped to a minimum of 1.0). Prefer this variant for tightly bounded curves; for a fixed tolerance use drop_curve_to_surface.

See Also:
  • drop_curve_to_surface – Same operation with a fixed tolerance.

  • lift_uv_curve – Inverse operation - lift a 2D UV curve to 3D.

Wraps: SmApiProjectCurve

usd_brep.read_brep_from_file(
filename: str,
ascii: object = None,
rebuild_uv_trim_curves: bool = False,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Deserialize a native SMLib Brep file from disk.

Parameters:
  • filename – Path to an SMLib native Brep file.

  • ascii – Format selector. Use None to auto-detect, True for ASCII, or False for binary.

  • rebuild_uv_trim_curves – Rebuild UV trim curves after loading.

Returns:

loaded model owned by the module context.

Return type:

Brep

Notes

Recognized SMLib part containers are rejected; load them with read_part_from_file and the matching ASCII/binary selector.

See Also:
  • Brep.read_from_file – Class-method spelling.

  • Brep.write_to_file – Serialize a Brep to native SMLib format.

  • read_part_from_file – Deserialize an SMLib part container.

Wraps: SmApiReadBrepFromFile

usd_brep.read_part_from_file(filename: str, ascii: bool = True) → tuple#

Pure: returns new objects; inputs unchanged.

Deserialize an SMLib part file containing curves, surfaces, Boolean tree nodes, and Breps.

Parameters:
  • filename – Path to an SMLib part file, conventionally .smp.

  • ascii – Read the ASCII format when true, or binary when false.

Returns:

Standalone

curves, standalone surfaces, Boolean tree nodes, and Brep models.

Return type:

tuple[list[Curve], list[Surface], list[int], list[Brep]]

See Also:

read_brep_from_file – Read a single-Brep .smb file.

Wraps: SmApiReadPartFromFile

usd_brep.remove_curve_knots(curve: _omni_solid.Curve) → _omni_solid.Curve#

Mutates: curve; returns the same handle for chaining.

Remove unnecessary B-spline knots within the curve’s approximation tolerance.

Parameters:

curve – Curve to simplify in place.

Notes

Uses the curve’s effective approximation tolerance, resolved from its owning topology or context. Non-B-spline curves are unchanged.

Wraps: SmApiRemoveCurveKnots

usd_brep.remove_fillet(brep: _omni_solid.Brep) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Remove fillet faces from a Brep (defeaturing).

Parameters:

brep – Brep to defeature in place.

Notes

Acts on the entire Brep; the kernel detects fillet faces by geometric heuristics and removes them, repairing the surrounding faces back to their pre-fillet topology where possible.

See Also:
  • circular_fillet – Inverse - apply fillets.

  • fillet_edges – Selective filleting.

Wraps: SmApiRemoveFillet

usd_brep.rotate(
target: object,
ref_point: tuple,
axis: tuple,
angle_deg: float,
) → object#

Mutates: target; returns the same handle for chaining.

Rotate an independent modeling Object around an axis.

Parameters:
  • target – Brep, PolyBrep, standalone Curve, or standalone Surface.

  • ref_point – A point on the rotation axis as (x, y, z).

  • axis – Direction of the rotation axis as (dx, dy, dz).

  • angle_deg – Rotation angle, in degrees, following the right-hand rule.

Notes

The rotation axis is the line ref_point + t * axis. axis does not need to be unit-length. Curves and Surfaces owned by a Brep must be transformed through that Brep.

See Also:
  • translate – Translate by a vector.

  • scale – Scale by per-axis factors.

  • transform – Combined rotation/translation via Axis2Placement.

Wraps: SmApiRotate

usd_brep.rotational_sweep(
curves: List[_omni_solid.Curve],
base_point: tuple,
axis: tuple,
angle_deg: float,
*,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Revolve a profile about an axis to create a Brep.

Parameters:
  • curves – Profile curves. Must lie entirely on one side of the rotation axis (no crossings) to avoid self-intersection.

  • base_point – A point on the rotation axis as (x, y, z).

  • axis – Direction of the rotation axis as (dx, dy, dz).

  • angle_deg – Sweep angle, in degrees. Use 360 for a closed solid of revolution; less than 360 produces a wedge.

  • cap_ends – If True (default), close the start/end of partial sweeps with cap faces; ignored when angle_deg == 360. Keyword-only.

Returns:

revolved body.

Return type:

Brep

See Also:
  • linear_sweep – Straight extrusion along a direction.

  • rotational_sweep_with_repetitions – Multiple end-to-end revolutions.

  • create_surface_revolution – Surface-only revolution (no caps).

Wraps: SmApiCreateRotationalSweep

usd_brep.rotational_sweep_with_repetitions(
curves: List[_omni_solid.Curve],
base_point: tuple,
axis: tuple,
angle_deg: float,
*,
repetitions: int,
cap_ends: bool = True,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Rotational sweep repeated end-to-end repetitions times.

Parameters:
  • curves – Profile curves (must lie on one side of the axis).

  • base_point – A point on the rotation axis as (x, y, z).

  • axis – Direction of the rotation axis as (dx, dy, dz).

  • angle_deg – Sweep angle for each individual revolution, in degrees.

  • repetitions – Number of end-to-end revolutions. Must be at least 1. Keyword-only.

  • cap_ends – If True (default), cap the start of the first repetition and the end of the last repetition (when the total sweep does not close into a full revolution). Keyword-only.

Returns:

revolved body covering angle_deg * repetitions total.

Return type:

Brep

See Also:
  • rotational_sweep – Single-step revolution.

  • linear_sweep_with_repetitions – Repeated linear sweeps.

Wraps: SmApiCreateRotationalSweepWithRepetitions

usd_brep.scale(target: object, scale: tuple) → object#

Mutates: target; returns the same handle for chaining.

Scale an independent modeling Object about the world origin.

Parameters:
  • target – Brep, PolyBrep, standalone Curve, or standalone Surface.

  • scale – Per-axis scale factors (sx, sy, sz). Non-uniform values stretch supported geometry independently along each world axis. Factors must be finite and non-degenerate; PolyBrep factors must also be positive.

Notes

Scaling is centered at the world origin. To scale about a different point use scale_about_point (or translate, scale, translate back). Volume scales by abs(sx * sy * sz). Generic B-spline geometry and lines support non-uniform scaling. This API permits only positive, uniform factors for other specialized standalone Curve and Surface representations; unsupported scaling raises RuntimeError without modifying the target. Owned geometry must be transformed through its Brep. A Brep scale that requires analytic-to-NURBS conversion is rejected before mutation while an affected borrowed Face.surface() or Edge.curve() handle remains live. Release and reacquire those handles, or scale a brep.copy() instead.

See Also:
  • translate – Translate by a vector.

  • rotate – Rotate around an axis.

  • scale_about_point – Scale about an arbitrary reference point.

Wraps: SmApiScale

usd_brep.scale_about_point(
target: object,
ref_point: tuple,
scale: tuple,
) → object#

Mutates: target; returns the same handle for chaining.

Scale an independent modeling Object about an arbitrary reference point.

Parameters:
  • target – Brep, PolyBrep, standalone Curve, or standalone Surface.

  • ref_point – Center of scaling as (x, y, z). The kernel translates this point to the origin, applies scale, and translates back.

  • scale – Finite, non-degenerate per-axis scale factors (sx, sy, sz). PolyBrep factors must also be positive.

Notes

Generic B-spline geometry and lines support non-uniform scaling. This API permits only positive, uniform factors for other specialized standalone Curve and Surface representations. Unsupported scaling raises RuntimeError without first translating the target. Owned geometry must be transformed through its Brep. A Brep scale that requires analytic-to-NURBS conversion is rejected before mutation while an affected borrowed Face.surface() or Edge.curve() handle remains live. Release and reacquire those handles, or scale a brep.copy() instead.

See Also:

scale – Scale about the world origin.

Wraps: SmApiScaleByPt

usd_brep.set_bevel_corners(
brep: _omni_solid.Brep,
*,
edges: List[_omni_solid.Edge],
vertices: List[_omni_solid.Vertex],
radius: float,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Fillet edges with a constant radius, beveling the named corners.

Parameters:
  • brep – Brep to fillet in place.

  • edges – Edges to fillet. Keyword-only.

  • vertices – Corner vertices that get a bevel instead of a rounded corner. Each must be a corner where filleted edges meet. Keyword-only.

  • radius – Constant fillet radius. Keyword-only.

Notes

This call performs the fillet itself; no follow-on fillet_edges call is needed. A vertex that is not a corner of the filleted edges raises RuntimeError (SM_ERR_NULL_POINTER).

See Also:

fillet_edges – Fillet edges without beveled corners.

Wraps: SmApiSetBevelCorners

usd_brep.shell_brep(
brep: _omni_solid.Brep,
distance: float,
*,
extended_offset: bool = True,
self_intersection: bool = True,
create_solid: bool = True,
faces_to_shell: List[_omni_solid.Face] = [],
) → _omni_solid.Brep#

Pure: returns new Brep; brep unchanged.

Hollow out a solid by removing selected faces and offsetting the rest.

Parameters:
  • brep – Source Brep. Not modified.

  • distance – Signed wall thickness. Positive expands outward from the source; negative creates an inward wall. Must be smaller than the minimum face dimension to avoid degenerate geometry.

  • extended_offset – If True (default), extend offset surfaces at convex edges until they intersect, producing sharp corners. False may leave gaps at sharp convex edges. Keyword-only.

  • self_intersection – If True (default), detect and resolve self-intersections that occur in concave regions when abs(distance) exceeds the local curvature radius. Keyword-only.

  • create_solid – Join sheet-body lamina edges when True. Solid inputs always use Boolean wall construction. Keyword-only.

  • faces_to_shell – Faces to remove. Empty creates a closed wall. Keyword-only.

Returns:

hollowed shell with faces_to_shell open.

Return type:

Brep

See Also:

offset_brep – Offset every face without removing any.

Wraps: SmApiShellBrepFull

usd_brep.simple_face_stitch(
brep: _omni_solid.Brep,
faces_to_keep: List[_omni_solid.Face],
faces_to_delete: List[_omni_solid.Face],
) → tuple#

Mutates: brep; returns (brep, stitched_edges, max_vertex_gap, max_edge_gap).

Stitch matched pairs of faces, keeping one face per pair.

Parameters:
  • brep – Brep that owns the faces. Modified in place.

  • faces_to_keep – Faces to retain in the result. Must have the same length as faces_to_delete - entry i of faces_to_delete is glued onto entry i of faces_to_keep.

  • faces_to_delete – Faces to remove. Each is geometrically coincident (within tolerance) with the matching keep face.

Returns:

(brep, stitched_edges, max_vertex_gap, max_edge_gap) - the same brep handle (for chaining), the number of edge pairs glued, and the largest vertex/edge gap that was bridged.

Return type:

tuple[Brep, int, float, float]

Notes

Use this when you already know which faces should be merged (for example, after a manual import where duplicate faces exist).

See Also:
  • stitch_into_solid – Whole-Brep stitch with solid-result check.

  • stitch_advanced – Tunable whole-Brep stitch.

Wraps: SmApiSimpleFaceStitch

usd_brep.stitch_advanced(
brep: _omni_solid.Brep,
tolerance_3d: float,
squeeze_small_edges: bool = True,
split_edges_with_vertices: bool = True,
making_manifold_solid: bool = True,
remove_laminar_slivers: bool = False,
) → tuple#

Mutates: brep; returns (brep, stitched_edges, lamina_edges, max_vertex_gap, max_edge_gap).

Stitch a Brep with explicit tolerance and per-step cleanup flags.

Parameters:
  • brep – Brep to stitch in place.

  • tolerance_3d – Explicit 3D distance tolerance for gluing edges. Must be positive.

  • squeeze_small_edges – If True (default), collapse edges shorter than tolerance_3d before stitching.

  • split_edges_with_vertices – If True (default), split edges at nearby vertices to improve match quality.

  • making_manifold_solid – If True (default), only glue lamina edge pairs (skip non-manifold candidates).

  • remove_laminar_slivers – If True, remove sliver faces before stitching. Defaults to False.

Returns:

(brep, stitched_edges, lamina_edges_remaining, max_vertex_gap, max_edge_gap) - the first element is the same brep handle (for chaining).

Return type:

tuple[Brep, int, int, float, float]

Notes

Use when stitch_into_solid / stitch_into_shell are too blunt - for example to stitch with a known custom tolerance.

See Also:
  • stitch_into_solid – Default-tolerance solid-targeting variant.

  • stitch_into_shell – Default-tolerance shell-targeting variant.

  • stitch_brep – Single-call variant with no diagnostics.

Wraps: SmApiStitchAdvanced

usd_brep.stitch_brep(brep: _omni_solid.Brep) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Stitch every lamina edge of a Brep using default tolerances.

Parameters:

brep – Brep to stitch in place.

Notes

One-call entry point with no tunables and no diagnostic return values. Prefer stitch_into_solid or stitch_into_shell for programmatic workflows that need to know whether the result is solid and how big the bridged gaps were.

See Also:
  • stitch_brep_with_face – Restrict stitching to one face.

  • stitch_into_solid – Tighter form that reports whether the result is a manifold solid.

  • stitch_into_shell – Looser tolerance form for shell results.

  • stitch_advanced – Full control over stitching tolerances and cleanup flags.

Wraps: SmApiStitch

usd_brep.stitch_brep_with_face(
brep: _omni_solid.Brep,
face: _omni_solid.Face,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Stitch a Brep along the lamina edges of a single face.

Parameters:
  • brep – Brep that owns face. Modified in place.

  • face – Face whose lamina edges should be matched against the rest of the Brep.

Notes

Useful when adding one face at a time to a partially built Brep. For whole-Brep stitching use stitch_brep or stitch_into_solid.

See Also:
  • stitch_brep – Whole-Brep version with no diagnostics.

  • simple_face_stitch – Stitch a list of keep/delete face pairs.

Wraps: SmApiStitch (Brep + Face overload)

usd_brep.stitch_into_shell(
brep: _omni_solid.Brep,
max_stitching_ratio: float = 1.0,
*,
shell_is_well_formed: bool = False,
) → tuple#

Mutates: brep; returns (brep, shell_is_well_formed, stitched_edges, max_vertex_gap, max_edge_gap).

Stitch a Brep aiming for a shell, up to a maximum gap distance.

Parameters:
  • brep – Brep to stitch in place.

  • max_stitching_ratio – Largest gap to close, as an absolute distance in model units (despite the name, not a ratio). Stitching starts at 1/100 of it and widens in steps. Defaults to 1.0.

  • shell_is_well_formed – Stitching mode. Pass True only for a shell known to be well formed (e.g. from a solid modeler); the default False glues edges and vertices and ignores other topology problems. Keyword-only.

Returns:

(brep, shell_is_well_formed, stitched_edges, max_vertex_gap, max_edge_gap). The second element echoes the shell_is_well_formed argument; it is not a property of the result (use is_manifold_solid for that). The first element is the same brep handle (for chaining).

Return type:

tuple[Brep, bool, int, float, float]

Notes

Less restrictive than stitch_into_solid: the result need not be solid. With the default shell_is_well_formed=False it can still have topology problems. Use this when the input is expected to be a sheet body or when stitch_into_solid fails because of slightly larger gaps.

See Also:
  • stitch_into_solid – Tighter, solid-targeting variant.

  • stitch_advanced – Explicit-tolerance variant.

Wraps: SmApiStitchIntoShell

usd_brep.stitch_into_solid(brep: _omni_solid.Brep) → tuple#

Mutates: brep; returns (brep, is_solid, stitched_edges, max_vertex_gap, max_edge_gap).

Stitch a Brep aiming for a manifold solid result.

Parameters:

brep – Brep to stitch in place. Typically a collection of loose faces from an import.

Returns:

(brep, is_solid, stitched_edges, max_vertex_gap, max_edge_gap) where is_solid is True only if every edge ended up shared by exactly two faces. The first element is the same brep handle (for chaining).

Return type:

tuple[Brep, bool, int, float, float]

Notes

Uses the kernel default tolerance. If is_solid is False the gap values tell you how much room the unstitched edges needed - either widen tolerance with stitch_into_shell or diagnose the geometry directly. Common failure causes: gaps larger than tolerance, overlapping faces, or non-manifold topology (more than two faces sharing an edge).

See Also:
  • stitch_into_shell – Looser tolerance variant.

  • stitch_advanced – Per-flag control over the stitch.

  • is_manifold_solid – Final validation check after stitching.

  • unify_normals – Make face normals consistent post-stitch.

Wraps: SmApiStitchIntoSolid

usd_brep.surface_closest_point(
surface: _omni_solid.Surface,
point: tuple,
) → tuple#

Find a globally closest point and its known UV representations.

Parameters:
  • surface – Surface to query. Not modified.

  • point – Query point as (x, y, z).

Returns:

(closest_point, uvs, distance) where every element of uvs is a known natural/NURBS parameter representation of closest_point; evaluate one with surface.evaluate(uv.x, uv.y).

Return type:

tuple[Vec3, list[Vec2], float]

Notes

uvs includes periodic-seam aliases reported by the active solver. The function does not guarantee discovery of every spatially distinct tied minimum or every preimage on a surface that folds over itself.

See Also:
  • brep_closest_point – Brep variant.

  • curve_closest_point – Curve variant.

  • evaluate_surface_point – Evaluate at a known (u, v).

Wraps: SmApiSurfaceClosestPoint

usd_brep.surface_surface_fillet(
surface1: _omni_solid.Surface,
surface2: _omni_solid.Surface,
*,
radius1: float,
radius2: float,
tolerance: float,
xsect_type: int = 1,
mirror: bool = False,
complement: bool = False,
) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Build a fillet Brep between two surfaces.

Parameters:
  • surface1 – First base surface.

  • surface2 – Second base surface.

  • radius1 – Signed radius from surface1 to the fillet rail. Keyword-only.

  • radius2 – Signed radius from surface2 to the fillet rail. Keyword-only.

  • tolerance – Maximum allowed distance from the computed rails to the base surfaces. Must be positive. Keyword-only.

  • xsect_type – Cross-section integer: 0 = linear, 1 = approximate circular (default), 2 = exact circular. Keyword-only.

  • mirror – If True, mirror the fillet (turn it inside-out). Defaults to False. Keyword-only.

  • complement – If True, take the complement of the circular cross-section (the longer arc between the rails). Defaults to False. Keyword-only.

Returns:

sheet-body Brep containing the fillet surface(s).

Return type:

Brep

Notes

Stability: this API is currently known to crash inside the kernel for some surface combinations.

See Also:

fillet_edges – Edge-based filleting on a Brep.

Wraps: SmApiSurfaceSurfaceFillet

usd_brep.sweep_along_planar_path(profile_curves: List[_omni_solid.Curve], path_curves: List[_omni_solid.Curve], *, move_profile: bool = True, cap_ends: _omni_solid.CapEnds = <CapEnds.BOTH: 3>) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Sweep profile boundary curves along a planar path.

Parameters:
  • profile_curves – Coplanar profile boundary curves. Simple closed loops define planar regions using even/odd nesting; open profile wires sweep to sheet geometry.

  • path_curves – Ordered, connected, coplanar path curves forming an open chain or closed loop.

  • move_profile – If True (default), anchor the profile bounding- box center to the path start. If False, anchor the first point of the first profile curve there instead. Keyword-only.

  • cap_ends – CapEnds selector. START caps the profile end; END caps the far (path) end; BOTH (default) caps both; NONE leaves the result open. Closed paths have no endpoints, so the selector has no effect. Keyword-only.

Returns:

Swept sheet, open shell, or nested solid according to the

profile topology, path closure, and requested endpoint caps.

Return type:

Brep

Notes

For an open path, BOTH caps plus closed profile loops request a nested solid. NONE, START, or END leave a sheet or open shell. A closed path has no endpoint caps and requests a nested solid when its swept boundary closes. Nested bounded regions alternate between material and void from the outside in. A manifold boundary with no material region is rejected. Tangent-discontinuous path joins use sharp, mitered transitions; rounded corners are not inserted. Author the rounded motion as tangent-connected arc or spline path curves when needed.

See Also:
  • pipe_sweep – Specialized circular cross-section along a path.

  • curve_sweep – Sweep with optional scale curves.

Wraps: SmApiCreateSweepAlongPlanarPath

usd_brep.taper_extrude(curves: List[_omni_solid.Curve], height: float, draft_angle_deg: float, *, cap_ends: _omni_solid.CapEnds = <CapEnds.BOTH: 3>, fillet_corner: bool = False) → _omni_solid.Brep#

Pure: returns new Brep; inputs unchanged.

Extrude coplanar curves with a draft angle and signed height.

Parameters:
  • curves – Coplanar profile curves to extrude.

  • height – Extrusion height. Sign selects extrusion direction (positive or negative along the profile normal).

  • draft_angle_deg – Draft angle in degrees. 0 to 90 produces an inward (narrowing) taper; 90 is a straight extrusion; 90 to 180 produces an outward (widening) taper.

  • cap_ends – CapEnds selector. START caps the original profile end; END caps the offset (drafted) end; BOTH (default) caps both; NONE leaves the result open. Keyword-only.

  • fillet_corner – If True, round corners between drafted faces; if False (default), extend corners linearly. Keyword-only.

Returns:

tapered extrusion body.

Return type:

Brep

Notes

Differs from draft_sweep in two respects: height is signed (no separate direction), and draft_angle_deg uses the 0..90..180 (inner..straight..outer) convention rather than a single sign-of-taper angle.

See Also:
  • draft_sweep – Alternative draft-angle convention.

  • linear_sweep – Zero-draft case.

Wraps: SmApiCreateTaperExtrude

usd_brep.tessellate(
brep: _omni_solid.Brep,
*,
chord_height_tolerance: float = 0.0,
curve_angle_tolerance_deg: float = 25.0,
surface_angle_tolerance_deg: float = 25.0,
max_edge_length: float = 0.0,
max_aspect_ratio: float = 0.0,
allow_partial: bool = False,
return_failures: bool = False,
return_report: bool = False,
) → object#

Pure: returns new PolyBrep; inputs unchanged.

Tessellate exact Brep NURBS geometry to a triangular PolyBrep mesh.

Parameters:
  • brep – Source Brep. Not modified.

  • chord_height_tolerance – Maximum allowed distance between the triangle mesh and the true surface, in modeling units. Smaller positive values produce a finer mesh. Defaults to 0 (disabled). Typical ranges: 0.001 for high-quality rendering, 0.01 for general visualization, 0.1 for preview. Keyword-only.

  • curve_angle_tolerance_deg – Curve tangent angular tolerance. Defaults to 25. 0 disables the curve angular criterion. Keyword-only.

  • surface_angle_tolerance_deg – Surface angular tolerance. Defaults to 25. Smaller positive values refine curved faces; 0 disables this angular criterion. Keyword-only.

  • max_edge_length – Edge-length subdivision target, in modeling units. It drives edge sampling and face subdivision and is not a hard cap: final triangle edges can be somewhat longer. 0 (default) disables it. A negative value selects an automatic target derived from model size. Keyword-only.

  • max_aspect_ratio – Aspect-ratio target for the cells a surface is subdivided into before triangulation. It does not limit the aspect ratio of the final triangles, which can still be long and thin. 0 (default) disables it. Keyword-only.

  • allow_partial – Retain available faces when some faces fail. Defaults to False (raise instead). Kernel and output errors raise in either mode. Requires return_failures or return_report. when enabled; otherwise raises ValueError. Keyword-only.

  • return_failures – Return (mesh, failures) with a list of dictionaries. Each contains face_index (input faces() order), stage (boundary_preparation, face_tessellation or polygon_output), and kernel status / status_name. Defaults to False.

  • return_report – Return (mesh, report) with face failures and nonfatal edge-incidence diagnostics; defaults to False and takes precedence over return_failures. These are not full solid-validity checks.

Returns:

triangulated mesh approximating the Brep within the supplied tolerances, or (mesh, failures) when return_failures=True with the first failure per source face. Returns (mesh, report) instead when return_report=True.

Return type:

PolyBrep

Raises:

TessellationError – Carries report, failures, status and status_name, including when strict mode rejects partial output.

Notes

Triangle count grows roughly quadratically as chord_height_tolerance is tightened. Pair this with poly_brep_volume_via_api for mass-property checks on the mesh, or with the poly_boolean_* family for polygon-mesh CSG.

See Also:
  • poly_brep_is_manifold_via_api – Manifold check on the mesh.

  • poly_brep_volume_via_api – Volume of the tessellated mesh.

  • compute_volume – Exact volume of the source Brep.

  • poly_boolean – Boolean ops on tessellated meshes.

  • usd.export_mesh – Round-trip the mesh through USD.

Wraps: SmApiTessellate

usd_brep.tessellate_boundaries(
brep: _omni_solid.Brep,
*,
angle_tolerance_deg: float = 5.0,
allow_partial: bool = False,
) → tuple#

Pure: returns boundary samples; inputs unchanged.

Parameters:
  • brep – Source Brep.

  • angle_tolerance_deg – Curve tangent tolerance. Must be finite and positive.

  • allow_partial – Retain successful edges when sampling fails. Defaults to False.

Returns:

Flat point tuples, per-edge vertex counts, and borrowed Edge handles.

Return type:

tuple

Notes

Counts correspond to edges; degenerate curves retain one point. Missing or failed curves have zero counts when allow_partial=True; otherwise sampling failures raise RuntimeError. Invalid arguments always raise. No relative chord criterion is applied. Edge handles belong to the source Brep and must be reacquired after topology-changing operations.

Wraps: SmApiTessellateBoundaries

usd_brep.tessellation_defaults() → dict#

Default tessellation quality as a fresh dict, keyed to match the keyword arguments of tessellate, so it can be splatted and overridden:

sm.tessellate(brep, **{**sm.tessellation_defaults(), "chord_height_tolerance": 0.001})

A new dict each call; mutating it does not change what tessellate uses.

Wraps: SmTessellationDefaults

usd_brep.transform(
target: object,
placement: _omni_solid.Axis2Placement,
) → object#

Mutates: target; returns the same handle for chaining.

Apply a combined rotation/translation to an independent modeling Object.

Parameters:
  • target – Brep, PolyBrep, standalone Curve, or standalone Surface.

  • placement – Axis2Placement encoding the combined rigid transform (rotation + translation) to apply.

Notes

Use this when you need a single rigid transform expressed as a placement. For separate moves, prefer translate / rotate. Curves and Surfaces owned by a Brep must be transformed through that Brep.

See Also:
  • translate – Translation-only convenience.

  • rotate – Rotation-only convenience.

Wraps: SmApiTransform

usd_brep.translate(target: object, translation: tuple) → object#

Mutates: target; returns the same handle for chaining.

Translate an independent modeling Object by a displacement vector.

Parameters:
  • target – Brep, PolyBrep, standalone Curve, or standalone Surface.

  • translation – Displacement vector (dx, dy, dz) in modeling units.

Notes

The underlying geometry is transformed exactly - no approximation is introduced. Curves and Surfaces owned by a Brep must be transformed through that Brep.

See Also:
  • rotate – Rotate around an axis.

  • scale – Scale by per-axis factors.

Wraps: SmApiTranslate

usd_brep.trim_project_parallel(
object: _omni_solid.Object,
curve: _omni_solid.BSplineCurve,
projection_dir: tuple,
ref_point: tuple,
trim_type: _omni_solid.TrimType = <TrimType.KEEP_POINT: 0>,
) → _omni_solid.Brep#

Consumes: object; returns new Brep.

Project a curve onto an object’s faces and trim, keeping or splitting per option.

Parameters:
  • object – Brep or standalone surface to trim. Consumed on success; see Notes for failure.

  • curve – B-spline curve to project. Typically a closed loop.

  • projection_dir – Projection direction as (dx, dy, dz).

  • ref_point – Reference point as (x, y, z). Used only when trim_type is KEEP_POINT or DELETE_POINT; ignored for SPLIT.

  • trim_type –

    TrimType selector controlling what to do with the two sides of the projected loop:

    • KEEP_POINT (default): keep the side containing the projection of ref_point.

    • DELETE_POINT: delete the side containing the projection of ref_point.

    • SPLIT: keep both sides as separate faces.

Returns:

trimmed (or split) result.

Return type:

Brep

Notes

On failure the call raises and object is not consumed. A Brep stays with the caller but may be partially trimmed. A standalone surface rejected up front (for example a zero projection_dir) is left untouched; if the kernel trim itself fails, the surface stays attached to an internal Brep that is not freed.

See Also:
  • project_and_trim – Brep-only convenience that always keeps the side containing ref_point.

  • cut – Plane-based trim with no curve projection.

Wraps: SmApiTrimProjectParallel

usd_brep.trim_surface_with_3d_curves(
surface: _omni_solid.Surface,
curve_loops: List[int],
curves: List[_omni_solid.Curve],
) → _omni_solid.Brep#

Consumes: surface, curves; returns new Brep.

Trim a standalone surface with 3D curve loops to produce a Brep face body.

Parameters:
  • surface – Untrimmed surface to trim. Consumed by the call, even if it raises.

  • curve_loops – List giving the count of curves in each loop. The sum of all entries must equal len(curves). For example, [4, 3] means the first four curves form the outer loop and the next three form a hole.

  • curves – Trimming curves in head-to-tail order, grouped loop-by-loop according to curve_loops. Each loop must be closed and lie on (or near) surface. Consumed by the call, even if it raises: on failure they may already be deleted. Do not reuse them.

Returns:

sheet body whose faces are the surface clipped to the supplied loops.

Return type:

Brep

See Also:
  • create_planar_faces – Build a planar Brep from coplanar curve loops without supplying a surface.

  • trim_project_parallel – Trim by projecting a curve along a direction.

Wraps: SmApiTrimSurfaceWith3dCurves

usd_brep.turn_to_nurbs(brep: _omni_solid.Brep) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Replace every analytic / periodic surface in the Brep (cylinder, cone, sphere, torus, plane) with an equivalent NURBS surface in place. No-op on surfaces that are already NURBS.

Parameters:

brep – Brep to convert in place.

Notes

Analytic surfaces, lines and circles are copied exactly from their NURBS form. Offset surfaces and other edge curves are approximated, and face UV trim curves are removed (later operations regenerate them). If a borrowed handle returned by Face.surface() or Edge.curve() would be replaced, the call raises RuntimeError before modifying the Brep. Release those handles and reacquire them after conversion, or convert a brep.copy() to preserve handles into the original.

Wraps: SmApiTurnToNurbs

usd_brep.unify_normals(
brep: _omni_solid.Brep,
start_face: _omni_solid.Face,
num_samples: int = 100,
) → tuple#

Mutates: brep; returns (brep, flipped_faces) for chaining.

Orient all face normals consistently within a Brep.

Parameters:
  • brep – Brep to orient in place.

  • start_face – Reference face whose existing normal direction is kept. Choose a face whose orientation you trust (often a face you know should point outward).

  • num_samples – Number of ray samples used for inside/outside classification. Higher = more reliable but slower. Defaults to 100, which is usually sufficient.

Returns:

(brep, flipped_faces) - the same brep handle (for chaining), and the faces whose normals were flipped to match the orientation propagated from start_face.

Return type:

tuple[Brep, list[Face]]

Notes

Typically run after stitching, where individual faces may have arrived from import with inconsistent orientation.

See Also:
  • stitch_into_solid – Common predecessor in the import workflow.

  • is_manifold_solid – Final validation after unifying normals.

Wraps: SmApiUnifyNormals

usd_brep.variable_radius_fillet(
brep: _omni_solid.Brep,
edges: List[_omni_solid.Edge],
*,
start_radius: float,
end_radius: float,
xsect_type: int = 1,
continuity: int = 1,
) → _omni_solid.Brep#

Mutates: brep; returns the same handle for chaining.

Fillet selected edges with linearly varying radius along each edge.

Parameters:
  • brep – Brep to fillet in place.

  • edges – Edges to fillet.

  • start_radius – Fillet radius at the start of each edge. Must be positive. Keyword-only.

  • end_radius – Fillet radius at the end of each edge. Must be positive. Keyword-only.

  • xsect_type – Cross-section integer: 0 = linear, 1 = circular (default), 2 = blend. These are not the FilletXSect values: FilletXSect.LINEAR is 1 and selects circular. Keyword-only.

  • continuity – For xsect_type == 2: 1 = G1, 2 = G2, 3 = G3. At a vertex where three filleted edges meet, only G1 continuity is guaranteed across the corner-patch boundary. Defaults to 1. Keyword-only.

Notes

Radius varies linearly from start_radius to end_radius along each selected edge.

See Also:
  • fillet_edges – Constant-radius variant.

  • fillet_edges_per_edge – Per-edge constant radii and cross-sections.

Wraps: SmApiVariableRadiusFillet

usd_brep.vertex_point(vertex: _omni_solid.Vertex) → tuple#

3D position of a vertex.

Parameters:

vertex – Vertex to query.

Returns:

(x, y, z).

Return type:

tuple[float, float, float]

See Also:

Vertex.point – Method form on the Vertex class.

Wraps: SmApiVertexGetPoint