chore: 更新 CHANGELOG 和 VERSION 至 0.15.7
This commit is contained in:
parent
b533153234
commit
1e45546aed
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,5 +1,17 @@
|
||||
# NavisworksTransport 变更日志
|
||||
|
||||
## [0.15.7] - 2026-06-08
|
||||
|
||||
### 🐛 Bug 修复
|
||||
|
||||
- **自动调整优化器改为四元数采样**:
|
||||
- 网格搜索:S³ 均匀随机四元数(256 点)替代 Euler 角度网格(512 点),通过 canonical 空间桥接转换为 host Euler
|
||||
- 模式搜索:7 轴 × 2 方向四元数乘法邻域搜索(`deltaQ * bestQ`),替代 Euler 角度加减 delta
|
||||
- 最小步长:1° → 0.125°,提高收敛精度
|
||||
- 平局容差:1% → 0.2%,匹配高精度收敛
|
||||
- 平局规则:面积相等时优先满足门型约束(高门/宽门),约束相同时再按高度→宽度排序
|
||||
- 消除 Euler 万向节死锁和 grid 采样密度不均匀问题
|
||||
|
||||
## [0.15.6] - 2026-06-06
|
||||
|
||||
### 🐛 Bug 修复
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
# 版本号
|
||||
|
||||
0.15.6
|
||||
0.15.7
|
||||
|
||||
@ -12,7 +12,7 @@ namespace NavisworksTransport.Utils.CoordinateSystem
|
||||
double sizeZ,
|
||||
Vector3 hostPathForward,
|
||||
Vector3 hostUp,
|
||||
double areaRelativeTieTolerance = 0.01,
|
||||
double areaRelativeTieTolerance = 0.002,
|
||||
Quaternion? baselineHostRotation = null)
|
||||
{
|
||||
SizeX = sizeX;
|
||||
@ -164,7 +164,7 @@ namespace NavisworksTransport.Utils.CoordinateSystem
|
||||
foreach (var (correction, quat) in UniformQuaternionCorrections(QuaternionSampleCount, QuaternionRandomSeed))
|
||||
{
|
||||
ObjectPassageProjectionScore score = evaluator(correction);
|
||||
if (IsBetter(score, bestScore, request.AreaRelativeTieTolerance))
|
||||
if (IsBetter(score, bestScore, request.AreaRelativeTieTolerance, request.RequireWidthLarger))
|
||||
{
|
||||
bestScore = score;
|
||||
bestCorrection = correction;
|
||||
@ -278,7 +278,8 @@ namespace NavisworksTransport.Utils.CoordinateSystem
|
||||
private static bool IsBetter(
|
||||
ObjectPassageProjectionScore candidate,
|
||||
ObjectPassageProjectionScore currentBest,
|
||||
double areaRelativeTieTolerance)
|
||||
double areaRelativeTieTolerance,
|
||||
bool? requireWidthLarger)
|
||||
{
|
||||
if (double.IsInfinity(currentBest.Area))
|
||||
{
|
||||
@ -293,6 +294,19 @@ namespace NavisworksTransport.Utils.CoordinateSystem
|
||||
|
||||
if (Math.Abs(candidate.Area - currentBest.Area) <= tolerance)
|
||||
{
|
||||
// 面积平局 → 用门型约束选择
|
||||
if (requireWidthLarger.HasValue)
|
||||
{
|
||||
bool candidateOk = requireWidthLarger.Value
|
||||
? candidate.WidthAcrossPath >= candidate.HeightAlongHostUp
|
||||
: candidate.HeightAlongHostUp >= candidate.WidthAcrossPath;
|
||||
bool currentOk = requireWidthLarger.Value
|
||||
? currentBest.WidthAcrossPath >= currentBest.HeightAlongHostUp
|
||||
: currentBest.HeightAlongHostUp >= currentBest.WidthAcrossPath;
|
||||
if (candidateOk && !currentOk) return true;
|
||||
if (!candidateOk && currentOk) return false;
|
||||
}
|
||||
// 约束相同 → 选更小面积
|
||||
if (candidate.HeightAlongHostUp < currentBest.HeightAlongHostUp - Epsilon)
|
||||
{
|
||||
return true;
|
||||
@ -399,7 +413,7 @@ namespace NavisworksTransport.Utils.CoordinateSystem
|
||||
};
|
||||
|
||||
double stepRadians = 22.5 * Math.PI / 180.0;
|
||||
while (stepRadians >= 1.0 * Math.PI / 180.0)
|
||||
while (stepRadians >= 0.125 * Math.PI / 180.0)
|
||||
{
|
||||
bool improved = false;
|
||||
foreach (var axis in axes)
|
||||
@ -411,7 +425,7 @@ namespace NavisworksTransport.Utils.CoordinateSystem
|
||||
var candidateQ = Quaternion.Normalize(deltaQ * bestQuaternion);
|
||||
var candidateEuler = CanonicalQuaternionToHostEulerCorrection(candidateQ);
|
||||
ObjectPassageProjectionScore score = evaluator(candidateEuler);
|
||||
if (IsBetter(score, bestScore, request.AreaRelativeTieTolerance))
|
||||
if (IsBetter(score, bestScore, request.AreaRelativeTieTolerance, request.RequireWidthLarger))
|
||||
{
|
||||
bestCorrection = candidateEuler;
|
||||
bestScore = score;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user