Components
Files
- AnalysisOptionsComponent.cs
This file defines the `AnalysisOptionsComponent`, a Grasshopper plugin component designed to configure parameters for glass structural analysis. It accepts three optional inputs: thickness type (nominal or standard-specific), visualization color map theme, and maximum deflection limits. The core logic in `SolveInstance` validates these inputs, converts units if necessary, and constructs an `AnalysisOptions` object containing the selected settings. This configuration object is then wrapped and output as a generic parameter for use by downstream analysis components. Key dependencies include custom definitions for thickness types, color maps, and unit conversion utilities.
- AuthComponentBase.cs
`AuthComponentBase.cs` is an abstract Grasshopper component that serves as the foundational class for handling authentication within the GlassHopper Rhino plugin. It manages user identity across various providers, including Google, Maffeis Domain, and Email/Password, while enforcing a singleton pattern to ensure only one active authentication instance exists per document. The component utilizes Microsoft Identity Client and Google APIs to secure tokens and credentials, exposing results through text outputs and internal callbacks for UI updates. Key features include state management for login/logout cycles, runtime warnings against multiple component instances, and integration with Rhino’s serialization system for persistent session data.
- AuthComponentV1_OBSOLETE.cs
This file defines an obsolete Grasshopper component named `AuthComponentV1_OBSOLETE`, which inherits from `AuthComponentBase` and is marked as hidden in the UI. Its primary function is to trigger an authentication process via a single "Authenticate" button, which sets an internal flag and forces a solution expiration upon being pressed. The component relies on custom GlassHopper attributes and helpers to manage its specific button behavior and state management. It explicitly implements standard Grasshopper lifecycle methods like `CreateAttributes` for UI setup and provides a unique `ComponentGuid` to ensure compatibility with older project files. The code indicates this version is deprecated, likely superseded by a newer iteration of the authentication logic.
- AuthComponentV2.cs
This file defines `AuthComponentV2`, a Grasshopper component that inherits from `AuthComponentBase` to handle authentication workflows. Its primary function is triggered by a custom UI button labeled "Authenticate," which sets an internal flag and forces the solution to expire, likely initiating a login or token refresh process. The component utilizes `ComponentComboPlusButtonAttributes` to create this interactive button interface within the Grasshopper canvas. It also overrides standard properties like `Exposure` to ensure it appears in the primary panel and provides a unique `ComponentGuid` for version control and compatibility with saved files.
- BarrierLoadComponent.cs
This file defines a Grasshopper component named `BarrierLoadComponent` that generates structural barrier loads for glass surfaces within the GlassHopper framework. It accepts inputs such as a Brep surface, load magnitude, duration, height, and optional orientation to calculate specific load areas based on the geometry's bounding box. The core logic intersects the input glass surface with a defined volume at the specified height to extract the relevant load area curves. These geometric results are processed into point lists compatible with the Maffeis structural analysis engine. Finally, the component outputs both the computed load data and the resulting area curves for downstream structural evaluation.
- ClimateAltitudeComponent.cs
This file defines a Grasshopper plugin component named `ClimateAltitudeComponent` that generates structural loads based on altitude variations. It accepts four numeric inputs: minimum and maximum glass altitudes, the production altitude, and a load duration in seconds. The core logic calculates the altitude deltas relative to the production point for both summer and winter seasons. If these deltas are non-zero, it creates specific `ClimateLoadCase` objects with defined parameters like season and climate type. Finally, it outputs a list of these generated load cases as generic data types for further use in the Grasshopper definition.
- ClimatePressureComponent.cs
This file defines a Grasshopper component named `ClimatePressureComponent` that generates structural load cases based on atmospheric pressure differences. It accepts four numeric inputs: winter pressure, summer pressure, production pressure, and load duration, automatically converting the pressure values to the system's current units. The core logic calculates the delta pressure between seasonal extremes and the production baseline, creating specific `ClimateLoadCase` objects for both summer and winter if non-zero deltas exist. Each resulting load is wrapped in a `GH_ObjectWrapper` and output as a list of generic data structures. This tool facilitates the automated creation of climate-induced pressure loads for engineering analysis within a parametric modeling environment.
- ClimateTemperatureComponent.cs
This file defines `ClimateTemperatureComponent`, a Grasshopper plugin component designed to generate structural load cases for temperature variations. It accepts three numeric inputs: winter and summer delta temperatures, and the load duration in seconds, automatically converting units where necessary. The component creates specific `ClimateLoadCase` objects for both summer and winter seasons if non-zero temperatures are provided, assigning them the specified duration. Key components include input parameter registration for temperature deltas and duration, unit conversion logic, and validation that limits the maximum duration to 50 years. Finally, it outputs a list of these generated loads as `GH_ObjectWrapper`s for use in downstream structural analysis workflows.
- EdgeRestraintByTypeComponent.cs
This file defines a Grasshopper component named `EdgeRestraintByTypeComponent` within the GlassHopper plugin, designed to automate structural restraint assignment. It takes a mesh representing a glass surface and a curve as inputs, then identifies mesh vertices that lie within a specified tolerance of that curve. For each matching vertex, it constructs a local coordinate system based on the curve’s derivative and the mesh normal, which is essential for defining directional constraints. The component assigns specific degrees of freedom (DOFs) to these nodes based on a selected support type, such as "Simple," "Fixed," or "DoublePendulum." Key components include input parameters for geometry and tolerance, logic to handle mesh normals, and a loop that generates individual `NodeRestrain` objects for each relevant node. Ultimately, it outputs a list of structured restraint data ready for further structural analysis or simulation workflows.
- EdgeRestraintComponent.cs
This file defines a Grasshopper component named `EdgeRestraintComponent` designed to generate structural restraints for glass surfaces. It takes a mesh and an edge curve as input, identifying mesh vertices that lie within a specified tolerance of the curve. For each identified vertex, it constructs a local coordinate system based on the curve tangent, surface normal, and their cross product. The component then creates node restraints with user-defined spring stiffness values or fixed constraints (-1) along the X, Y, and Z axes of this local system. Finally, it outputs a list of these restraints for use in downstream structural analysis workflows.
- GlassAnalysisComponentBase.cs
`GlassAnalysisComponentBase.cs` is an abstract base class for Grasshopper components that facilitates structural analysis of glass assemblies via the Maffeis cloud API. It manages the complete lifecycle of an asynchronous calculation, including input registration (mesh, loads, restraints), execution status tracking, and result retrieval from a remote server. Key components include state management enums (`IDLE`, `RUNNING`, `WAITING`, `READY`) to handle background processing and UI feedback during long-running jobs. The class also integrates with authentication services to fetch subscription limits, enforcing constraints on mesh nodes and load combinations before sending data to the backend. Ultimately, it serves as the foundational logic for various specific glass analysis tools within the GlassHopper plugin ecosystem.
- GlassAnalysisComponentV1_OBSOLETE.cs
This file defines an obsolete Grasshopper component named `GlassAnalysisComponentV1_OBSOLETE` within the `GlassHopper.Components` namespace. It inherits from a base class, `GlassAnalysisComponentBase`, and is explicitly marked as hidden in the Grasshopper interface via its `Exposure` property. The component implements empty overrides for output data and mesh setting methods, indicating it performs no active processing logic. Its primary function appears to be maintaining backward compatibility by preserving a specific unique GUID, ensuring older `.ghx` files can still load without breaking. This suggests the component has been superseded by a newer version but remains in the codebase to prevent errors in legacy projects.
- GlassAnalysisComponentV2.cs
This file defines `GlassAnalysisComponentV2`, a Grasshopper component that inherits from `GlassAnalysisComponentBase` to extend glass analysis functionality. Its primary role is to output the mesh utilized during the glass analysis process as a specific data branch. The implementation overrides `AddData3Output` and `SetData3Mesh` to register and populate this "Used Mesh" output using helper converters. It also establishes a unique identifier via `ComponentGuid` to ensure compatibility with existing Grasshopper definitions and sets its visibility priority in the interface through the `Exposure` property.
- GlassJobComponent.cs
This file defines the `GlassJobComponent`, a Grasshopper plugin component that manages the creation and synchronization of Glass jobs with the remote server at `apps.maffeis.it`. Its primary function is to generate unique job identifiers, verify if a job already exists for the current user's organization, and handle API interactions for job submission. Key components include asynchronous methods like `MakeGlassJob` for POST requests and `IsGlassJobAlreadyPresent` for GET checks, which ensure idempotency by preventing duplicate job creations. The class utilizes internal state variables such as `_jobReference` and `_jobReferences` to track GUIDs and organize data per organization folder. Error handling is integrated throughout to catch network exceptions and deserialize API error messages for runtime feedback in the Grasshopper interface.
- GlassReportComponent.cs
The `GlassReportComponent.cs` file defines a Grasshopper plugin component that retrieves and saves PDF analysis reports for glass models via an external API. It accepts a glass model reference and an optional output directory as inputs, then manages a multi-stage execution state to handle asynchronous network requests. The component first authenticates the user, sends a request to fetch the report, and waits for the response before writing the resulting PDF bytes to the specified file path. Key components include input/output parameter registration, a custom button attribute for manual triggering, and logic to handle both successful downloads and error states by updating runtime messages and output parameters accordingly.
- InterlayerCatalogueComponent.cs
This file defines a Grasshopper component named `InterlayerCatalogueComponent` that retrieves and manages interlayer material data from an external server. It asynchronously fetches material catalogs via an HTTP API, deserializes the JSON response using a custom converter, and updates the component’s input dropdown options dynamically. The component integrates with an authentication system by registering callbacks to refresh data upon successful login or logout. It accepts an integer index as input to select a specific material and outputs the corresponding `InterlayerMaterial` object. Key components include asynchronous network handling, dynamic parameter regeneration of input choices, and serialization logic for saving/loading the material list within Grasshopper definitions.
- LayerComponent.cs
This file defines a Grasshopper component named "Glass Layer" within the GlassHopper plugin, designed to create specific glass layer instances. It accepts two primary inputs: a material object (such as glass, air, or interlayer) and a numeric thickness value in Rhino units. The core logic converts the input thickness from model space units to millimeters before instantiating the appropriate Maffeis model class based on the provided material type. The component outputs a single list containing the newly created `GH_ObjectWrapper` for the generated layer. If an unsupported material type is provided, it triggers a runtime error message instead of producing output.
- LoadCombinationComponent.cs
This file defines a Grasshopper component named `LoadCombinationComponent` that aggregates various structural load inputs into a unified glass load combination object. It accepts specific numerical inputs for self-weight, wind pressures, snow, barrier forces, point loads, and seasonal climate variations like temperature and altitude changes. The component also allows users to define an optional name and select a usage type (Unused, Strength, or Deflection) via a dropdown menu. Its core function is to instantiate a `GlassCombination` object from the Maffeis model library, mapping each valid input to corresponding load case coefficients based on their magnitude. Finally, it outputs this constructed combination object for downstream structural analysis within the Rhino/Grasshopper environment.
- LoadCombinationCopyComponent.cs
This file defines a Grasshopper component named `LoadCombinationCopyComponent` within the GlassHopper framework, designed to export structural load combination data. Its primary function is to take a list of input `GlassCombination` objects and format their properties into a tab-separated string for clipboard copying. The component features a custom "Copy" button that triggers the formatting logic, which includes headers for names, usage, load cases, and shear modules. It dynamically adjusts pressure units based on whether the current system is Imperial or Metric before generating the table rows. Finally, it utilizes a dedicated STA thread to safely write the formatted text to the Windows clipboard, providing user feedback via runtime messages upon success or failure.
- LoadCombinationPasteComponent.cs
`LoadCombinationPasteComponent.cs` is a Grasshopper plugin component designed to import structural load combinations from the system clipboard. It functions by parsing tabular text data, matching it against provided input loads and glass stratigraphy to generate valid `GlassCombination` objects. Key components include input parameters for generic loads and glass stratigraphy, alongside an output list of processed combinations. The logic handles clipboard reading via a dedicated STA thread, parses headers and rows, and automatically renames duplicate entries to ensure uniqueness. Additionally, it manages unit conversions based on the current system settings (Imperial or Metric) before exporting the results.
- LoadCombinationShearComponent.cs
This file defines a Grasshopper component named `LoadCombinationShearComponent` that integrates with the GlassHopper framework for structural analysis of laminated glass. Its primary function is to calculate and apply shear rigidity modifiers to existing load combinations based on specific material properties and environmental conditions. The component accepts four key inputs: a list of load combinations, glass stratigraphy data, applied loads, and reference temperatures. Internally, it extracts interlayer materials from the stratigraphy and computes their shear modules using duration and temperature factors. Finally, it updates each combination’s shear override values and outputs the modified load combinations for further structural evaluation.
- LoadConcentratedComponent.cs
This file defines a Grasshopper component named "Point Load" within the GlassHopper plugin, designed to create concentrated structural loads on glass surfaces. It accepts inputs for a target surface, application point, load magnitude, duration, and a rectangular area defined by height and width. The core logic calculates the intersection between this rectangular area and the glass Brep to determine the precise load distribution geometry. Key components include validation for load case indices, unit conversions from Rhino units to millimeters, and geometric processing using the Maffeis model library. Finally, it outputs the generated load object and the resulting curve representing the loaded area for further structural analysis.
- LoadSelfWeightComponent.cs
This file defines a Grasshopper component named `LoadSelfWeightComponent` within the GlassHopper plugin, designed to generate structural load definitions for glass self-weight analysis. It accepts three primary inputs: a gravity direction vector, an optional acceleration value, and a load duration, which is automatically constrained to a maximum of 50 years. The component intelligently handles unit conversions, transforming imperial or metric acceleration inputs into millimeters per second squared based on the current system settings. Internally, it constructs a `Maffeis.Model.Loads.GravityLoad` object with specific case properties and returns this data as a generic output parameter. This allows users to programmatically define self-weight loads that integrate seamlessly with the Maffeis structural modeling framework.
- LoadSnowComponent.cs
This file defines a Grasshopper component named `LoadSnowComponent` that generates a snow load object for structural analysis within the GlassHopper plugin. It accepts three inputs: an orientation vector, a pressure value (in kPa or psf), and a duration in seconds, with automatic unit conversion to MPa based on the active system settings. The core logic constructs a `ProjectedLoad` instance assigned to a specific "Snow" load case, enforcing a maximum duration limit of 50 years to prevent invalid configurations. Key components include input registration for direction and magnitude, runtime validation for duration limits, and unit handling via helper classes. Finally, it outputs the resulting load object wrapped in a `GH_ObjectWrapper` for downstream use in the visual scripting environment.
- LoadWindComponent.cs
This file defines a Grasshopper component named `LoadWindComponent` that generates wind load definitions for structural analysis within the GlassHopper plugin ecosystem. It accepts four inputs: external and internal wind pressure values, a flag to distinguish between pressure and suction, and a load duration parameter. The component automatically converts input units from metric (kPa) or imperial (psf) systems into MegaPascals (MPa) using a helper utility. It creates specific `UniformNormalAreaLoad` objects assigned to either the top (external) or bottom (internal) faces of a structure based on the provided values. Additionally, it enforces a maximum duration limit of 50 years, issuing a warning if the user exceeds this threshold. Finally, the component outputs a list of these generated load cases as generic data for downstream processing.
- LogoutComponent.cs
The `LogoutComponent` is a Grasshopper plugin component designed to securely terminate user authentication sessions within the GlassHopper framework. It operates as a singleton, enforcing that only one active instance exists per document and across documents to prevent conflicting states. The core functionality triggers when its button is pressed, clearing local authentication tokens for Maffeis, Google, and secure storage while resetting related components like organizations and paths. This ensures a clean slate by expiring solutions on dependent components and updating the UI status to reflect the logout action. Additionally, it provides runtime warnings if multiple instances are detected in the same file to maintain system integrity.
- MaterialASTM1300GlassComponent.cs
This file defines a Grasshopper component named `MaterialASTM1300GlassComponent` that generates an ASTM 1300 glass material instance for structural analysis. It accepts eight input parameters, including physical properties like elastic modulus, density, and thermal expansion, as well as specific settings for prestress type and breakage probability. The component automatically handles unit conversions for stiffness, density, and thermal expansion to ensure consistency with the current system settings. Upon execution, it instantiates a `GlassMaterialAstm` object using these processed values and outputs the result as a generic data structure. This allows users within the GlassHopper plugin ecosystem to define standardized glass materials programmatically or via visual scripting.
- MaterialAirComponent.cs
`MaterialAirComponent.cs` is a Grasshopper plugin component designed to create and manage air material properties within the GlassHopper. It accepts user-defined inputs for the material name, density, and thermal expansion coefficient, automatically converting these values from UI units to internal system units via `UnitsComponent`. The core logic instantiates an `AirMaterial` object from the Maffeis library using these processed parameters. Finally, it outputs the created material instance as a generic data type wrapped in a `GH_ObjectWrapper` for downstream use in other components.
- MaterialEN16612GlassComponent.cs
This file defines a Grasshopper component named `MaterialEN16612GlassComponent` that creates a glass material object compliant with the EN 16612 standard. It accepts various input parameters, including mechanical properties like elastic modulus and Poisson's ratio, as well categorical selections for glass type, surface treatment, prestress, manufacturing process, and edge type. The component automatically handles unit conversions for physical values using a helper class before instantiating the core `GlassMaterialEn16612` object. Finally, it outputs the generated material instance as a generic list parameter for use in downstream simulations or analyses.
- MaterialInterlayerComponent.cs
`MaterialInterlayerComponent.cs` is a Grasshopper plugin component that creates an interlayer material object for structural analysis. It accepts five input parameters: Name, Elastic Modulus, Poisson’s ratio, Density, and Thermal Expansion Coefficient, with optional unit conversion applied to the numerical values. The core logic instantiates an `InterlayerMaterial` from the Maffeis library using these properties. The component outputs the resulting material instance as a generic data type wrapped in a `GH_ObjectWrapper`. Key components include standard Grasshopper lifecycle methods (`RegisterInputParams`, `SolveInstance`) and integration with the GlassHopper framework’s naming and categorization system.
- MeshColorMapComponent.cs
This C# file defines a Grasshopper component named `MeshColorMapComponent` that generates a colored copy of an input mesh based on vertex data. It accepts a mesh, a list of numerical values corresponding to each vertex, and a selected color map theme (such as Viridis or Inferno) as inputs. The component optionally allows users to override the minimum and maximum value thresholds for normalization; otherwise, it automatically calculates these bounds from the provided data. Internally, it maps each vertex's value to a specific color using linear interpolation through predefined RGB lookup tables embedded in the code. Finally, it applies these calculated colors to the mesh vertices and outputs the resulting colored mesh for visualization.
- MeshDisplacementComponent.cs
This file defines a Grasshopper component named `MeshDisplacementComponent` that creates a displaced copy of an input mesh. It accepts three key inputs: the source mesh, a list of displacement vectors (one per vertex), and a scale factor to adjust the magnitude of movement. The core logic iterates through each vertex, adding the scaled displacement vector to its original position to generate new coordinates. After updating all vertices, the component recalculates the mesh normals to ensure correct surface orientation. Finally, it outputs the modified mesh as the result. This tool is designed for geometric deformation tasks within Rhino's visual scripting environment.
- MeshSamplingComponent.cs
This file defines a Grasshopper, a custom component for the Rhino/Grasshopper visual programming environment that samples scalar values from a mesh based on spatial proximity. It accepts three inputs: a target mesh, a query point, and a list of numerical values associated with each vertex. The core logic locates the closest point on the mesh surface to the input coordinate and performs barycentric interpolation across the specific triangle or quad face containing that point. This process ensures smooth value transitions by weighting the results according to the interpolated position within the face geometry. Error handling is included to validate that the number of provided values matches the vertex count and to catch points located too far from the mesh. Ultimately, the component outputs a single interpolated value representing the sampled data at the specified location.
- MeshSubdivideComponent.cs
This file defines a Grasshopper component named "Mesh Subdivide" that converts input meshes containing mixed triangular and quadrangular faces into uniform quadrangular meshes. It inherits from `GH_Component` to integrate with the Rhino/Grasshopper visual scripting environment, exposing one input for a mesh and one output for the resulting quad mesh. The core logic resides in the `SolveInstance` method, where it utilizes helper classes from the `GlassHopper.Converter` namespace to transform the Rhino geometry into an internal representation. Specifically, it calls the `RefineToAllQuadrangles` method on the converted mesh object to perform the subdivision algorithm. Finally, the result is converted back to a standard Rhino Mesh and assigned as the component's output.
- OrganizationFoldersComponent.cs
The `OrganizationFoldersComponent` is a Grasshopper plugin component designed to retrieve and display a list of folders from a user's organization via an external API. It functions by asynchronously fetching folder data upon authentication, optionally filtering results by a specified root folder or selecting a specific folder using an index input. Key components include asynchronous HTTP requests handled through `HttpClientFactory`, JSON deserialization for processing server responses, and integration with an authentication callback system to ensure secure access. The component manages state through internal arrays of `OrganizationFolderReference` objects and exposes these as output parameters for downstream use in the Grasshopper definition.
- PathToOrganizationFolderComponent.cs
This file defines a Grasshopper component named `PathToOrganizationFolderComponent` that resolves a specific folder within an organization's workspace. It accepts a text path as input, splits it into segments, and iteratively queries an external API to locate the corresponding nested folder structure. The component handles asynchronous HTTP requests via `HttpClientFactory`, deserializing JSON responses into `OrganizationFolderReference` objects to map the input path to a valid folder ID. Key components include authentication checks against an `AuthComponentBase`, error handling for network or logic failures, and callback registration to refresh results upon authentication changes. Ultimately, it outputs a single organization folder reference parameter if the path is successfully resolved and authenticated.
- PointRestraintComponent.cs
`PointRestraintComponent.cs` is a Grasshopper plugin component designed to create structural restraints on specific mesh nodes within a glass surface model. It identifies vertices near a user-defined point and assigns local coordinate systems based on optional orientation vectors or default geometric logic. The component supports both flexible spring stiffness (in MPa or psi) and fixed constraints for X, Y, and Z axes, automatically handling unit conversions for imperial systems. Key components include input parameters for the mesh, reference point, spring values, and tolerance, which drive the generation of `NodeRestrain` objects. These outputs are packaged as a list of `GH_Restraint` instances, ready for downstream structural analysis workflows in the GlassHopper ecosystem.
- QuadMeshRhinoComponent.cs
This file defines a Grasshopper component named "Quad Mesh with Rhino" that generates quadrangular meshes from input B-rep surfaces. It accepts various inputs including the main surface, target face size, and optional parameters for holes, internal points, and edges to control mesh topology. The component integrates with an authentication system to enforce subscription-based limits on mesh area and hole counts via an external API. It includes robust validation logic to check unit conversions, parameter consistency, and compliance with defined usage constraints before processing. Upon passing checks, it performs geometric operations like drilling holes and refining the mesh structure. Finally, it outputs the resulting quad mesh and the original B-rep geometry.
- ReferenceTemperaturesComponent.cs
This file defines a Grasshopper component named `ReferenceTemperaturesComponent` that calculates reference temperatures for bonding stiffness. It accepts three numeric inputs for winter, summer, and no-season temperatures, defaulting to 0 if not provided. The component automatically converts these input values from the user interface units to the system's internal temperature units using helper methods. It then encapsulates the processed values into a `ReferenceTemperatures` object and outputs this data as a generic parameter. Key components include the input registration for seasonal temperatures, unit conversion logic, and the creation of the final output object. This tool is designed to streamline thermal load calculations within the GlassHopper plugin ecosystem.
- ResultCheckExtractorComponent.cs
`ResultCheckExtractorComponent.cs` is a Grasshopper plugin component designed to extract and summarize structural check results from glass analysis data. It accepts three primary inputs: the main analysis output, stratigraphy definitions for glass layers, and a list of load combinations. The core logic iterates through displacement (SLS) and stress (ULS) results, matching them with specific load combinations to generate detailed result records. For each category, it calculates and outputs a list of individual checks alongside the maximum working ratio encountered. This allows users to visualize or further process specific failure points and critical values within their parametric design workflow.
- ResultExtractorComponent.cs
This file defines a Grasshopper component named `ResultExtractorComponent` within the GlassHopper plugin, designed to extract specific structural analysis data from a glass simulation. It accepts an input object containing analysis results, along with parameters for mesh geometry, load combination index, glass layer, face side, and stress type. The core logic in `SolveInstance` retrieves mean stresses or displacements based on these indices, handling errors for invalid inputs or out-of-range combinations. Finally, it outputs two lists: node displacements as vectors and selected stress components (such as Von Mises or principal stresses) as numbers. This allows users to visualize or further process specific structural performance metrics directly within the Rhino/Grasshopper environment.
- SealRestraintComponent.cs
This file defines a Grasshopper component named "Structural Silicone Restraint" that generates structural restraints for finite element analysis. It processes an input mesh and curve to identify vertices along the curve, then calculates local coordinate systems based on surface normals and curve derivatives. The component computes spring stiffness values derived from user-defined seal width, thickness, and elastic modulus parameters. Finally, it outputs a list of `GH_Restraint objects that constrain specific degrees of freedom at each identified node, facilitating the simulation of silicone sealant behavior in glass structures.
- SpacerComponent.cs
This file defines the `SpacerComponent`, a Grasshopper plugin component designed to create spacers for Insulating Glass Units (IGUs). It serves as a specialized tool within the "GlassHopper" ecosystem, functioning under the "Restraints" category to model physical spacer properties. The component accepts two primary inputs: the spacer's width and its axial elastic modulus, automatically handling unit conversions from user-friendly formats to internal standards. During execution, it validates that these values are physically meaningful (positive width and non-negative modulus) before instantiating a `SpacerRestrain` object. Finally, it outputs this newly created spacer object wrapped in a generic data type for use in downstream structural analyses or visualizations.
- StandardASTM1300Component.cs
This file defines a Grasshopper component named `StandardASTM1300Component` within the `GlassHopper` plugin namespace. It serves as a specialized tool for generating an ASTM1300 standard object, likely used in glass or material analysis workflows. The component features no input parameters and produces a single generic output containing the created standard instance. Its core logic is implemented in the `SolveInstance` method, which instantiates the `StandardASTM1300` model and wraps it in a `GH_ObjectWrapper` for data transfer. Additionally, it includes essential metadata such as a unique GUID, custom icon, and placement in the primary panel of the "GlassHopper" category.
- StandardEN16612Component.cs
`StandardEN16612Component.cs` is a Grasshopper plugin component designed to generate an EN 16612 standard object within the GlassHopper framework. It currently accepts three specific inputs: two safety factor values (`γMA`, `γMv`) and a boolean flag for Consequence Class CC0, while ignoring additional climate delta parameters that remain commented out in the code logic. The core functionality resides in the `SolveInstance` method, which instantiates a `StandardEN16612` model object and assigns the provided input data to its properties. This created standard object is then wrapped in a `GH_ObjectWrapper` and output as a generic list item for downstream use in other components. The component is categorized under "GlassHopper" with primary exposure and includes a custom icon for UI identification.
- StratigraphyCodeComponent.cs
This C# script defines a Grasshopper component named `StratigraphyCodeComponent` that generates complex glass stratigraphy objects from a concise string code. It accepts inputs for the code string, specific material definitions (glass, interlayer, and gas/air), and an optional interlayer thickness. The core logic parses the input code by splitting it on slashes to distinguish between glass layers and gas cavities, handling both monolithic and laminated glass configurations based on dot-separated values. It validates all numeric inputs and material types, applying unit conversions if necessary, before constructing a list of individual layer objects. Finally, it aggregates these layers into a `GlassPlateProperty` object and outputs the resulting stratigraphy data structure.
- StratigraphyComponent.cs
`StratigraphyComponent.cs` is a Grasshopper plugin component designed to construct a valid glass stratigraphy object by validating the sequence of input layers. It accepts a list of generic layer wrappers as input and processes them to ensure they adhere to strict structural rules, such as alternating between glass, interlayers, and air chambers while preventing invalid start or end conditions. The code iterates through these inputs, checking type compatibility and position logic to maintain the correct sandwich structure, issuing runtime errors or warnings for any violations. If the validation passes, it aggregates the valid `GlassLayer` objects into a new `GlassPlateProperty` instance. Finally, the component outputs this constructed stratigraphy object back to the Grasshopper canvas for further use in downstream geometry generation.
- StratigraphyMeshComponent.cs
This C# script defines a Grasshopper component named `Stratigraphy Mesh that generates a solid mesh representation of glass stratigraphy from an input surface mesh. It accepts three primary inputs: a base mesh, a glass stratigraphy object containing layer data, and a positional reference integer to determine extrusion alignment (Back, Middle, or Front). The core logic iterates through each layer in the stratigraphy, calculating cumulative distances and offsetting the mesh by specific thicknesses while skipping air chambers. It utilizes helper utilities for unit conversion and geometry manipulation, such as welding vertices and rebuilding normals, to ensure mesh integrity. Finally, it combines all individual layer meshes into a single jointed output mesh, providing a tangible 3D model of the multi-layered glass assembly.
- StructuralSiliconesCatalougueComponent.cs
This file defines a Grasshopper component named `StructuralSiliconesCatalougueComponent` that retrieves structural silicone material data from a remote API. Its primary function is to fetch a list of silicone materials, parse them using custom JSON converters, and populate an input dropdown menu with the available options. Upon user selection, the component outputs the specific elastic modulus (E) of the chosen material as a numerical value. Key components include asynchronous HTTP fetching logic, dynamic parameter management for the material selector, and serialization methods (`Write`/`Read`) to preserve the downloaded material catalog within the Grasshopper definition.
- TestAssertComponent.cs
`TestAssertComponent.cs` is a Grasshopper plugin component designed for testing and validating data within parametric scripts. It accepts two lists of generic values to compare, along with parameters defining the comparison type (e.g., equals, greater than) and an epsilon tolerance for floating-point checks. The component processes these inputs to determine if the conditions are met, outputting a single boolean result indicating success or failure. Key features include visual feedback through icon overrides and runtime messages that highlight specific errors, such as mismatched list lengths or incompatible data types. This tool allows developers to debug and verify logic flows directly within the Grasshopper environment by providing immediate, granular test results.
- UnitsComponent.cs
`UnitsComponent.cs` is a Grasshopper plugin component designed to manage and synchronize unit systems (Metric or Imperial) within a Rhino document. It acts as a global state manager by detecting the active Rhino document's units system via user input and comparing it against the current Rhino file settings, issuing warnings if mismatches occur. The component enforces a singleton pattern by warning users if multiple instances exist in the same document to prevent conflicting configurations. Key features include static methods like `CurrentDocumentLength()` that map Rhino’s native unit systems to internal conversion enums, ensuring consistent data handling across the simulation. Additionally, it provides utility functions such as `ConvertFromUI()` to handle unit conversions for various physical quantities like length, force, and stress based on the selected system. This ensures that all downstream components receive correctly scaled numerical values regardless of the user's preferred measurement system.