Skip to main content

Module build

Module build 

Source
Expand description

Building topology from geometry.

One level above Model’s raw builders: these take geometry, derive the topology it implies, check the invariants that need geometry to check, and report history.

§What “checked” means here

Model::add_wire verifies that its children are edges. That is all it can do, because it has no geometry. make_wire additionally verifies that consecutive edges actually meet, which is the property that makes a wire a connected path rather than a bag of edges, and which every algorithm downstream assumes without checking. A wire whose edges do not join produces a face with a gap in its boundary, and the first thing to notice is usually a boolean, several operations later.

Modules§

roles
Roles a builder assigns, so a rebuild can match entities up.

Functions§

attach_pcurve
Attach a pcurve to an edge, describing it in a surface’s parameter space.
attach_seam
Attach a seam representation to an edge: one pcurve per side of a closed surface’s join.
belted_wire
The one wire a face on a B-spline closed round in u takes when its file bounds it by rings alone and writes no seam: each ring runs the whole period along the chart, from one end column to the other, and without a seam no ring meets another, so the boundary encloses nothing in the chart. The seam is the surface’s own column at the period’s join, exact (the iso-curve the control columns trace), from where one ring’s walk ends to where the next begins; walked up one end column and back down the other, it closes the two rings into one loop. A single ring opposite a row the surface collapses to a point (a dome’s pole) takes the seam to that point and back, and the pole’s run across the chart is laid by closed_at_poles.
chain_wire_branches
Put a face’s wires on one branch of a periodic chart.
closed_at_poles
A wire’s edge uses with the chart closed where the surface collapses.
covers_whole_surface
Whether a face covers the whole of its surface: it has a wire, and every edge its wires walk has no length or is a seam of that surface walked once each way.
edge_vertices
The vertices an edge runs between, in the direction it is traversed.
edges_turn
How a closed walk of edge occurrences turns about axis: twice the area it encloses projected square to the axis, signed by the right-hand rule, from points sampled along the edges in traversal order. Positive for a ring walked counter-clockwise about axis.
find_plane
The plane a shape lies in, if it lies in one.
is_shell_closed
Whether every edge in a shell is shared by exactly two faces.
is_wire_closed
Whether a wire’s last edge returns to its first edge’s start.
make_apex_band
Build the face of a revolution cap: one closed ring belting a cone, with the apex the file never wrote synthesised as the degenerate ring the band needs.
make_band_between
Build the face of a band between two closed rings that need not be circles, each with a caller-supplied chart image.
make_band_of_rings
Build the face of a band between two closed rings of edges on a periodic analytic surface, joined by a synthesised seam.
make_compound
Build a compound from any shapes, with history.
make_compsolid
Build a shell from faces.
make_edge
Build an edge on curve, bounded by its own endpoints.
make_edge_between
Build an edge between two existing vertices, on curve.
make_face
Build a face on surface, bounded by wires.
make_face_on
Build a face on a surface the model already holds.
make_face_with_pcurves
Build a face on surface from per-wire edge lists, attaching an exact same-parameter pcurve to every edge.
make_natural_face
Build a face covering the whole of surface, with no trimming.
make_polygon
Build a wire of straight segments through a sequence of points.
make_profile_revolution_band
make_revolution_band on a curve revolved a whole turn about an axis (RevolutionSurface), its rings the parallels through the profile’s two ends.
make_revolution_band
Build the face of a revolution band: two closed rings joined by a synthesised seam, pcurves attached window-coherently.
make_shell
Build a shell from faces.
make_solid
Build a solid from shells.
make_vertex
Add a vertex at point.
make_wire
Build a wire from edges that meet end to end.
placed_edge_curve
An edge occurrence’s curve where the occurrence stands, and the range of it the edge covers; None for an edge with no curve in space.
rings_are_parallels
Whether two closed ring edges are parallels of surface, so that make_revolution_band can build a band between them. A reader asks this first: a periodic face bounded by two closed circles that are not parallels (a button head’s rims, square to the screw on a sphere whose chart runs along z) is a legitimate face on its own bounds, not a band missing its seam, and deserves no warning.
split_ring_on_column
Split a closed circle rim of a revolution band where it crosses the column of anchor, the vertex of the band’s other rim, so both rims have a vertex on one column and a seam can join them.
surface_iso_u_curve
The surface’s u = at iso-curve, parameterized by v exactly.
trimmed_or_fitted_where_bare
As trimmed_where_bare, with every edge left without a closed form given a pcurve fitted by projection at the curve’s own parameters: a face kept whole in a solid (a sweep’s end) is only valid with a trim on every edge.
trimmed_where_bare
Give every edge of face that has no trim on the face’s surface its exact one, where a closed form exists: a profile built from bare curves becomes a face a sweep can keep as an end.