规范模块目录和第三方依赖结构

This commit is contained in:
zhangshun
2026-06-01 16:57:39 +08:00
parent e8e485b115
commit c2ce29d874
1758 changed files with 187 additions and 102 deletions

View File

@@ -0,0 +1,54 @@
#ifndef CRANK_ROCKING_BLOCK_MECHANISM_INVERSE_H
#define CRANK_ROCKING_BLOCK_MECHANISM_INVERSE_H
#include "FourBarMechanism/CrankSliderMechanism.h"
#include <vector>
#include <string>
#include <map>
#include <memory>
// 曲柄摇块机构(逆解)
class CrankRockingBlockMechanism_Inverse
{
private:
std::string name;
MechanismType type;
MechanismParameters parameters;
std::vector<Vector2D> trajectoryPoints;
public:
CrankRockingBlockMechanism_Inverse();
// 基本属性
std::string getName() const;
MechanismType getType() const;
MechanismParameters getParameters() const;
void setParameters(const MechanismParameters &params);
// 设置连杆长度
void setLink(double OA, double AB, double OC);
void setOA(double length);
void setAB(double length);
void setOC(double distance);
// 主要计算函数
MechanismState calculate(double acDistance);
// 获取输入范围
std::pair<double, double> getInputRange();
// 轨迹相关
std::vector<Vector2D> getTrajectoryPoints() const;
void clearTrajectory();
// 参数验证
ValidationResult validateParameters();
// 状态信息
std::string getStatusText();
private:
std::pair<double, double> getACRange() const;
};
#endif // CRANK_ROCKING_BLOCK_MECHANISM_INVERSE_H