HLSF full functionally available. Working on Matrix.

Signed-off-by: Youmu Liu <105042599+Nitload-NSI@users.noreply.github.com>
This commit is contained in:
Youmu Liu
2025-08-25 22:13:45 +08:00
parent fe097fd94c
commit e5e4b1dd36
1479 changed files with 2083 additions and 619964 deletions
+17 -21
View File
@@ -28,23 +28,24 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Model.Step;
using StgSharp.Script;
using StgSharp.Script.Express;
using System;
using System.Collections.Generic;
namespace StgSharp.Modeling.Items
namespace StgSharp.Model.Step
{
public class StepVertexPoint : StepVertex
public class StepVertexPoint : StepVertex, IExpConvertableFrom<StepVertexPoint>
{
private StepCartesianPoint _location;
private StepVertexPoint() : base( string.Empty ) { }
public StepVertexPoint( StepModel model ) : base( model ) { }
public StepVertexPoint( string name, StepCartesianPoint location )
: base( name )
public StepVertexPoint( StepModel model, StepCartesianPoint location )
: base( model )
{
Location = location;
}
@@ -54,32 +55,27 @@ namespace StgSharp.Modeling.Items
get { return _location; }
set
{
if( value == null ) {
throw new ArgumentNullException();
}
ArgumentNullException.ThrowIfNull( value );
_location = value;
}
}
public override StepItemType ItemType => StepItemType.VertexPoint;
internal static StepVertexPoint CreateFromSyntaxList(
StepBinder binder,
ExpNode syntaxList )
public void FromInstance( StepVertexPoint entity )
{
ExpNodeNextEnumerator enumerator = new ExpNodeNextEnumerator( syntaxList );
StepVertexPoint vertex = new StepVertexPoint();
enumerator.AssertEnumeratorCount( 2 );
vertex.Name = enumerator.Values[ 0 ].CodeConvertTemplate;
binder.BindValue(
enumerator.Values[ 1 ], v => vertex.Location = v.AsType<StepCartesianPoint>() );
return vertex;
base.FromInstance( entity );
this.Location = entity.Location;
}
internal override IEnumerable<StepRepresentationItem> GetReferencedItems()
internal static StepVertexPoint FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
{
yield return Location;
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
StepVertexPoint vertex = new StepVertexPoint( binder );
enumerator.AssertEnumeratorCount( 2 );
vertex.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
vertex.Location = binder[ enumerator[ 1 ] ] as StepCartesianPoint;
return vertex;
}
}