AgentStack
SKILL verified MIT Self-run

Computational Geometry

skill-amanbh997-claude-skills-for-computational-designers-computational-geometry · by Amanbh997

NURBS curves and surfaces, mesh geometry, boolean operations, subdivision surfaces, tessellation methods, surface analysis, and point cloud processing for AEC computational design

No reviews yet
0 installs
10 views
0.0% view→install

Install

$ agentstack add skill-amanbh997-claude-skills-for-computational-designers-computational-geometry

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Computational Geometry? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Computational Geometry for AEC

This skill encapsulates the full breadth of computational geometry knowledge required for architecture, engineering, and construction workflows. It covers fundamental primitives, advanced surface mathematics, mesh processing, tessellation strategies, point cloud pipelines, and the precise tolerance management that separates prototype-grade geometry from fabrication-ready output.


1. Geometry Type Hierarchy

Every computational design system is built on a layered hierarchy of geometric types. Understanding the properties, capabilities, and conversion paths of each type is essential for selecting the right representation at every stage of a project.

1.1 Points, Vectors, Planes, Frames

Point (Point3d)

  • Definition: A dimensionless location in 3D Euclidean space defined by (x, y, z) coordinates.
  • Properties: No length, area, or volume. Carries only positional information.
  • AEC use cases: Survey control points, grid intersections, insertion points for components, structural node locations, sensor positions.
  • Conversion: A point can seed any higher-order geometry. Points become curve control points, mesh vertices, or centroid markers.

Vector (Vector3d)

  • Definition: A direction and magnitude in 3D space, defined by (x, y, z) components. Unlike a point, a vector has no fixed position.
  • Properties: Magnitude (length), direction (unit vector). Supports dot product, cross product, angle computation, projection.
  • AEC use cases: Wind direction encoding, structural force vectors, surface normals for solar analysis, movement direction for pedestrian simulation, facade orientation vectors.
  • Key operations: Normalize, scale, add, subtract, dot product (scalar projection), cross product (perpendicular vector), angle between vectors, reflection, rotation.

Plane

  • Definition: An infinite flat surface defined by an origin point and a normal vector, or equivalently by an origin and two in-plane axes (X-axis, Y-axis) with the normal as Z-axis.
  • Properties: Origin, Normal, XAxis, YAxis. Divides space into two half-spaces.
  • AEC use cases: Floor levels, section cut planes, mirror planes for symmetric designs, construction planes for drawing, reference datums.
  • Conversion: Planes can generate planar surfaces, serve as projection targets, or define local coordinate systems.

Frame

  • Definition: A right-handed orthonormal coordinate system defined by an origin point and three mutually perpendicular unit vectors (X, Y, Z).
  • Properties: Origin, XAxis, YAxis, ZAxis. Fully defines position and orientation.
  • AEC use cases: Structural member local axes, robotic fabrication tool frames, camera positions for rendering, element insertion frames, joint coordinate systems.
  • Distinction from Plane: A frame carries full rotational information (three axes), while a plane is defined by only one axis (the normal) plus a rotation ambiguity around that normal.

1.2 Curves

Line

  • Definition: The shortest path between two points; a degree-1 NURBS curve with two control points.
  • Properties: Start point, end point, length, midpoint, direction vector.
  • AEC use cases: Grid lines, structural member centerlines, dimension lines, sight lines, setback lines.
  • Conversion: Can be treated as a degree-1 NURBS curve, a polyline with two vertices, or a mesh edge.

Polyline

  • Definition: A connected sequence of line segments defined by an ordered list of vertices.
  • Properties: Vertex list, segment count, total length, is-closed flag, bounding box.
  • AEC use cases: Property boundaries, road centerlines, building footprints, pipe routes, cable tray paths, simplified contour lines.
  • Conversion: Each segment is a line. The entire polyline can be degree-elevated to a NURBS curve. Can be used as a mesh wireframe or triangulated polygon boundary.

Arc

  • Definition: A portion of a circle defined by center, radius, start angle, and end angle (or equivalently by three points).
  • Properties: Center, radius, start/end angles, arc length, start/end points, midpoint.
  • AEC use cases: Curved walls, arch profiles, fillet transitions, roundabout geometry, curved beam profiles.
  • Conversion: Can be represented exactly as a rational NURBS curve of degree 2 (using weights).

Circle

  • Definition: A closed planar curve where every point is equidistant from the center. A special case of an arc (360 degrees) and of an ellipse (equal radii).
  • Properties: Center, radius, plane, circumference, area.
  • AEC use cases: Column cross-sections, roundabouts, circular openings, pipe profiles, rotunda plans.
  • Conversion: Exactly representable as a rational NURBS curve of degree 2 with specific weights. Can be approximated by a polygon with n vertices.

Ellipse

  • Definition: A closed planar curve defined by a center, two perpendicular semi-axes of different lengths.
  • Properties: Center, semi-major axis (a), semi-minor axis (b), plane, eccentricity, perimeter (approximation), area.
  • AEC use cases: Elliptical domes, stadium plans, oval windows, landscape features, acoustic reflectors.
  • Conversion: Exactly representable as a rational NURBS curve. Can be approximated by a polyline or polygon.

NURBS Curve

  • Definition: Non-Uniform Rational B-Spline curve defined by degree, control points, knot vector, and weights.
  • Properties: Degree, control point count, knot vector, domain, length, is-closed, is-periodic, continuity.
  • AEC use cases: Freeform facades, road alignments with complex geometry, landscape contours, furniture profiles, any smooth curved design element.
  • Conversion: The universal curve representation. All other curve types can be expressed as NURBS curves. Can be approximated by a polyline (tessellated) for meshing or CNC output.

Polycurve (Composite Curve)

  • Definition: An ordered sequence of connected curve segments that may include lines, arcs, and NURBS spans joined end-to-end.
  • Properties: Segment list, total length, is-closed, continuity at joints (G0 minimum).
  • AEC use cases: Road alignments (tangent-spiral-arc-spiral-tangent), building outlines mixing straight and curved edges, complex trim boundaries, rail profiles.
  • Conversion: Can be rebuilt as a single NURBS curve (with potential continuity loss at joints). Each segment retains its native type.

1.3 Surfaces

Planar Surface

  • Definition: A flat, bounded region of a plane defined by one or more closed boundary curves (outer boundary plus optional holes).
  • Properties: Plane, area, centroid, boundary curves, perimeter.
  • AEC use cases: Floor slabs, wall faces, ceiling panels, glass panes, site boundaries.
  • Conversion: Trivially meshable. Representable as a degree-1 NURBS surface.

NURBS Surface

  • Definition: A bi-parametric surface defined by a grid of control points, degrees in U and V directions, knot vectors in U and V, and weights.
  • Properties: Degree U/V, control point grid (rows x cols), domain U/V, is-closed in U/V, is-trimmed, area, centroid.
  • AEC use cases: Freeform facades, shell roofs, landscape terrain patches, furniture surfaces, ship hull forms.
  • Conversion: Can be tessellated into a mesh. Can be trimmed, split, or joined with other surfaces.

Extrusion Surface

  • Definition: A surface generated by sweeping a profile curve along a straight direction vector.
  • Properties: Profile curve, direction vector, is-capped, length.
  • AEC use cases: Walls, columns, mullions, linear structural members, ducting, pipe runs.
  • Conversion: A special case of a sweep along a line. Representable as a NURBS surface or mesh.

Surface of Revolution

  • Definition: A surface generated by rotating a profile curve around an axis.
  • Properties: Profile curve, axis (point + direction), angle range, is-full-revolution.
  • AEC use cases: Domes, columns with entasis, vases, cooling towers, rotational decorative elements.
  • Conversion: Representable as a rational NURBS surface. Can be tessellated into a mesh.

Lofted Surface

  • Definition: A surface interpolating or approximating a series of cross-section curves.
  • Properties: Section curves, loft type (normal, loose, tight, uniform, closed), rebuild options.
  • AEC use cases: Towers with varying floor plates, bridge decks, transition pieces between different profiles, terrain ribbons.
  • Conversion: Results in a NURBS surface. Quality depends on curve compatibility (matching point counts and parameterization).

Swept Surface

  • Definition: A surface generated by sweeping a profile curve along one or two rail curves.
  • Properties: Profile curve(s), rail curve(s), sweep type, alignment options.
  • AEC use cases: Handrails, cornices, moldings, highway guardrails, complex facade bands.
  • Conversion: Results in a NURBS surface. Two-rail sweeps provide more geometric control than single-rail.

Pipe Surface

  • Definition: A surface generated by sweeping a circular cross-section along a rail curve with specified radius.
  • Properties: Rail curve, radius (or variable radii), cap type.
  • AEC use cases: Structural tubes, piping systems, handrails, cable-stayed bridge cables, conduit runs.
  • Conversion: A special case of a swept surface with circular profile. Representable as NURBS or mesh.

1.4 Solids

Brep (Boundary Representation)

  • Definition: A solid defined by its bounding surfaces (faces), edges, and vertices, with topological connectivity information.
  • Properties: Face list, edge list, vertex list, is-solid (closed), is-manifold, volume, centroid, surface area, Euler characteristic.
  • AEC use cases: Building massing models, structural elements, MEP components, furniture, any volumetric design element requiring boolean operations.
  • Conversion: Can be meshed for analysis or rendering. Can be sectioned to produce curves. Individual faces are surfaces.

Extrusion Solid

  • Definition: A closed solid generated by extruding a closed planar curve along a direction, with top and bottom caps.
  • Properties: Profile curve, direction, height, volume, surface area.
  • AEC use cases: Columns, walls (prismatic), floor slabs, simple massing volumes, extruded structural profiles (I-beam, channel, angle).
  • Conversion: A special case of Brep. Can be converted to mesh.

Boolean Result Solid

  • Definition: A solid resulting from CSG (Constructive Solid Geometry) operations (union, difference, intersection) between two or more solids.
  • Properties: Inherits Brep properties. Topology may be complex with many faces and edges depending on the intersection geometry.
  • AEC use cases: Wall openings (difference), merged building volumes (union), spatial overlap analysis (intersection), complex façade panel geometries.
  • Conversion: Standard Brep after boolean resolution. May require cleanup (merge coplanar faces, remove micro-edges).

1.5 Meshes

Triangular Mesh (Tri-mesh)

  • Definition: A mesh composed entirely of triangular faces. Each face is defined by three vertex indices.
  • Properties: Vertex count, face count, edge count, is-manifold, is-closed, surface area, volume (if closed), Euler characteristic.
  • AEC use cases: FEA (finite element analysis) discretization, 3D printing, terrain surfaces (TIN), real-time visualization, photogrammetry output.
  • Conversion: Universal mesh format. All other mesh types can be triangulated. Cannot directly convert to smooth NURBS without fitting.

Quadrilateral Mesh (Quad-mesh)

  • Definition: A mesh composed entirely of four-sided faces. Each face is defined by four vertex indices.
  • Properties: Same as tri-mesh plus: face planarity deviation, edge alignment quality.
  • AEC use cases: Facade panelization (flat quads preferred for glass), structural shell analysis, subdivision surface base meshes, textile/fabric patterns.
  • Conversion: Each quad can be split into two triangles. Quads can be derived from NURBS surface isoparm sampling.

Ngon Mesh

  • Definition: A mesh allowing faces with any number of vertices (3, 4, 5, or more sides per face).
  • Properties: Same as other meshes plus: maximum face valence, face planarity metrics.
  • AEC use cases: Voronoi-based facade panels, organic surface panelization, architectural geometries where non-standard face shapes are acceptable.
  • Conversion: Any ngon face can be triangulated by fan or ear-clipping methods.

Subdivision Mesh

  • Definition: A coarse control mesh that defines a smooth limit surface via recursive subdivision rules (Catmull-Clark, Loop, Doo-Sabin).
  • Properties: Control mesh, subdivision level, limit surface, crease edges, corner vertices.
  • AEC use cases: Organic architectural forms, furniture design, smooth transitions between geometric elements, concept modeling.
  • Conversion: At any subdivision level, the result is a standard mesh. The limit surface can be approximated by sufficient subdivision levels.

1.6 Other Geometric Types

Point Cloud

  • Definition: An unstructured collection of points in 3D space, typically with associated attributes (color, intensity, normal, classification).
  • Properties: Point count, bounding box, density, attributes per point.
  • AEC use cases: As-built documentation, heritage preservation scanning, site survey, construction progress monitoring, clash detection against design models.
  • Conversion: Can be meshed (Poisson, ball-pivoting, alpha shapes). Can be segmented and fitted with geometric primitives. Cannot directly become NURBS without reconstruction.

Voxels

  • Definition: Volumetric pixels; a 3D grid of cubic cells, each storing a value (occupied/empty, density, material, temperature).
  • Properties: Grid resolution (nx, ny, nz), voxel size, total volume, memory footprint.
  • AEC use cases: Solar radiation analysis (volumetric irradiance), wind comfort studies (CFD grids), 3D printing slicing, structural topology optimization, spatial analysis (occupancy, visibility).
  • Conversion: Voxel boundaries can be extracted as meshes (marching cubes algorithm). Voxels can be derived from mesh or Brep by spatial sampling.

2. NURBS Deep Dive

2.1 NURBS Curves

NURBS (Non-Uniform Rational B-Spline) curves are the industry-standard representation for freeform curves in CAD systems. They unify lines, arcs, circles, conics, and freeform curves under a single mathematical framework.

Degree and Order

  • Degree (p): The polynomial degree of the basis functions. Common values: 1 (linear/polyline), 2 (conic sections, arcs), 3 (cubic, most common for freeform), 5 (automotive/aerospace).
  • Order (k): k = p + 1. A cubic curve has order 4.
  • Higher degree = smoother curve but more computational cost, potential oscillation, and harder to control locally.
  • Degree 3 (cubic) is the workhorse of AEC: sufficient smoothness for architectural curves, good local control, efficient computation.

Control Points

  • Control points define the shape of the curve. The curve does not generally pass through interior control points (except at endpoints for clamped curves).
  • Minimum number of control points: degree + 1 (e.g., 4 for cubic).
  • Moving a control point affects only a local region of the curve (local support property).
  • More control points = more local control but more complex management.

Knot Vector

  • An ordered sequence of non-decreasing parameter values that define where each basis function is active.
  • Length of knot vector: n + p + 1, where n = number of control points, p = degree.
  • Clamped (open) knot vectors: First and last knot values repeated p+1 times, forcing the curve through the first and last control points.
  • Uniform knot vectors: Interior knots are equally spaced.
  • Non-uniform: Interior knots at arbitrary spacing, allowing variable parameterization.
  • Knot multiplicity: Repeating an interior knot reduces continuity at that parameter. Multiplicity = p creates a sharp corner (C0 only).

Weights

  • Each control point has an associated weight (w_i). When all weights are equal, the curve is a non-rational B-spline.
  • Rational NURBS (weights != 1) can exactly represent conic sections: circl

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.