Tools
Files
- AlignBeamAxesComponent.cs
`AlignBeamAxesComponent.cs` is a Grasshopper plugin component designed to reorient the local coordinate axes of structural beam elements. It accepts a beam, a target axis selection (Red/Green/Blue or Local X/Y), and a reference direction vector as inputs. The core logic calculates the necessary rotational adjustment using vector cross-products and dot products to align the specified beam axis with the input direction. Special handling exists for the "3 Blue" axis, which reverses the beam's start and end points if needed, while other axes apply an angular rotation around the beam's longitudinal axis. The component outputs the modified `GH_Beam` object, ensuring consistent orientation for downstream FEMM analysis or visualization tasks.
- AlignPlateAxesComponent.cs
`AlignPlateAxesComponent.cs` is a Grasshopper plugin component designed to reorient the local coordinate system of a finite element plate geometry. It accepts three inputs: the target `GH_Plate`, an integer specifying which local axis (Red, Green, or Blue) to align, and a 3D `Vector3d` representing the desired direction for that alignment. The core logic calculates the necessary rotational adjustment by comparing current axes with the target direction using cross products and dot products. If aligning the normal (Blue axis), it also handles node ordering reversal to maintain consistent surface orientation when the direction flips. Finally, it outputs a new `GH_Plate` instance with the updated local axes and angle properties.
- BeamFilterComponent.cs
`BeamFilterComponent.cs` is a Grasshopper plugin component designed to filter a list of structural beams based on multiple criteria. It accepts inputs for beam IDs, start/end positions, property names, and group memberships to selectively process the geometry. The core logic iterates through each beam, checking if it matches any specified condition using spatial tolerance for position checks. Matching beams are output to the "Beams" port, while non-matching ones go to the "Others" port. Key components include input parameter registration for various data types and a `SolveInstance` method that implements the filtering algorithm. This tool facilitates precise selection and categorization of elements within a parametric modeling workflow.
- CurveToMeshComponent.cs
This file defines a Grasshopper component named `CurveToMeshComponent` that converts input curves into a mesh geometry. It accepts a list of curves, along with parameters for maximum face edges and geometric tolerance, to control the meshing process. The core functionality is implemented in the `SolveInstance` method, which merges the input curves using helper utilities and generates the final mesh via `FormFindingHelper`. Key components include input registration for curves and settings, output registration for the resulting mesh, and error handling to manage runtime exceptions. The component is categorized under "FEMM" tools and provides a unique identifier and icon for integration within the Grasshopper environment.
- ElementFilterComponent.cs
`ElementFilterComponent.cs` is a Grasshopper plugin component designed to filter finite element model data based on specific geometric types. It takes two input lists: a source list of elements and a "find" list containing target nodes, beams, or plates. The component iterates through the find list, matching items by their unique GUIDs against the corresponding type in the source list. Elements that match are moved to the "Found" output, while non-matching elements remain in the "Others" output. This allows users to selectively extract or isolate specific structural components within an FEM workflow.
- LinkFilterComponent.cs
This file defines `LinkFilterComponent`, a Grasshopper plugin that filters structural links based on multiple criteria. It accepts inputs such as link IDs, node groups, property names, and geometric positions (start/end points) to identify specific connections. The component iterates through the input list, checking each link against these parameters using a tolerance for spatial comparisons. Links matching any of the specified conditions are routed to the "Links" output, while non-matching ones go to "Others". Key components include the `SolveInstance` method for logic execution and parameter registration methods defining its flexible interface.
- MergeGeometryComponent.cs
`MergeGeometryComponent.cs` is a Grasshopper plugin component designed to consolidate various geometric elements from an FEM model into unified lists. It accepts a list of generic geometry elements (points, curves, and meshes) along with a tolerance value for merging operations. Inside the `SolveInstance` method, it iterates through inputs, casting them into specific Rhino geometry types like `Point3d`, `Curve`, and `Mesh`. These separated geometries are then processed by `CommonModelHelper.MergeGeometry` to merge overlapping or nearby entities based on the specified tolerance. Finally, the component outputs the merged points, curves, and meshes back to the Grasshopper canvas. Key components include input registration for flexible geometry handling, type-specific extraction logic, and integration with a helper class for the actual geometric computation.
- MeshCleanComponent.cs
`MeshCleanComponent.cs` is a Grasshopper plugin component designed to clean and simplify 3D meshes by removing small triangles and merging nearby vertices. It accepts input parameters for minimum edge length, face area, and corner angle tolerance to define cleaning thresholds. The core logic utilizes an `RTree` spatial index to efficiently cluster vertices within the specified length threshold and maps them for welding. Additionally, it identifies and preserves border corners by analyzing vertex connectivity and angular relationships along naked edges. Finally, it reconstructs the mesh using these clusters while maintaining geometric integrity through normal unification and unused vertex culling.
- MeshPipeComponent.cs
`MeshPipeComponent.cs` is a Grasshopper plugin component that generates a meshed pipe geometry based on a central axis line. It accepts three inputs: the defining `Line`, a `Radius` for the pipe's cross-section, and the number of `Edges` to approximate the circular profile. The algorithm calculates points for a polygonal base at the start of the line, transforms them along the line’s axis, and connects them to form the final mesh. Key components include input parameter registration (`RegisterInputParams`) and the core geometric logic within `SolveInstance`. It outputs the resulting `Mesh` object for further use in Rhino/Grasshopper workflows.
- NodeFilterComponent.cs
This file defines a Grasshopper component named `NodeFilterComponent` that filters a list of structural nodes based on specific criteria. It accepts inputs for node IDs, geometric positions (with tolerance), and group names, allowing users to select nodes by matching any of these attributes. The component outputs two lists: one containing the filtered nodes that match the search parameters, and another containing the remaining "other" nodes. Key components include input registration for flexible data types, a core filtering loop in `SolveInstance` that checks ID, group, and position matches, and integration with custom FeMM data types like `GH_Node`.
- PlateFilterComponent.cs
This file defines a Grasshopper component named `PlateFilterComponent` within the FeMM framework, designed to filter structural plate elements based on specific criteria. It accepts multiple input parameters, including plate objects, IDs, geometric positions, property names, and group assignments, allowing for flexible selection logic. The core functionality iterates through the input plates and checks each against the provided filters, adding matching items to a "filtered" list and non-matching items to an "others" list. The component utilizes distance tolerance for position-based filtering and handles optional inputs gracefully by aborting if no filter criteria are specified. Finally, it outputs two distinct lists of plates, enabling users to separate selected elements from the rest for further processing in their computational design workflow.
- RemeshComponent.cs
This file defines a Grasshopper component named `Remesh` that simplifies and remeshes an input geometry by extracting its boundary curves. It takes four inputs: the source mesh, a target edge length, a collinearity tolerance distance, and an optional reference plane for orientation. The core logic extracts naked edges from the mesh, joins them into a single closed polyline, and then simplifies this boundary using a custom algorithm that removes points based on perpendicular distance thresholds. Finally, it generates a new mesh along this simplified boundary curve using the specified target length parameter.
- SubdivideMeshComponent.cs
This file defines a Grasshopper component named `SubdivideMeshComponent` that subdivides input meshes to follow an ideal surface curvature. It accepts a source mesh and an integer count for subdivision iterations, returning the refined geometry as output. The core logic iteratively applies a custom `SubdivideMesh` method, which replaces each original face with four new faces using quadratic Bezier surfaces for smoother results. Key components include helper methods like `BuildQuadraticSurface` to approximate local curvature and `SampleQuadPoint`/`SampleTrianglePoint` to calculate new vertex positions along edges and centers. This approach ensures topological consistency by combining identical vertices and rebuilding normals after each subdivision pass.
- SurfaceMeshComponent.cs
This file defines a Grasshopper component named `SurfaceMeshComponent` that automates the creation of finite element meshes from input surfaces using the Straus7 AutoMesh engine. It accepts various geometric inputs, including surfaces, unit systems, and specific meshing parameters like target element types, size modes, and tolerance settings. The component processes these inputs by temporarily adding geometry to the Rhino document layers before invoking the external meshing tool to generate results. Key components include input parameter registration for controlling mesh density and geometry cleaning, an output handler for returning generated meshes and status logs, and internal logic for managing background execution states and error handling.
- SurfaceSplitterComponent.cs
This file defines a Grasshopper component named `SurfaceSplitterComponent` that generates cutting curves to partition a single-face Brep surface. It accepts input geometry including the target surface, optional internal points and lines, and a tolerance value to define split boundaries. The core logic projects 3D geometry onto a 2D plane, constructing a graph of nodes and edges from the surface perimeter and inputs. It then employs a nearest-neighbor algorithm with angle and intersection checks to sequence these nodes into closed polylines. Finally, it transforms these 2D cutting sequences back into 3D space, outputting the resulting curve list for further processing.
- UnweldMeshComponent.cs
This file defines a Grasshopper component named `UnweldMeshComponent` that splits mesh vertices along specified curve paths to create disjointed geometry. It accepts an input mesh, a list of curves defining the unwelding paths, and a tolerance value for point matching. The core logic iterates through each curve to identify mesh vertices lying on it, sorting them by their position along the curve. For each vertex in the path, the component duplicates the vertex and selectively detaches connected faces based on the curve's orientation relative to the mesh normals. This process effectively "unwelds" the mesh edges, allowing for subsequent operations like folding or separating surface patches.