Skip to main content

Physical connection API

cadflow.physical attaches reduced-order load-response behavior to assembly connectors and optional geometry regions. It complements assembly kinematics without pretending to be a continuum contact solver.

Layer structure

PhysicalConnectionLayer belongs to one assembly_id and declares length, force, and time units. It contains uniquely identified PhysicalConnection values.

Each connection identifies:

  • a PhysicalConnectionKind;
  • two assembly ConnectorRef endpoints;
  • optional ConnectionBehavior stiffness, damping, friction, preload, clearance, interference, and limits;
  • optional ConnectionRegion geometry references and roles;
  • optional insertion direction, auxiliary components, and linked kinematic constraint.

Construction

layer = cad.make_physical_connection_layer_rphysicalconnectionlayer(
assembly, length_unit="mm", force_unit="N", time_unit="s"
)
behavior = cad.make_connection_behavior_rconnectionbehavior(
response_mode="linear",
normal_stiffness=20000.0,
tangential_stiffness=8000.0,
friction_coefficient=0.2,
)
connection = cad.make_physical_connection_rphysicalconnection(
connection_id="joint-1",
connection_kind="contact",
connector_a=left_ref,
connector_b=right_ref,
behavior=behavior,
)
layer = cad.add_physical_connection_rphysicalconnectionlayer(layer, connection)

Use the enum pages for supported kind, role, and response-mode values. Numeric parameters must be finite and obey their non-negative or positive constraints. Limit fields are optional; absence means the declaration makes no corresponding limit claim.

Validation

validate_physical_connection_layer_rphysicalconnectionvalidationreport(layer, assembly) checks assembly identity, unique IDs, connector resolution, regions, units, linked constraints, and cross-references. The report separates errors and warnings and can raise on errors.

Validation confirms declaration consistency, not structural adequacy or regulatory compliance.

Response evaluation

PhysicalConnectionState supplies relative displacement, rotation, velocity, or other mode-specific state. evaluate_physical_connections_rphysicalconnectionresponsebatch(layer, states) returns force, moment, limit utilization, and diagnostics for each requested connection.

State values and response values follow the layer's declared unit system. Keep sign and frame conventions consistent with the connector definitions.

Persistence

JSON export/import functions preserve the versioned layer schema. Validate again against the target assembly after import because a syntactically valid layer can reference components or connectors absent from the current product.

See all 23 Physical symbols.