F2R
Files
- BakeEtabsModelComponent.cs
This file defines `BakeEtabsModelComponent`, a Grasshopper plugin component designed to export and bake structural analysis data from ETABS models into Rhino geometry. It functions as a manual trigger, requiring the user to press a custom "Bake" button rather than running automatically during solution updates. Key components include input parameters for specifying the ETABS model path, controlling instance attachment, selecting the ETABS executable version, and choosing output presets that dictate which data (geometry, sections, loads) is exported. The core logic handles unit conversion between Rhino and ETABS systems, configures export options based on user selection, and utilizes an API wrapper to process and bake the geometries into the active Rhino document.
- BakeSap2000ModelComponent.cs
This file defines `BakeSap2000ModelComponent`, a Grasshopper plugin component designed to export and "bake" structural analysis models from CSI SAP2000 into Rhino geometry. It serves as a bridge between finite element modeling software and CAD environments, allowing users to transfer model data such as geometry, section properties, and loads. The component accepts inputs for the SAP2000 file path, executable location, instance attachment settings, and specific output preferences to control which data types are exported. Internally, it utilizes the `CSIApiWrapper` to interact with the SAP2000 API, handling unit conversions based on the active Rhino document settings. Upon execution, it processes the model data and generates corresponding Rhino objects, providing runtime feedback via error or warning messages if failures occur during the import or baking process.
- BakeSap2000ModelToGrasshopperComponent.cs
This file defines a Grasshopper component (`BakeSap2000ModelToGrasshopperComponent`) that exports structural analysis data from SAP2000 models into Rhino/Grasshopper geometry. It functions as an interface bridge, allowing users to specify a model path and choose output presets ranging from all data to specific subsets like geometry or section properties. The component handles unit conversion between Rhino and the FEM software, ensuring dimensional consistency during the transfer process. Key components include input parameters for model location and export options, along with output ports for joints, frames, and areas. It utilizes the `FemToRhino` library to parse the SAP2000 API and bake the resulting structural elements as native Rhino geometry objects.
- BakeStrausModelComponent.cs
This file defines a Grasshopper component named `BakeStrausModelComponent` that integrates with the Straus7 structural analysis software. It allows users to "bake" or import a Straus7 model into Rhino by specifying a file path and selecting output preferences via a custom button interface. The component handles unit conversion based on the active Rhino document settings and configures export options for geometry, sections, and loads. Key components include input parameters for the model path and type, logic to validate file existence, and calls to `Process()` and `BakeGeometryCustom()` to execute the import and visualization.
- BakeStrausR2ModelComponenty.cs
This file defines a Grasshopper component named `BakeStrausR2ModelComponenty` designed to export and bake structural models from Straus7 into Rhino. It acts as an interface between the finite element analysis software and Rhino, allowing users to specify a model path and choose output preferences such as geometry, sections, or loads. Key components include input parameters for the model file path and export type, along with logic that detects Rhino’s unit system to ensure consistent units (kN/mm) during import. The core functionality relies on connecting to the local Straus7 API service via `St7ApiWrapper` to process the model data. Finally, it utilizes a custom baking method (`BakeGeometryCustom`) to transfer the processed geometric and structural data directly into the active Rhino document.
- ETABSApplyEditedTableComponent.cs
This file defines a Grasshopper component named `ETABSApplyEditedTableComponent` that integrates with the ETABS structural analysis software. Its primary function is to apply pending edits from an "Editing Table" interface to an active or specified ETABS model instance. The component accepts optional inputs for the model file path and a flag to attach to an existing instance, ensuring flexibility in workflow integration. Key components include input parameter registration for path and attachment settings, and a custom button attribute that triggers the execution logic only when explicitly pressed. During execution, it retrieves the SAP object, calls `ApplyEditedTables` to commit changes, and outputs a detailed import log indicating success or specific error counts.
- ETABSChangeElementLabel.cs
This file defines a Grasshopper component named `ETABSChangeElementLabel` that allows users to rename structural elements within an ETABS model. It facilitates batch renaming by mapping lists of old IDs to new IDs for specific element types, such as points, frames, areas, tendons, and links. The component features inputs for the model path, an option to attach to an existing ETABS instance, and validation logic to ensure input lists match in length and validity. Execution is triggered via a custom "Rename" button, which invokes the ETABS API to update names and saves or refreshes the view accordingly.
- ETABSGetEditingTableComponent.cs
This file defines a Grasshopper component named `ETABSGetEditingTableComponent` that extracts data from an editing table within an ETABS structural analysis model. It allows users to either open a specific SAP/ETABS file or attach to an existing running instance, then retrieves the specified table's contents and metadata. Key components include input parameters for the model path, attachment mode, and target table name, alongside outputs for field definitions (keys, names, units) and the actual tabular data organized as a data tree. The component utilizes the `F2RModelHelper` to manage the ETABS COM interface connection and handles errors by displaying runtime warnings if the model path is invalid or table retrieval fails.
- ETABSGetEditingTableNameComponent.cs
This file defines a Grasshopper component named `ETABSGetEditingTableNameComponent` within the FeMM framework, designed to interact with ETABS structural analysis software. Its primary function is to retrieve metadata about available database tables from an active or specified ETABS model when the user triggers the "Read" button. The component accepts optional inputs for the SAP2000/ETABS model path and an option to attach to an existing instance, handling invalid paths by defaulting to an empty file state. Key components include input parameters for model connection settings and output lists for table keys, names, and import type integers (ranging from 0 to 3). It utilizes the `F2RModelHelper` to establish the connection and calls the ETABS API method `GetAvailableTables` to fetch the required data structures. Finally, it exposes these results as three distinct output streams: table identifiers, human-readable names, and their respective importability statuses.
- ETABSSelectElementsComponent.cs
This file defines a Grasshopper component named `ETABSSelectElementsComponent` that facilitates bidirectional interaction between Rhino geometry and the ETABS structural analysis software. Its primary function is to allow users to select specific Rhino elements (points, curves, or surfaces) and programmatically assign them to corresponding objects within an active ETABS model. The component relies on input parameters for a list of geometric elements and a boolean flag to either replace or add to the current ETABS selection state. Key components include a custom UI button that triggers the execution logic and helper methods that map Rhino object types to their respective ETABS object classes (PointObj, FrameObj, AreaObj). Upon execution, it creates a temporary group in ETABS, assigns the selected items based on stored F2R_ID attributes, and refreshes the view before cleaning up the temporary data.
- ETABSSelectElementsListComponent.cs
This file defines a Grasshopper component named `ETABSSelectElementsListComponent` that facilitates interactive element selection within the ETABS structural analysis software. It accepts optional lists of Point, Frame, and Area IDs as inputs, along with a boolean flag to determine whether to append or replace the current selection. Upon pressing the custom "Select" button, the component connects to the active ETABS model via the Sap2000 API. It temporarily assigns the specified elements to a dynamic group, selects that group in the ETABS interface, and then immediately deletes the temporary group to clean up. This mechanism allows users to visually highlight specific structural components in ETABS based on data passed from the Grasshopper definition.
- ETABSSetEditingTableComponent.cs
This file defines a Grasshopper component (`ETABSSetEditingTableComponent`) designed to interact with the ETABS structural analysis software. It allows users to update specific tables within an ETABS model by providing a model path, table name, field keys, and data values via input parameters. The component utilizes the `F2RModelHelper` to establish a connection to the SAP/ETABS API instance, handling both new file openings and attachment to existing instances. Its core functionality is executed when a custom "Set" button is pressed, triggering the `SolveInstance` method to call the underlying API's `SetTableForEditingArray` function. Key components include input registration for model configuration and data trees, runtime error handling for invalid paths or failed API calls, and a boolean flag to manage execution state. Ultimately, it serves as a bridge for programmatically modifying ETABS table data directly from a Rhino/Grasshopper environment.
- ETABSSetGroupComponent.cs
This file defines a Grasshopper component (`ETABSSetGroupComponent`) that integrates Rhino geometry with the ETABS structural analysis software via the F2R plugin. It allows users to assign selected Rhino objects (points, curves, or surfaces) to specific named groups within an ETABS model. The component accepts inputs for the model path, group name, and visibility settings, handling the logic to map Rhino object IDs to ETABS element types using user-defined metadata. Upon execution, it iterates through selected elements, determines their type, and calls the appropriate ETABS API method (`PointObj`, `FrameObj`, or `AreaObj`) to perform the group assignment. Finally, it saves the changes and optionally closes the ETABS instance if configured not to keep it visible.
- F2RModelHelper.cs
This file is a C# utility class library designed to bridge Rhino/Grasshopper with CSI structural analysis software (SAP2000 and ETABS). It provides helper methods for managing Rhino document layers, specifically using recursive algorithms to collect objects from layer hierarchies into hash sets. Additionally, it includes specialized functions to initialize connections with SAP2000 and ETABS COM APIs, handling model attachment and unit configurations. The class also features overloaded methods to retrieve detailed field metadata from database tables within these structural models. Finally, it defines a `CSIEditingTable` data structure to store and organize the retrieved table schema information for further processing.
- InteractiveAddAreaComponent.cs
`InteractiveAddAreaComponent.cs` is a Grasshopper plugin component designed to integrate new geometric areas into an existing F2R (Floor-to-Roof) structural model within Rhino. It accepts inputs for joint and area layers, along with new brep geometries from either Grasshopper or Rhino objects, allowing users to manually trigger the addition process via a custom "Add" button. The core logic iterates through the input geometry’s vertices, checking for existing joints within a specified tolerance; if a joint is missing, it automatically creates a new point in the designated layer. Each processed area is then annotated with unique IDs, property tags, and references to its associated joints using object attributes. This facilitates the interactive expansion of digital twin models by ensuring spatial consistency between new elements and the existing structural framework.
- InteractiveAddFrameComponent.cs
This file defines `InteractiveAddFrameComponent`, a Grasshopper plugin component designed to add structural frames to an interactive model within Rhino. It operates by linking new geometric inputs (lines or curves) to existing joint points based on spatial proximity and tolerance, automatically creating corresponding frame objects in specified layers. Key components include input parameters for joint/frame layers, prefixes, sections, and optional new geometries, alongside helper methods from `F2RModelHelper` that manage layer hierarchies and point dictionaries. The component uses a manual "Add" button trigger to execute the logic, ensuring precise control over when data is processed. It validates input types, checks for existing joints, and assigns unique IDs and attributes to newly created Rhino objects.
- InteractiveAddJointComponent.cs
This file defines `InteractiveAddJointComponent`, a Grasshopper plugin component designed to manually add joint points to an interactive F2R (Finite Element Model) structure. It operates on a button-press basis rather than automatic evaluation, allowing users to selectively inject new joints defined by either Grasshopper points or existing Rhino geometry into a specified layer. The component validates input against a tolerance threshold to prevent duplicate entries and assigns unique IDs using a configurable prefix. Key components include input parameters for the target joint layer, new point geometries, ID prefixes, and spatial tolerance, alongside helper methods from the `FemToRhino` namespace that manage dictionary lookups and attribute modifications. Ultimately, it synchronizes visual Rhino objects with the underlying F2R data model by updating layer assignments and user strings upon execution.
- InteractiveEtabs2RhinoComponent.cs
This file defines a Grasshopper component named `InteractiveEtabs2RhinoComponent` that facilitates the transfer of structural models from ETABS to Rhino. It functions as an interactive trigger, utilizing a custom button attribute to initiate processing without requiring standard data inputs or outputs. The core logic resides in the `SolveInstance` method, which instantiates an `GH_ETABSInteractiveDatabaseModel` to process and bake geometry into the active Rhino document upon button press. Key components include error handling for model processing and baking, logging mechanisms for warnings, and specific platform support attributes for Windows environments.
- InteractiveGrasshopper2SapComponent.cs
This file defines a Grasshopper component (`InteractiveGrasshopper2SapComponent`) that facilitates bidirectional data exchange between Rhino/Grasshopper and the SAP2000 structural analysis software. It functions as an interactive bridge, allowing users to update SAP models in real-time by pushing geometric elements like joints, frames, and areas from the parametric environment into the FEA tool. Key components include input parameters for model paths, geometry lists, and attribute mappings, alongside logic that constructs specific SAP database tables (e.g., Joint Coordinates, Frame Connectivity) for bulk updates. The component utilizes helper classes to manage SAP API interactions, ensuring data integrity through validation checks before committing changes to the active SAP instance.
- InteractiveRhino2EtabsComponent.cs
This file defines a Grasshopper component named `InteractiveRhino2EtabsComponent` that facilitates bidirectional data exchange between Rhino geometry and the ETABS structural analysis software. Its primary function is to update an existing ETABS model instance by reading specific geometric objects from designated Rhino layers, such as joints, beams, columns, and walls. The key components include input parameters for specifying model paths, ETABS executable locations, and layer names corresponding to different structural elements, along with options to attach to running instances or update group definitions. Internally, it utilizes helper classes like `F2RModelHelper` to map Rhino geometry to ETABS database tables via the COM API, handling coordinate data and object connectivity. Finally, it provides output logs to report status or errors during the synchronization process, ensuring users can track the success of the model updates.
- InteractiveRhino2SapComponent.cs
This file defines a Grasshopper component (`InteractiveRhino2SapComponent`) that synchronizes Rhino geometry with an open SAP2000 structural analysis model. It functions by reading specific Rhino layers for joints, frames, and areas to update the corresponding data tables within the SAP2000 API interface. Key components include input parameters for model paths, layer specifications, and update flags, alongside helper methods that map Rhino objects to SAP2000 entities using unique GUIDs. The core logic iterates through these objects to set joint coordinates, frame connectivity, and section assignments via the `DatabaseTables` API. This enables real-time, bidirectional-like updates of the structural model directly from the Rhino environment.
- InteractiveSap2GrasshopperComponent.cs
This file defines a Grasshopper component, `InteractiveSap2GrasshopperComponent`, designed to bridge SAP2000 structural analysis models with Rhino/Grasshopper environments. Its primary function is to extract and visualize active SAP2000 model data—including joints, frames, and areas—into the Rhino document upon user interaction via a dedicated button. The component accepts an optional group filter as input to selectively process specific elements from the connected SAP database. Key components include custom attributes for triggering the data export and a core logic method that iterates through model entities to generate corresponding Rhino geometry. Each exported geometric object is enriched with metadata (IDs, groups, material properties) stored in its user dictionary for downstream reference. This facilitates interactive structural modeling workflows by allowing real-time synchronization between the analysis software and the visual design environment.
- InteractiveSap2RhinoComponent.cs
This file defines a Grasshopper component named `InteractiveSap2RhinoComponent` that bridges SAP2000 structural models with Rhino geometry. It functions as an interactive tool, allowing users to select elements from a specific SAP2000 group and generate corresponding 3D geometry within the active Rhino document. The key component is its single text input for specifying the target group name, defaulting to "ALL," which filters the data source. Upon button press, it initializes an interactive database model, processes the selection, and bakes the resulting geometry into Rhino while logging any warnings or errors.
- InteractiveUpdateAreaComponent.cs
This file defines a Grasshopper component named `InteractiveUpdateAreaComponent` designed to update F2R (Finite Element Model to Rhino) joint data on Brep objects. It accepts inputs for a target layer, areas to update, a joint prefix, and a geometric tolerance, executing logic only when its custom "Update" button is pressed. The core functionality involves extracting curve edges from selected Brep objects and matching their start points against existing point geometry in the Rhino document. For each matched or new point, it generates unique joint IDs and stores them as user strings on the corresponding Rhino object attributes. This process effectively synchronizes geometric intersections with specific F2R metadata, allowing for interactive model updates without automatic re-evaluation.
- InteractiveUpdateFrameComponent.cs
This file defines a Grasshopper component named `InteractiveUpdateFrameComponent` designed to update frame joints within a Rhino document. It takes input parameters for joint layers, frames, prefixes, and tolerance, then executes logic only when its custom "Update" button is pressed. The component identifies existing points or creates new ones to represent structural joints at the start and end of each input curve. It assigns unique F2R IDs to these joints and stores them as user strings on the corresponding Rhino curve objects. This facilitates the synchronization of geometric data with structural analysis models by linking frame endpoints to specific joint identifiers.
- SAPApplyEditedTableComponent.cs
This file defines a Grasshopper component named `SAPApplyEditedTableComponent` that interfaces with the SAP2000 structural analysis software. Its primary function is to apply user-edited database tables to an active or new SAP2000 model instance, effectively syncing changes from the Grasshopper definition back into the simulation engine. Key components include input parameters for specifying the model path and attaching to an existing instance, alongside a custom "Apply" button that triggers the execution logic via a boolean flag. The core operation utilizes the `F2RModelHelper` to retrieve the SAP model object and calls `ApplyEditedTables` to commit data changes. Finally, it outputs a detailed import log string indicating success or failure, while handling error cases such as invalid file paths or API call failures.
- SAPChangeElementLabel.cs
This file defines a Grasshopper component named `SAPChangeElementLabel` that allows users to rename structural elements within a SAP2000 model. It functions by accepting inputs for the model path, element type (such as Point, Frame, or Area), and corresponding lists of old and new element IDs. The core logic utilizes the F2RModelHelper to interact with the SAP2000 COM API, iterating through the input lists to execute specific `ChangeName` methods based on the selected element type. Error handling is implemented to validate input consistency and file existence, providing user feedback via runtime messages if operations fail. Finally, it saves the modified model or refreshes the view depending on whether the connection is attached to an existing instance.
- SAPGetDisplayTableComponent.cs
This file defines a Grasshopper component (`SAPGetDisplayTableComponent`) that retrieves data from SAP2000 display tables for structural analysis models. It allows users to specify a model path or attach to an existing instance, along with the target table name and group selection, to extract structured data. The component uses a manual "Read" button trigger to prevent unnecessary recomputation during design exploration. Key outputs include metadata about the table fields (keys, names, units) and the actual tabular data organized in a tree structure. It integrates with the `F2RModelHelper` to manage SAP2000 API connections and handles errors gracefully by warning invalid paths or failing table reads.
- SAPGetEditingTableComponent.cs
This file defines a Grasshopper component named `SAPGetEditingTableComponent` that retrieves data from SAP2000 structural analysis models. It allows users to specify a model path or attach to an existing instance, then fetches the contents of a specified editing table and group. The component utilizes the SAP2000 API (`cSapModel`) to extract both the raw table data and metadata such as field keys, names, units, and importability status. Execution is triggered manually via a custom "Read" button, which updates the solution state upon activation. Outputs include lists for field metadata and a data tree containing the structured table records. Error handling ensures robust operation by validating file paths and reporting failures in table retrieval.
- SAPGetEditingTableNameComponent.cs
This file defines a Grasshopper component named `SAPGetEditingTableNameComponent` designed to interact with the SAP2000 structural analysis software. Its primary function is to retrieve metadata about available database tables from an active or specified SAP2000 model, triggered by a custom "Read" button rather than automatic execution. The component accepts optional inputs for the model file path and an instance attachment flag, validating the path before proceeding. It utilizes the `F2RModelHelper` to establish a connection with the SAP2000 API (`cSapModel`) and calls `GetAvailableTables` to fetch critical table information. Finally, it outputs three lists corresponding to table keys, human-readable names, and import type indicators, which dictate how each table can be imported into the simulation environment.
- SAPJoinBeamsComponent.cs
This file defines a Grasshopper component named `SAPJoinBeamsComponent` that automates the joining of structural beam elements within an SAP2000 model. It accepts Rhino geometry curves and optional new names, mapping them to existing SAP2000 frame objects via unique identifiers stored in Rhino object attributes. The core logic iterates through connected nodes to identify adjacent beams sharing endpoints, calculating their geometric alignment to determine valid merge candidates. When executed, it utilizes the SAP2000 API to programmatically join these selected beams into continuous members, updating the structural model accordingly. Key components include input validation for model paths, dictionary-based tracking of node-beam associations, and iterative pairwise merging logic based on spatial direction vectors.
- SAPSelectElementsComponent.cs
`SAPSelectElementsComponent.cs` is a Grasshopper plugin component designed to synchronize Rhino geometry with SAP2000 structural models. It allows users to select specific Rhino elements (points, curves, or surfaces) and assign them to a temporary group within the active SAP2000 session for selection purposes. The component accepts a list of geometric inputs and a boolean flag to either replace or append to the current SAP2000 selection state. Its core logic iterates through the input elements, retrieves their unique identifiers from Rhino attributes, and maps them to corresponding SAP2000 object types using helper methods. After assigning the objects to a temporary group, it refreshes the SAP2000 view and immediately deletes the temporary group to clean up the model.
- SAPSelectElementsListComponent.cs
This file defines a Grasshopper component named `SAPSelectElementsListComponent` that facilitates interaction between Rhino and SAP2000. Its primary function is to allow users to select specific structural elements (points, frames, and areas) by ID from an input list within the SAP2000 software interface. The component utilizes a custom "Select" button to trigger execution, ensuring the operation occurs only when explicitly requested rather than during every solution update. Key components include input parameters for element IDs and a boolean flag to control whether selections are added to or replace existing ones. Internally, it interacts with the SAP2000 API to temporarily group selected objects, highlight them in the view, and then immediately clear those temporary groups to finalize the selection state.
- SAPSetEditingTableComponent.cs
This file defines a Grasshopper component named `SAPSetEditingTableComponent` that integrates with the SAP2000 structural analysis software. Its primary function is to write data from a Grasshopper data tree into a specific editing table within an active or newly opened SAP2000 model instance. The component accepts inputs for the model path, connection mode, target table name, field keys, and the actual data structure. It utilizes the `F2RModelHelper` to manage the SAP2000 application instance and calls the API method `SetTableForEditingArray` to transfer the flattened string data into the specified table fields. Execution is triggered manually via a custom "Write" button rather than automatically during solution updates, allowing users to control when the database update occurs.
- SAPSetGroupComponent.cs
`SAPSetGroupComponent.cs` is a Grasshopper plugin component designed to assign structural elements to specific groups within a SAP2000 model. It functions by taking Rhino geometry inputs and mapping them to corresponding points, frames, or areas in the SAP2000 API based on user-defined identifiers. The component allows users to specify a model path, choose whether to attach to an existing instance, and define a target group name for assignment. Key components include input parameters for model connectivity, element selection, and visibility control, alongside logic that iterates through Rhino objects to execute `SetGroupAssign` calls via the SAP2000 COM interface. It handles error checking for invalid paths and missing GUIDs, ensuring robust interaction between Rhino geometry and the structural analysis software.
- SAPSplitBeamComponent.cs
`SAPSplitBeamComponent.cs` is a Grasshopper plugin component designed to split SAP2000 frame elements using geometric references from Rhino. It accepts inputs for the SAP model path, target beam curves, and splitter geometry (points, curves, or surfaces) to define intersection locations. The core logic maps Rhino objects to SAP2000 IDs via custom user strings, assigns splitters to a temporary group, and invokes the `DivideAtIntersections` API method. Finally, it renames the resulting divided beams with sequential suffixes to maintain model organization.
- SAPSplitBeamListComponent.cs
This file defines a Grasshopper component named `SAPSplitBeamListComponent` that automates the splitting of beam elements within a SAP2000 structural model. It accepts inputs for the SAP model path, selection criteria for beams to be split, and specific point, frame, or area objects that serve as intersection splitters. The core logic utilizes the SAP2000 OAPI to select target beams based on intersections with the provided splitter objects and executes the `DivideAtIntersections` command to fragment them. To manage this process, it dynamically creates a temporary group for splitters, performs the division, renames the resulting new segments, and cleans up the temporary group. The component supports both attaching to an existing running SAP instance or opening a specified file, handling errors gracefully by displaying runtime messages in the Grasshopper interface.