Patterning
Files
- BeamPreLoadResultrComponent.cs
This file defines a Grasshopper component named `BeamPreLoadResultrComponent` within the FeMM framework, designed to extract pretension results from beam elements. It functions by accepting a single input of generic beam data and filtering for specific `BeamPreLoadModel` instances within that object's load collection. The core logic iterates through these pre-strain loads to aggregate their numerical values, string-based types, and associated load cases into separate lists. These extracted metrics are then output as three distinct parameters: Pre Load (numbers), Type (text), and Load Case (generic objects). Key components include the input/output parameter registration methods, the `SolveInstance` method handling the data extraction logic, and metadata attributes like the unique GUID and icon definition.
- BordersComponent.cs
This file defines a Grasshopper component named `BordersComponent` that extracts and processes the boundary edges of an input mesh. It identifies naked edges, then groups them into continuous polylines based on a user-defined angular tolerance to determine when segments should be joined or broken. The component offers an optional smoothing feature that converts these resulting polylines into curved curves for aesthetic refinement. Key components include input parameters for the mesh, angle tolerance, and smoothing boolean, alongside internal helper logic for segmenting and connecting edge data. Ultimately, it outputs either the raw border polylines or their smoothed curve equivalents as the final result.
- CableNetComponent.cs
This file defines a Grasshopper component named `CableNetComponent` within the FeMM framework, designed to generate cable net structures from input boundary curves. It accepts various parameters such as restraint and free edges, warp/weft steps, and geometric transformations like plane, origin, and rotation angle. The core functionality is delegated to the `CableNetHelper.CreateCableNet2` method, which calculates the grid geometry based on these inputs. Key components include input validation for empty or null data, error handling via runtime messages, and output management that organizes results into DataTrees for borders, warp lines, weft lines, and specific point categories. The class inherits from `GH_Component`, implementing standard Grasshopper lifecycle methods like `RegisterInputParams`, `SolveInstance`, and `RegisterOutputParams`.
- CableNetRadialComponent.cs
This file defines a Grasshopper component named `CableNetRadialComponent` within the FeMM framework, designed to generate radial cable net structures. It accepts input curves for restraint and free boundaries, along with geometric parameters like origin, plane, rotation, and subdivision steps. The core logic delegates the complex geometry generation to a helper method (`CableNetHelper.CreateRadialCableNet2`), which computes warp and weft lines based on the provided constraints. Key outputs include organized trees of boundary curves, internal structural lines (warp/weft), and categorized points (restrained, non-restrained, and internal). This allows users to parametrically design tensioned surface structures within Rhino/Grasshopper environments.
- CompensationComponent.cs
This file defines an obsolete Grasshopper component (`CompensationComponent_OBSOLETE`) designed to compensate flat panel patterns for tensile structures by applying warp and weft deformation scales. It utilizes the `TensileLib` solver to calculate node adjustments based on input scaling percentages, fixed edge lengths, and iterative non-linear solving parameters. The core logic involves transforming mesh vertices according to directional stretch factors while enforcing constraints via fixed beams to ensure geometric accuracy during the flattening process. Key components include input validation for planar meshes, a dictionary mapping original to modified node positions, and a loop that iterates through faces to apply length constraints to the underlying structural model. Ultimately, it outputs a compensated mesh that accounts for material behavior, serving as a specialized tool for form-finding in architectural geometry workflows.
- CompoundNetComponent.cs
This file defines `CompoundNetComponent`, a custom Grasshopper algorithmic modeling component designed to generate compound cable nets or grid structures. It processes input curves representing restraint edges, free edges, and perimeters alongside parameters for warp/weft spacing, net kind, origin, and rotation angles. The core logic iterates through these inputs to construct geometric networks, handling data tree structures to support multiple simultaneous net configurations. Key components include input registration for boundary conditions and geometric parameters, validation checks for empty inputs and matching list lengths, and the main solving instance that orchestrates the generation of warp, weft, and border lines.
- DecompensationComponent.cs
This file defines a Grasshopper component named `DecompensationComponent` that processes flattened panel curves to reverse compensation adjustments. It takes input curves and corresponding descriptors, validating that their counts match before proceeding with geometric calculations. The core logic normalizes curve parameters and uses linear interpolation between descriptor points to calculate specific warp and weft scaling factors for each vertex. These factors are then applied relative to the centroid of the input geometry to restore the original 3D shape from its flattened state. Key components include the `SolveInstance` method for execution flow, helper methods for normalized length calculation, and a descriptor-based interpolation system for deformation mapping.
- DecompensationDescriptorComponent.cs
This file defines a Grasshopper component named `DecompensationDescriptorComponent` that generates a configuration object for applying decompensation patterns to curves. It accepts six input parameters, including length and scaling factors for warp and weft directions at curve ends and centers, to define geometric adjustments. The core logic calculates specific transformation points by adjusting scale values and populating a `DecompensationDescriptor` object with these calculated points. This descriptor is then output as a single generic data item for use in subsequent pattern generation processes. Key components include the input registration for numerical and boolean controls, the mathematical transformation of scale inputs, and the instantiation of the final descriptor structure.
- DecompensationDescriptorExtComponent.cs
This file defines a Grasshopper component named `DecompensationDescriptorExtComponent` within the FeMM plugin, designed to generate decompensation descriptors for pattern making. It accepts four parallel input lists: length values, normalization flags, warp scales, and weft scales, ensuring they are of equal size before processing. The core logic iterates through these inputs to construct individual `DecompensationPoint` objects, which are then aggregated into a single `DecompensationDescriptor` instance. This descriptor serves as the primary output, encapsulating the geometric transformation data required for subsequent fabric simulation or pattern adjustment steps.
- DeformArapComponent.cs
This file defines a Grasshopper component named `DeformArapComponent` that performs mesh deformation using the As-Rigid-As-Possible (ARAP) algorithm. It accepts input meshes, iteration counts, pinned vertex indices, and target pin positions to control how the geometry is modified. The core logic delegates the heavy mathematical computation to an external `ARAPHelper`, supporting both standard 3D deformation and 2D flattening modes via a boolean flag. The component includes robust input validation, such as filtering invalid vertex indices and removing duplicate pins, while handling errors gracefully with runtime messages. Finally, it outputs the resulting deformed mesh after reconstructing its face structure and recalculating normals.
- FlatteningArapComponent.cs
This file defines a Grasshopper component named `FlatteningArapComponent` that performs 2D mesh flattening using the As-Rigid-As-Possible (ARAP) algorithm. It accepts a 3D input mesh and several tuning parameters, such as iteration counts and tolerance levels, to control the unwrap process. The core logic delegates the heavy computation to an external `ARAPHelper`, which iteratively adjusts vertex positions to minimize distortion while preserving local rigidity. After processing, the component returns the resulting flattened 2D mesh as output, handling potential convergence warnings or errors gracefully.
- FlatteningComponent.cs
This file defines a Grasshopper component named `FlatteningComponent` within the FeMM framework, designed to flatten 3D meshes into 2D patterns for fabrication. It accepts inputs such as a source mesh, border weight, and solver convergence parameters to control the geometric transformation process. The core logic involves fitting the input mesh to a local plane, converting quads to triangles, and constructing a computational model of nodes and edges for the flattening solver. It utilizes internal libraries from `TensileLib` to execute the non-linear solving algorithm that preserves intrinsic lengths and areas. Finally, it outputs the resulting flattened mesh while providing runtime feedback if the solver fails to converge within the specified iteration limits.
- GeodesicOffsetsComponent.cs
`GeodesicOffsetsComponent.cs` is a Grasshopper plugin component designed to generate offset curves along geodesic paths on 3D meshes. It accepts input parameters including a source mesh, initial geodesic curves, and configuration options for distance, side, resolution, and iteration steps to control the offset generation process. The core functionality involves calculating new geodesic lines parallel to the inputs by determining reference planes based on either vertical orientation or surface normals, then projecting points to find maximum distances for accurate offsetting. To ensure performance with large datasets, the component utilizes parallel processing (`Parallel.For`) to handle multiple geodesics concurrently while managing memory through mesh duplication and translation to the origin. Key outputs include the resulting offset geodesic curves, updated meshes representing internal cuts, and flattened mesh representations for visualization or further analysis.
- LineUpComponent.cs
This file defines `LineUpComponent`, a Grasshopper plugin that arranges input geometry (meshes or polylines) along a specified base line. It accepts parameters for spacing and alignment mode, using either minimal bounding boxes or specular alignment based on edge borders. The component calculates the direction and angle of the reference line to orient each item correctly. Finally, it outputs the transformed geometry list and corresponding bounding box curves, facilitating organized pattern generation within Rhino/Grasshopper workflows.
- MeshDivideComponent.cs
`MeshDivideComponent.cs` is a Grasshopper plugin component designed to divide a mesh into a specified number of parts using geodesic curves. It accepts inputs for the source mesh, division count, rotation angle, resolution, and iteration steps to control the precision of the calculation. The core logic involves creating a bounding box-based plane at regular intervals along the mesh's width and intersecting it with the mesh geometry. These intersections are then processed through a `MeshGeodesic` algorithm to generate smooth, shortest-path curves across the mesh surface rather than simple planar cuts. The component outputs these resulting geodesic curves as a list for further use in parametric modeling workflows.
- MeshGeodesicComponent.cs
This file defines a Grasshopper component named `MeshGeodesicComponent` within the FeMM plugin, designed to calculate geodesic paths on 3D meshes. It accepts a mesh, lists of start and end points, and parameters for resolution and iteration count as inputs. The core logic approximates geodesics by intersecting the mesh with a plane defined by the two points, then refining the resulting polyline using a custom `MeshGeodesic` solver class. Key components include input validation, plane-mesh intersection handling, curve joining, and a helper method that projects the calculated path back onto the mesh surface to ensure geometric accuracy.
- MeshRemapComponent.cs
This file defines a Grasshopper component named `MeshRemapComponent` that transfers geometric data between two meshes with identical topology. It takes two input meshes and optional geometry lists, then maps points or curves from Mesh A to Mesh B and vice versa. The core logic relies on barycentric interpolation, using face indices and texture coordinates from the source mesh to calculate corresponding positions in the target mesh. For curve inputs, it optionally resamples the curve based on user-defined sample counts before remapping key points. The component outputs the transformed geometry for both directions, ensuring consistent spatial mapping across topologically equivalent surfaces.
- OrderBordersComponent.cs
This file defines `OrderBordersComponent`, a Grasshopper plugin that sorts and orients a list of input curves to form a coherent panel border. It calculates the centroid of the curve midpoints and sorts them angularly around this center, using the bottom-most curve as a reference angle for consistent ordering. The component includes a boolean toggle to reverse the sort direction for clockwise versus counter-clockwise sequencing. Finally, it iterates through the sorted curves to flip their directions based on cross-product calculations, ensuring all borders are oriented consistently relative to the center. Key components include input/output parameter registration, angular sorting logic, and directional normalization via vector mathematics.
- SplitMeshOnCurvesComponent.cs
This file defines a Grasshopper component named `SplitMeshOnCurvesComponent` that divides a input mesh into separate panels using specified geodesic curves. It accepts parameters for the source mesh, cutting curves, and optional settings to extend curve endings and define cutter height and direction. The core logic constructs volumetric "cutters" by lofting between extended curves shifted along the defined direction vector. These cutters are then used to split the original mesh geometry via Rhino’s `Split` method. Finally, the component outputs the resulting mesh panels and the generated cutter meshes, handling potential errors gracefully during execution.