Back

AttachBodyButtonSetting

The `AttachBodyButtonSetting` component is part of the SOFA GUI module and inherits from `MouseButtonSetting`. It manages the configuration for attaching bodies through user interaction with mouse buttons. This component specifies settings such as stiffness (`d_stiffness`) for the spring used to attach particles, size (`d_arrowSize`) for drawing a visual representation of the spring (an arrow), and show factor size (`d_showFactorSize`) for displaying joint springs when interacting with rigid bodies. The `getOperationType` method returns the type of operation, which is "Attach" in this case. This component interacts with other GUI components to enable attaching bodies during simulations by configuring how these attachments are represented visually and their mechanical properties.

abstract
The `AttachBodyButtonSetting` manages user interaction settings for attaching particles or bodies through mouse operations, configuring stiffness, visual representation size, and display factors.
sheet
# AttachBodyButtonSetting ## Overview The `AttachBodyButtonSetting` component is part of the SOFA GUI module and inherits from `MouseButtonSetting`. It manages configuration settings for attaching particles or bodies through user interaction with mouse buttons. This component does not directly influence core simulation equations but configures how interactions are configured and displayed. ## Parameters and Data The significant data fields exposed by this component include: - **Stiffness (`d_stiffness`)**: Controls the stiffness of the spring used to attach particles, representing a linear elastic force law given by Hooke's Law \( f = k \times x \), where \( k \) is the spring constant and \( x \) is the displacement from equilibrium. - **Arrow Size (`d_arrowSize`)**: Controls the size of a visual arrow that represents the attachment spring. If this value is greater than 0, an arrow will be drawn to visually confirm the presence and extent of the attachment force. - **Show Factor Size (`d_showFactorSize`)**: Adjusts the display factor for joint springs when interacting with rigid bodies, controlling how prominently these attachments are shown during user interactions involving rigid body mechanics. ## Practical Notes This component is primarily used to configure settings for higher-level GUI components that manage particle and body attachment operations. It does not directly influence core numerical methods or discretization choices within the global FEM pipeline but provides parameters that can be used to configure these attachments.
description
The `AttachBodyButtonSetting` component is part of the SOFA GUI module and inherits from `MouseButtonSetting`. It manages the configuration for attaching bodies through user interaction with mouse buttons. This component specifies settings such as stiffness (`d_stiffness`) for the spring used to attach particles, size (`d_arrowSize`) for drawing a visual representation of the spring (an arrow), and show factor size (`d_showFactorSize`) for displaying joint springs when interacting with rigid bodies. The `getOperationType` method returns the type of operation, which is "Attach" in this case. This component interacts with other GUI components to enable attaching bodies during simulations by configuring how these attachments are represented visually and their mechanical properties.
maths
The `AttachBodyButtonSetting` component is part of the SOFA GUI module and primarily serves to configure settings for attaching particles or bodies through user interaction with mouse buttons. It does not directly contribute to the governing equations or operators used in the core FEM (Finite Element Method) simulation pipeline, such as mass matrix \( M \), stiffness matrix \( K \), internal force \( f_{int} \), residual \( R \), etc. Instead, it focuses on the mechanical and visual properties of attachments created through user interaction. ### Mathematical and Physical Description: 1. **Mechanical Properties:* - *Spring Stiffness*: The stiffness of the spring used to attach particles is denoted by `d_stiffness`. This parameter controls how strongly the particle attachment behaves, effectively representing a linear elastic force law given by Hooke's Law \( f = k imes x \), where \( k \) is the spring constant (`d_stiffness`) and \( x \) is the displacement from equilibrium. 2. **Visual Representation:* - *Arrow Size*: The `d_arrowSize` parameter controls the size of a visual arrow that represents the attachment spring. If this value is greater than 0, an arrow will be drawn, allowing users to visually confirm the presence and extent of the attachment force. - *Show Factor Size*: The `d_showFactorSize` parameter adjusts the display factor for joint springs when interacting with rigid bodies. This controls how prominently these attachments are shown during user interactions involving rigid body mechanics. ### Role in FEM Pipeline: - **Configuration Setting**: The component configures the settings used by higher-level GUI components to manage particle and body attachment operations. It does not directly influence the core numerical methods or discretization choices within the global FEM pipeline but rather provides parameters that can be used to configure these attachments. ### Numerical Methods and Discretization Choices: - The component does not implement any numerical methods or discretization schemes itself. Instead, it configures settings for user interactions that may subsequently affect how forces are applied in the simulation. For instance, the stiffness setting (`d_stiffness`) can influence the behavior of spring-like constraints. ### Variational / Lagrangian Mechanics Framework: - The component fits into a broader variational or Lagrangian mechanics framework by configuring parameters for user-interaction-based attachments that can be used to constrain particle positions in a way consistent with linear elastic forces. This aligns with the principles of constraint enforcement and force application within FEM simulations. ### Summary: - `AttachBodyButtonSetting` is a configuration component focused on user interaction settings, particularly stiffness, visual representation, and display factors for attachments created through mouse operations. It does not contribute directly to core simulation equations but influences how interactions are configured and displayed.
{
  "name": "AttachBodyButtonSetting",
  "main": {
    "name": "AttachBodyButtonSetting",
    "namespace": "sofa::gui::component",
    "module": "Sofa.GUI.Component",
    "include": "sofa/gui/component/AttachBodyButtonSetting.h",
    "doc": "Attach Body Button configuration.",
    "inherits": [
      "MouseButtonSetting"
    ],
    "templates": [],
    "data_fields": [
      {
        "name": "d_stiffness",
        "type": "SReal",
        "xmlname": "stiffness",
        "help": "Stiffness of the spring to attach a particule"
      },
      {
        "name": "d_arrowSize",
        "type": "SReal",
        "xmlname": "arrowSize",
        "help": "Size of the drawn spring: if >0 an arrow will be drawn"
      },
      {
        "name": "d_showFactorSize",
        "type": "SReal",
        "xmlname": "showFactorSize",
        "help": "Show factor size of the JointSpringForcefield  when interacting with rigids"
      }
    ],
    "links": [],
    "methods": [
      {
        "name": "getOperationType",
        "return_type": "int",
        "params": [],
        "is_virtual": false,
        "is_pure_virtual": false,
        "is_static": false,
        "access": "public"
      }
    ]
  },
  "desc": {
    "description": "The `AttachBodyButtonSetting` component is part of the SOFA GUI module and inherits from `MouseButtonSetting`. It manages the configuration for attaching bodies through user interaction with mouse buttons. This component specifies settings such as stiffness (`d_stiffness`) for the spring used to attach particles, size (`d_arrowSize`) for drawing a visual representation of the spring (an arrow), and show factor size (`d_showFactorSize`) for displaying joint springs when interacting with rigid bodies.\n\nThe `getOperationType` method returns the type of operation, which is \"Attach\" in this case. This component interacts with other GUI components to enable attaching bodies during simulations by configuring how these attachments are represented visually and their mechanical properties."
  },
  "maths": {
    "maths": "The `AttachBodyButtonSetting` component is part of the SOFA GUI module and primarily serves to configure settings for attaching particles or bodies through user interaction with mouse buttons. It does not directly contribute to the governing equations or operators used in the core FEM (Finite Element Method) simulation pipeline, such as mass matrix \\( M \\), stiffness matrix \\( K \\), internal force \\( f_{int} \\), residual \\( R \\), etc. Instead, it focuses on the mechanical and visual properties of attachments created through user interaction.\n\n### Mathematical and Physical Description:\n\n1. **Mechanical Properties:*\n   - *Spring Stiffness*: The stiffness of the spring used to attach particles is denoted by `d_stiffness`. This parameter controls how strongly the particle attachment behaves, effectively representing a linear elastic force law given by Hooke's Law \\( f = k \times x \\), where \\( k \\) is the spring constant (`d_stiffness`) and \\( x \\) is the displacement from equilibrium.\n\n2. **Visual Representation:*\n   - *Arrow Size*: The `d_arrowSize` parameter controls the size of a visual arrow that represents the attachment spring. If this value is greater than 0, an arrow will be drawn, allowing users to visually confirm the presence and extent of the attachment force.\n   - *Show Factor Size*: The `d_showFactorSize` parameter adjusts the display factor for joint springs when interacting with rigid bodies. This controls how prominently these attachments are shown during user interactions involving rigid body mechanics.\n\n### Role in FEM Pipeline:\n- **Configuration Setting**: The component configures the settings used by higher-level GUI components to manage particle and body attachment operations. It does not directly influence the core numerical methods or discretization choices within the global FEM pipeline but rather provides parameters that can be used to configure these attachments.\n\n### Numerical Methods and Discretization Choices:\n- The component does not implement any numerical methods or discretization schemes itself. Instead, it configures settings for user interactions that may subsequently affect how forces are applied in the simulation. For instance, the stiffness setting (`d_stiffness`) can influence the behavior of spring-like constraints.\n\n### Variational / Lagrangian Mechanics Framework:\n- The component fits into a broader variational or Lagrangian mechanics framework by configuring parameters for user-interaction-based attachments that can be used to constrain particle positions in a way consistent with linear elastic forces. This aligns with the principles of constraint enforcement and force application within FEM simulations.\n\n### Summary:\n- `AttachBodyButtonSetting` is a configuration component focused on user interaction settings, particularly stiffness, visual representation, and display factors for attachments created through mouse operations. It does not contribute directly to core simulation equations but influences how interactions are configured and displayed."
  },
  "summary": {
    "abstract": "The `AttachBodyButtonSetting` manages user interaction settings for attaching particles or bodies through mouse operations, configuring stiffness, visual representation size, and display factors.",
    "sheet": "\n# AttachBodyButtonSetting\n\n## Overview\n\nThe `AttachBodyButtonSetting` component is part of the SOFA GUI module and inherits from `MouseButtonSetting`. It manages configuration settings for attaching particles or bodies through user interaction with mouse buttons. This component does not directly influence core simulation equations but configures how interactions are configured and displayed.\n\n## Parameters and Data\n\nThe significant data fields exposed by this component include:\n\n- **Stiffness (`d_stiffness`)**: Controls the stiffness of the spring used to attach particles, representing a linear elastic force law given by Hooke's Law \\( f = k \\times x \\), where \\( k \\) is the spring constant and \\( x \\) is the displacement from equilibrium.\n- **Arrow Size (`d_arrowSize`)**: Controls the size of a visual arrow that represents the attachment spring. If this value is greater than 0, an arrow will be drawn to visually confirm the presence and extent of the attachment force.\n- **Show Factor Size (`d_showFactorSize`)**: Adjusts the display factor for joint springs when interacting with rigid bodies, controlling how prominently these attachments are shown during user interactions involving rigid body mechanics.\n\n## Practical Notes\n\nThis component is primarily used to configure settings for higher-level GUI components that manage particle and body attachment operations. It does not directly influence core numerical methods or discretization choices within the global FEM pipeline but provides parameters that can be used to configure these attachments."
  }
}