refactor(core): унификация COM-хелперов и классификаторов топологии

Вынесены общие ComHelper (Release + Safe-геттеры) и GeomClassifiers
(FaceType/EdgeType), устранены дубли в 5+ сервисах. Освобождение doc3d RCW
в GetTopPart, void-возвраты вместо фиктивных bool, HashSet для OpKinds,
DocumentTypeName в паспорте модели, FileExtension без аллокаций.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-26 20:15:43 +03:00
parent e1337e4016
commit 579b191d7c
13 changed files with 229 additions and 188 deletions
+2 -9
View File
@@ -1,5 +1,5 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Kompas.Mcp.Core.Interop;
using Kompas.Mcp.Core.Threading;
using Kompas6API5;
using Kompas6Constants3D;
@@ -432,14 +432,7 @@ public sealed class PartModeler : IDisposable
_nextId = 1;
}
private static void ReleaseCom(object? comObject)
{
if (comObject is not null && Marshal.IsComObject(comObject))
{
try { Marshal.ReleaseComObject(comObject); }
catch { /* освобождение не критично */ }
}
}
private static void ReleaseCom(object? comObject) => ComHelper.Release(comObject);
public void Dispose()
{