SOLUTION#
- class sstatics.core.solution.solver.Solver(system, debug=False)#
Bases:
LoggerMixinExecutes first-order static analysis for the provided system.
The analysis is based on the deformation method, assuming linear-elastic material behavior and small displacements. Suitable for systems where second-order effects can be neglected. The implementation of the solver is based on the literature [1], [2], [3], [4], [5], [6] and [7]
- Parameters:
- system
System The structural system to be analyzed using first-order theory.
- system
References
[1]R. Dallmann. “Baustatik 3: Theorie II. Ordnung und computerorientierte Methoden der Stabtragwerke”. 2. Auflage, 2015.
[2]H. Werkle. “Finite Elemente in der Baustatik: Statik und Dynamik der Stab- und Flächentragwerke”. 3. Auflage, 2008.
[3]W. Graf, T. Vassilev. “Einführung in computerorientierte Methoden der Baustatik”. 2006.
[4]H. Ahlert. “Finite Elemente in der Stabstatik - Grundlagen der Finite-Elemente-Methode - Baupraktische Zahlenbeispiele”. 1992.
[5]W. Graf, T. Vassilev. “Einführung in computerorientierte Methoden der Baustatik”. 2006.
[6]J. Dankert, H. Dankert (Hrsg.). “MATHEMATIK FÜR DIE TECHNISCHE MECHANIK”. http://www.tm-mathe.de/ , accessed on: 09.12.2025
[7]J. Dankert, H. Dankert. “Dankert/Dankert - Technische Mechanik: Statik, Festigkeitslehre, Kinematik/Kinetik.”, Bd. 7, 2013
- property bar_deform#
Computes the deformation vectors for each bar in the local bar coordinate system.
For each bar in the system, this function extracts the nodal deformations of its two connected nodes (each with 3 DOFs), stacks them into a (6, 1) array, and transforms them from the node coordinate system into the local bar coordinate system using the bar’s transformation matrix.
The result is a list of deformation vectors that describe how each bar deforms within its own local coordinate system.
- Returns:
listof numpy.ndarrayA list of (6, 1) arrays, each representing the bar deformation in the local bar coordinate system.
- property bar_deform_displacements#
Transforms the support-induced nodal displacements into local bar-end displacements.
Using the transformation matrix of each bar, the nodal displacements caused by support stresses are rotated from the nodal coordinate system into the local bar coordinate system.
- Returns:
listof numpy.ndarrayA list of (6×1) vectors representing the local end displacements of each bar in the system resulting from nodal displacement inputs.
See also
NodeDisplacementFor nodal displacement values in the global coordinate system.
- property bar_deform_hinge#
Computes the relative deformations caused by hinges.
Since various types of hinges can be placed at the ends of a bar, it is essential to consider their influence in the deformation analysis. The presence of a hinge leads to a discontinuous deformation at the corresponding node.
- Returns:
listof numpy.ndarrayA list of (6×1) vectors representing the relative displacements of the nodes for each bar in the system.
Notes
The algorithm iterates through all bars in the system and checks for the presence of hinges. If a hinge is found, the corresponding modified stiffness matrix \(k^{'}\) and modified initial force vector \(f^{(0)'}\) are used to calculate the bar’s deformation \(\delta^{'}\). This step is essential for determining the relative deformations introduced by the hinges.
The internal bar forces are given by:
\[f^{'} = k^{'} \cdot \delta^{'} + f^{(0)'}\]When a hinge is present, the deformation at the node is no longer equal to the bar deformation. For instance, in the case of a rotational hinge at the end of a bar, the total rotation is the sum of the known nodal rotation :math:varphi_{j}^{n} and the relative rotation \(\Delta \varphi_{j}\):
\[\varphi_{j} = \varphi_{j}^{n} + \Delta \varphi_{j}\]The nodal deformation \(\delta^{(n)'}\) is already known via the attribute
bar_deform. The algorithm then calculates the relative deformation introduced by the hinge. To achieve this, the stiffness matrix and force vector are reduced to retain only the degrees of freedom associated with the hinge. This reduction allows the computation of the relative displacement at each hinge location.The calculation of internal forces is then extended to incorporate both known nodal and relative deformations:
\[f^{'} = k^{'} \cdot (\delta^{(n)'} + \Delta \delta^{'}) \ + f^{(0)'}\]From this relationship, a linear system of equations is derived:
\[A \cdot x = b\]where:
\[A = k'{red_n} b = -k'{red} \cdot \delta^{(n)'} - f^{(0)'}\]The solution vector \(x\) represents the total relative deformations caused by the hinges.
- property bar_deform_total#
Combines all deformation contributions for each bar, resulting in the total deformation at the bar ends in the local coordinate system.
- This method adds the deformations from three different sources:
Deformation due to hinges (
bar_deform_hinge)Internal deformation from structural analysis (
bar_deform)Displacement-induced deformation from nodal support movements (
bar_deform_displacements)
- Returns:
listof numpy.ndarrayA list of (6×1) vectors representing the total end deformations of each bar in the system, expressed in the local bar coordinate system.
- property boundary_conditions#
Applies boundary conditions to the global system.
This function modifies the
system_matrixand the total load vectorpto account for the boundary conditions (supports) of each node in the structure. It ensures that the resulting system of equations is solvable by eliminating degrees of freedom that are fixed.- Returns:
tupleofnumpy.arrayA tuple (k, p) where k is the modified global stiffness matrix, and p is the modified global load vector after applying boundary conditions.
Notes
The initially assembled
system_matrixis singular, as it does not yet include support conditions. Its determinant is zero, which makes the equation system unsolvable.To make the system solvable, it is essential to incorporate support conditions. When a deformation is restricted (i.e., if the attributes
u,w, orphiare set to ‘fixed’), the corresponding entry in the nodal displacement vector \(\Delta\) is set to zero.Instead of removing rows and columns, which would require restructuring the system, this algorithm zeroes out the corresponding rows and columns in the stiffness matrix k and sets the diagonal entry to one. This maintains the shape of the result vector \(\Delta\) . The same positions in the load vector
pare set to zero.Examples
>>> from sstatics.core.preprocessing.bar import Bar >>> from sstatics.core.preprocessing.cross_section import CrossSection >>> from sstatics.core.preprocessing.material import Material >>> from sstatics.core.preprocessing.node import Node >>> from sstatics.core.preprocessing.loads import BarLineLoad >>> cross_section = CrossSection(1940e-8, 28.5e-4, 0.2, 0.1, 0.1) >>> material = Material(2.1e8, 0.1, 0.1, 0.1) >>> node1 = Node(0, 0, u='fixed', w='fixed') >>> node2 = Node(3, 0, w='fixed') >>> load = BarLineLoad(1, 1, 'z', 'bar', 'exact') >>> bar1 = Bar(node1, node2, cross_section, material, line_loads=load) >>> system = System([bar1]) >>> Solver(system).system_matrix array([ [199500, 0, 0, -199500, 0, 0], [0, 1810.67, -2716, 0, -1810.67, -2716], [0, -2716, 5432, 0, 2716, 2716], [-199500, 0, 0, 199500, 0, 0], [0, -1810.67, 2716, 0, 1810.67, 2716], [0, -2716, 2716, 0, 2716, 5432]]) >>> Solver(system).p array([[0], [1.5], [-0.75], [0], [1.5], [0.75]]) >>> Solver(system).boundary_conditions (array([ [1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 5432, 0, 0, 2716], [0, 0, 0, 199500, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 2716, 0, 0, 5432]]), array([[0], [0], [-0.75], [0], [0], [0.75]]))
- property elastic_matrix#
Generates a matrix that accounts for the elastic support at the nodes.
The elastic matrix represents the stiffness of the elastic supports at each node, which are placed along the diagonal. If the node is elastically supported, the matrix will contain the corresponding spring or rotational spring stiffness values.
- Returns:
numpy.arrayA matrix whose dimensions are determined by the number of nodes and the degrees of freedom. For a system with 3 nodes and 3 degrees of freedom, the resulting matrix will be 9x9. The diagonal of the matrix contains the spring and rotational spring stiffness values for the supports at each node, if the node is elastically supported.
Notes
The elastic matrix has the same dimensions as the
stiffness_matrix. The diagonal elements of the matrix contain the stiffness values of the support components for each node.
- property f0#
Calculates the total force vector of the bar internal forces from the applied loads.
- Returns:
numpy.arrayA vector with dimensions (number of nodes * dof (=3) x 1), which contains the internal forces of the bars resulting from the applied loads.
Notes
The vector is constructed by adding the force vectors of the individual bars in the system. These vectors are placed in the correct rows based on the node indices. The function iterates over all the bars in the system to assemble the total force vector.
- property internal_forces#
Calculates the internal forces of the statical system.
To compute the internal forces at the ends of each bar element in the local coordinate system, the bar-end deformations
bar_deformmust be applied to the element stiffness relations.- Returns:
listof numpy.ndarrayA list of (6, 1) arrays, each representing the internal forces in the local bar coordinate system.
Notes
The result of this equation yields the internal forces at the bar ends in the local coordinate system:
\[f^{'} = k^{'} \cdot \delta^{'} + f^{(0)'}\]
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- property node_deform#
Solves the linear system for the nodal deformations.
This function computes the nodal displacement vector \(\Delta\) by solving the linear system composed of the modified global stiffness matrix \(K_{mod}\) and the modified global load vector \(P\), which are the result of applying the
boundary_conditions.The resulting displacement vector contains the deformations of each node in its local coordinate system.
- Returns:
numpy.arrayThe displacement vector \(\Delta\) containing the nodal deformations.
- property node_support_forces#
Calculation of the support reaction of the node element \(P^{supp}\).
To calculate the support reactions, the computed node displacements for all nodes \(\Delta\) from the attribute
node_deform, the bar end forces due to the loadf0, and the nodal loadsp0are used.- Returns:
numpy.arrayA vector with dimensions (dof * number of nodes, 1) containing the support reactions in the nodal coordinate system.
Notes
The formula for calculating the support reactions is as follows:
\[P^{supp} = K \cdot \Delta + F^{(0)} - P^{(0)}\]In the calculation algorithm, the deformations from the elastic supports are also taken into account.
- property p#
Computes the global load vector of the system.
The global load vector is obtained by subtracting the internal nodal force vector from the external load vector.
- Returns:
numpy.arrayThe global load vector of the system.
Notes
The global load vector P can be expressed as the product of the global stiffness matrix k and the nodal displacement vector \(\Delta\):
\[P = k \cdot \Delta\]In displacement-based methods, the nodal displacements \(\Delta\) are the unknowns to be solved for. The global load vector is computed from known loads, while the stiffness matrix k is also a known quantity.
- property p0#
Calculates the total vector of external node loads.
The external node loads are considered by collecting them in a total load vector during the calculation.
- Returns:
numpy.arrayA vector with dimensions (number of nodes * dof (=3) x 1), which contains the external node loads.
Notes
Similar to the vector
f0, the external node loads are assembled in the vector based on the node indices.
- property solvable#
Checks whether the stiffness matrix is regular, i.e., whether the system of equations is solvable.
- Returns:
boolFalseif the stiffness matrix is singular (unsolvable),Trueotherwise.
Notes
This method checks whether the system is kinematically movable by examining the rank of the stiffness matrix (computed using
numpy.linalg.matrix_rank(), which internally uses singular value decomposition for numerical stability) instead of computing its determinant, which is computationally expensive and potentially unstable for large systems. If the rank of the stiffness matrix is smaller than its dimension, the matrix is singular, indicating a kinematic system or an incorrect system description [1]. Using the rank in this way provides a robust and numerically stable check [2].References
[1]D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, 2011.
[2]J. Dankert, H. Dankert (Hrsg.). “Mathematik für die Technische Mechanik”. Online: http://www.tm-mathe.de/, abgerufen am 22.03.2025.
- property stiffness_matrix#
Generates the global stiffness matrix of the system, which is formed from the element stiffness matrices of the individual basic elements.
To represent the stiffness relationships of the entire system, the global stiffness matrix is assembled by considering how the bars are connected at the nodes. This is needed to fulfill the equilibrium conditions on each node.
- Returns:
numpy.arrayA matrix whose dimensions are determined by the number of nodes. For a system with 3 nodes, due to the degrees of freedom (3), the resulting matrix will be a 9x9 matrix.
Notes
The global stiffness matrix is constructed by assembling the element stiffness matrices of the individual bars. Initially, the matrix is filled with zeros, and then the element stiffness matrices are placed in the corresponding locations. If multiple bars intersect at a node, the element stiffness matrices are superimposed at that node.
- property system_deform#
Transforms the bar deformations for each bar into the system deformations.
- Returns:
listof numpy.ndarrayA list of (6, 1) arrays, each representing the deformation in the system coordinate system.
- property system_matrix#
Adds the global stiffness matrix and the elastic matrix to form the system stiffness matrix.
- Returns:
numpy.arraySum of
stiffness_matrixandelastic_matrix, resulting in the system stiffness matrix.
- property system_node_deform#
Calculation of the node deformation of the node element in the global coordinate system \(\tilde{P}^{supp}_{n}\).
The node deformation
node_deformare initially given in the respective nodal coordinate system. For the presentation of the results, it may be useful to transform the computed node deformation of node n into the global coordinate system using the transformation matrix \(T_{node}\).- Returns:
numpy.arrayA vector with dimensions (dof * number of nodes, 1) that contains the node deformation referenced to the global coordinate system.
Notes
The transformation of the node deformations into the global coordinate system is performed as follows:
\[\tilde{\Delta}_{n} = T_{node} \cdot \Delta_{n}\]The transformation is only necessary if the node is rotated.
- property system_support_forces#
Calculation of the support reaction of the node element in the global coordinate system \(\tilde{P}^{supp}_{n}\).
The support reactions
node_support_forcesare initially given in the respective nodal coordinate system. For the presentation of the results, it may be useful to transform the computed support reaction of node n into the global coordinate system using the transformation matrix \(T_{node}\).- Returns:
numpy.arrayA vector with dimensions (dof * number of nodes, 1) that contains the support reactions referenced to the global coordinate system.
Notes
The transformation of the support reactions into the global coordinate system is performed as follows:
\[\tilde{P}^{supp}_{n} = T_{node} \cdot P^{supp}_{n}\]The transformation is only necessary if the node is rotated.
- class sstatics.core.solution.poleplan.objects.Chain(bars=<factory>, relative_pole=<factory>, absolute_pole=None, connection_nodes=<factory>)#
Bases:
objectRepresents a kinematic chain of bars and poles in a planar structural system (Polplan).
A Chain corresponds to a “Scheibe” — a kinematically rigid subsystem. Chains are composed of bars connected at nodes and are associated with absolute and relative poles that define rotational and translational motions. Chains can be used to determine Pollinien and relative motion vectors in a Poleplan.
- Parameters:
- barsset of Bar
Set of bars that belong to this chain. Must contain at least one bar.
- relative_poleset of Pole
Set of relative poles associated with this chain, defining relative rotations between connected bodies.
- absolute_polePole or None
Absolute (fixed) pole of the chain, if known. Defines the rotation center of the chain.
- connection_nodesset of Node
Nodes that connect bars of the chain.
- _stiffbool, default=False
Internal flag indicating whether the chain is kinematically stiff.
- _angle_factorfloat, default=0
Internal factor used for calculating rotation angles.
- _anglefloat, default=0
Current rotation angle of the chain.
- Attributes:
- solvedbool
True if the chain is fully solved (all poles known or chain stiff).
- solved_absolute_polebool
True if the absolute pole is fully defined (coordinates or infinite).
- solved_relative_polebool
True if all relative poles are fully defined (coordinates or infinite).
- anglefloat
Rotation angle of the chain.
- angle_factorfloat
Factor applied to calculate rotations.
- stiffbool
Indicates whether the chain is kinematically stiff.
- nodeslist of Node
List of nodes that belong to the chain.
- apole_linesdict
Dictionary of absolute polelines for all relative poles.
- displacement_to_rpolesdict or None
Vectors from the absolute pole to each relative pole, or None if the absolute pole is at infinity.
Methods
add_connection_node(node)
Add a single node or a set of nodes to the chain’s connection nodes.
set_absolute_pole(pole, overwrite=False)
Set or update the absolute pole of the chain.
add_relative_pole(pole)
Add one or multiple relative poles to the chain.
add_bars(bars)
Add multiple bars to the chain.
Notes
Scheibe: A kinematically rigid subsystem. In a system of connected Scheiben, multiple chains are hinge-connected but cannot translate relative to each other.
Pollinien: Lines connecting poles that define relative motion among chains. Chains with multiple relative poles may have multiple absolute pollinien.
The chain’s stiffness (_stiff) becomes True if absolute and relative poles are incompatible or overdetermined.
References
[1]D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, pp. 95 ff., 2011.
- class sstatics.core.solution.poleplan.objects.Pole(node, same_location=False, direction=None, is_infinite=False)#
Bases:
objectRepresents a Pole in a Poleplan (Polplan) of a planar structural system.
A Pole is a point in the plane of the structure around which a chain can rotate. Depending on its type and position, it defines the relative or absolute motion of connected elements.
Types of Poles
- Absolute Pole (Hauptpol):
A fixed point in the plane that does not translate. The associated body rotates around this point. Examples include fixed supports or rigid connections to fixed parts of the structure.
- Relative Pole (Nebenpol):
Defines the relative rotation between two connected bodies. For example, a moment hinge (M = 0) directly gives the relative pole. If shear or translational constraints are zero (N = 0 or Q = 0), the relative pole lies at infinity perpendicular to the motion direction. For non-adjacent bodies, the relative pole may lie somewhere in the plane.
- Parameters:
- node
Node The node associated with the Pole, providing coordinates in the plane.
- same_location
bool, default=False Indicates whether the Pole coincides exactly with the node coordinates.
- direction
floator None, default=None Direction of the Pole for translation or Poles at infinity (in radians). None if not applicable.
- is_infinite
bool, default=False Indicates whether the Pole is at infinity, corresponding to a translational motion.
- node
- Attributes:
Methods
line(node: Node = None)
Returns the slope and intercept [m, n] of the line passing through the Pole in the specified direction, or special cases for vertical lines. Returns False if the Pole has the same location as a node.
Notes
Pollinie: Line connecting three Poles that defines the relative motion of the involved bodies. Movable systems always have at least three Poles on a Pollinie.
Absolute Pollinie: Connects two absolute Poles and the relative Pole of the connected bodies, e.g., (1)-(1/2)-(2).
Relative Pollinie: Connects three relative Poles, e.g., (1/2)-(2/3)-(1/3), defining relative motion among the three bodies.
References
[1]D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, pp. 95 ff., 2011.
- class sstatics.core.solution.poleplan.objects.Poleplan(system, debug=False)#
Bases:
LoggerMixinRepresents the Poleplan (Polplan) of a planar structural system.
The Poleplan captures the kinematic relationships of the system using chains (Scheiben), absolute poles, and relative poles. It systematically constructs all necessary poles and polelines to describe relative and absolute motions of the rigid subsystems.
Construction Procedure: The creation of a Poleplan is performed in several steps [1]:
Identification and naming of all chains (Scheiben) in the system.
Identification and naming of immediately recognizable absolute poles (e.g., at fixed supports) and relative poles (e.g., at moment hinges).
Construction of directly visible polelines, e.g., perpendicular to movable supports, normal force, and shear hinges.
Stepwise determination of additional poles using absolute and relative polelines. Two geometric conditions (directions or lines) define the intersection point of the unknown pole. If polelines are parallel, the pole lies at infinity.
Verification of the complete Poleplan for consistency. Contradictions arise, e.g., if a chain has multiple absolute poles or if two chains share multiple relative poles. Contradictions indicate that the system or parts of it are kinematically rigid. If no contradictions exist, the system can be considered movable.
- Parameters:
- systemSystem
The structural system being analyzed.
- debugbool, default=False
Enable debug logging for intermediate steps.
- chainslist of Chain
All chains (Scheiben) identified in the system after processing.
- solvedbool
True if the Poleplan is consistent and all chains/poles are solved.
- _node_to_chainsdict, optional
Mapping of Node → list of chains that contain the node.
- _node_to_multiple_chainsdict, optional
Cached mapping of nodes that belong to more than one chain.
- Attributes:
node_to_chainsdictMapping of node → list of chains that contain the node.
node_to_multiple_chainsdictCache of nodes that belong to more than one chain.
Methods
set_angle(target_chain, target_angle)
Adjust the rotation angle of a specified chain.
rigid_motion(n_disc=2)
Return a list of rigid body displacement objects for plotting.
get_chain_for(target)
Return the chain containing the given Bar or Node.
find_adjacent_chain(node, chain)
Find a non-stiff adjacent chain sharing a node with the specified chain, returning absolute pole coordinates, node coordinates, and the adjacent chain.
Notes
The Poleplan is constructed using a multi-step pipeline involving ChainIdentifier, PoleIdentifier, and Validator classes.
It captures kinematic constraints and relative motions of rigid subsystems.
Chains (Scheiben) are rigid but may be hinge-connected and non-translating with respect to each other.
Absolute poles define fixed rotation centers, while relative poles define rotations between chains.
Pollinien are lines connecting poles that define relative motion geometry.
References
[1]D. Dinkler. “Grundlagen der Baustatik: Modelle und Berechnungsmethoden für ebene Stabtragwerke”. Band 1, pp. 95 ff., 2011.
- find_adjacent_chain(node, chain)#
Find a non‑stiff adjacent chain that shares
nodewithchain. Returns(absolute_pole_coords, node_coords, adjacent_chain)or(None, None, None)if none is found.
- get_chain_for(target)#
Returns the chain in which the given bar or node is contained.
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- property node_to_chains#
Mapping of node → list of chains that contain the node.
- property node_to_multiple_chains#
Cache of nodes that belong to more than one chain.
- rigid_motion(n_disc=2)#
Return a list of Rigid Body Displacement Objects. They can use for plotting.
- set_angle(chain_idx=0, angle=1)#
Adjust the angle of
target_chaintotarget_angle.
- class sstatics.core.solution.poleplan.operation.AngleCalculator(chains, node_to_chains, debug=False)#
Bases:
LoggerMixinCompute rotation angles for all chains such that a target chain attains a prescribed angle.
- Parameters:
- chainsList[Chain]
Ordered list of chain objects.
- node_to_chainsDict[Node, List[Chain]]
Mapping from each node to the chains that contain it.
- debugbool, optional
Enable verbose debugging output. Default is
False.
- calculate_angles(target_chain, target_angle)#
Public entry point – orchestrates backward and forward angle propagation.
- Parameters:
- target_chainChain
Chain whose angle must become
target_angle.- target_anglefloat
Desired angle for
target_chain(in the same unit as the model).
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- class sstatics.core.solution.poleplan.operation.ChainIdentifier(system: sstatics.core.preprocessing.system.System, debug: bool = False)#
Bases:
LoggerMixin- find_all_conn()#
Populate the node‑to‑chains dictionary for the current chain set.
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- run()#
Main entry point – graph traversal and chain identification.
- class sstatics.core.solution.poleplan.operation.DisplacementCalculator(chains, bars, node_to_chains, debug=False)#
Bases:
LoggerMixinCompute bar displacement vectors for a given pole‑plan.
- Parameters:
- chainsList[Chain]
List of chains that define the structural configuration.
- barsList[Bar]
List of all bars belonging to the model.
- node_to_chainsDict[Node, List[Chain]]
Mapping from each node to the chains that share it.
- debugbool, optional
Enable additional debug information. Default is
False.
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- run()#
Calculate the displacement vector for every bar.
- Returns:
- List[np.ndarray]
A list containing a 6x1 displacement vector for each bar.
- class sstatics.core.solution.poleplan.operation.PoleIdentifier(chains, node_to_chains, debug=False)#
Bases:
LoggerMixinAnalyze kinematic chains and determine missing absolute poles.
Traverses all chains, identifies missing absolute poles, and infers their positions from geometric or kinematic relationships between adjacent chains.
- Attributes:
- chainsList[Chain]
List of chain objects to be analyzed.
- node_to_chainsDict[Node, List[Chain]]
Mapping from each node to the chains connected to it.
- debugbool, optional
Enables verbose debugging if True (default: False).
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- run()#
Iterate over all chains and resolve absolute poles.
Checks each chain for missing absolute pole information and infers absolute poles by analyzing relationships between adjacent chains.
- class sstatics.core.solution.poleplan.operation.Validator(chains, node_to_chains, debug=False)#
Bases:
LoggerMixinValidate geometric and stiffness relationships between chains.
- Parameters:
- chainsList[Chain]
List of all chains in the model.
- node_to_chainsDict[Node, List[Chain]]
Mapping from each node to the chains that contain it.
- debugbool, optional
If
True, additional debug information is logged. Default isFalse.
- Attributes:
- _solvedbool
Internal flag indicating the result of the last validation run.
- property logger#
Returns the logger instance associated with this object.
- Returns:
- logging.Logger
The configured logger.
- run()#
Execute the full validation routine.
- Returns:
- bool
Trueif all chain pairs are consistent,Falseotherwise.
- property solved#
Return the result of the validation.
- sstatics.core.solution.poleplan.operation.get_intersection_point(line1, line2)#
Calculate the intersection point of two lines.
- Args:
line1 (tuple): (slope, intercept) of the first line. line2 (tuple): (slope, intercept) of the second line.
- Returns:
- tuple: (x, z) coordinates of the intersection point or
(None, None) if no intersection.
- sstatics.core.solution.poleplan.operation.validate_point_on_line(line, point, debug=False, epsilon=1e-09)#
Validate if a point lies on a line.
- Args:
line (tuple): (slope, intercept) of the line. point (tuple): (x, z) coordinates of the point. debug (bool, optional): print debug information. Defaults to False. epsilon (float, optional): tolerance for floating-point comparison. Defaults to 1e-9.
- Returns:
bool: True if the point lies on the line, False otherwise.