Files
茂之钳 12db7d3e5a
CI / Build & Test (push) Failing after 1m31s
CI / Release Build (push) Failing after 31s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
feat(v3.5): perf caching + measure + flange/gear + feature tree + assembly constraints
2026-07-24 14:02:24 +00:00

33 lines
1.0 KiB
C++

#pragma once
#include "vde/brep/assembly.h"
#include "vde/core/point.h"
namespace vde::brep {
/// Constraint types for assembly
enum class ConstraintType {
Coincident, // Face-face coincident (align planes)
Concentric, // Cylinder-cylinder concentric (align axes)
Tangent, // Face-face tangent
Parallel, // Face-face parallel
Perpendicular,// Face-face perpendicular
Distance, // Face-face at fixed distance
Angle // Face-face at fixed angle
};
/// Apply a mate constraint between two assembly nodes
/// @param assembly Target assembly
/// @param node_a First node
/// @param node_b Second node (this one moves to satisfy constraint)
/// @param type Constraint type
/// @param value Optional value (for Distance/Angle constraints)
/// @return true if constraint applied successfully
[[nodiscard]] bool apply_constraint(
Assembly& assembly,
AssemblyNode* node_a,
AssemblyNode* node_b,
ConstraintType type,
double value = 0.0);
} // namespace vde::brep