Merge from branch giga

This commit is contained in:
Nitload
2025-08-31 10:42:51 +08:00
parent 1fc687f7d0
commit 1a0ccdd8cb
1619 changed files with 2812 additions and 733136 deletions
+17 -7
View File
@@ -28,7 +28,9 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Modeling.Step;
using CommunityToolkit.HighPerformance.Buffers;
using StgSharp.Model.Step;
using StgSharp.Script;
using StgSharp.Script.Express;
@@ -37,7 +39,7 @@ using System.Collections.Frozen;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace StgSharp.Modeling.Step
namespace StgSharp.Model.Step
{
public class ExpressStepUtil : ExpSchema
{
@@ -58,6 +60,7 @@ namespace StgSharp.Modeling.Step
public const string LineText = "LINE";
public const string OrientedEdgeText = "ORIENTED_EDGE";
public const string PlaneText = "PLANE";
public const string RepresentationItemText = "REPRESENTATION_ITEM";
public const string VectorText = "VECTOR";
public const string VertexPointText = "VERTEX_POINT";
@@ -79,15 +82,22 @@ namespace StgSharp.Modeling.Step
LineText,
OrientedEdgeText,
PlaneText,
RepresentationItemText,
VectorText,
VertexPointText,
];
private FrozenDictionary<string, ExpTypeSource> entitiesDefine;
private FrozenDictionary<string, ExpEntitySource> entitiesDefine;
private StringPool _entityNamePool = new StringPool();
public ExpressStepUtil()
{
Dictionary<string, ExpTypeSource> tIndex = new Dictionary<string, ExpTypeSource>();
IEnumerable<KeyValuePair<string, ExpEntitySource>> defineSource = [];
entitiesDefine = new Dictionary<string, ExpEntitySource>( defineSource )
.ToFrozenDictionary();
foreach( string item in names ) {
_entityNamePool.Add( item );
}
}
internal StepModel Current { get; set; }
@@ -105,13 +115,13 @@ namespace StgSharp.Modeling.Step
public override bool TryGetEntity( string name, out ExpEntitySource e )
{
e = null!;
return false;
return entitiesDefine.TryGetValue( name, out e! );
}
public override bool TryGetFunction( string name, out ExpFunctionSource f )
{
throw new NotImplementedException();
f = null!;
return false;
}
public override bool TryGetProcedure( string name, out ExpProcedureSource p )