This commit is contained in:
Nitload
2025-08-25 09:50:30 +08:00
parent bd0e31e922
commit 1359ff4ecc
1630 changed files with 738486 additions and 2399 deletions
+16 -19
View File
@@ -28,22 +28,21 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using StgSharp.Model.Step;
using StgSharp.Script;
using StgSharp.Script.Express;
using System.Collections.Generic;
namespace StgSharp.Model.Step
namespace StgSharp.Modeling.Items
{
public class StepFaceBound : StepTopologicalRepresentationItem, IExpConvertableFrom<StepFaceBound>
public class StepFaceBound : StepTopologicalRepresentationItem
{
public StepFaceBound( StepModel model ) : base( model ) { }
protected StepFaceBound() : base( string.Empty ) { }
public StepFaceBound( StepModel model, StepLoop bound, bool orientation )
: base( model )
public StepFaceBound( string name, StepLoop bound, bool orientation )
: base( name )
{
Bound = bound;
Orientation = orientation;
@@ -55,22 +54,20 @@ namespace StgSharp.Model.Step
public StepLoop Bound { get; set; }
public void FromInstance( StepFaceBound entity )
internal static StepFaceBound CreateFromSyntaxList( StepBinder binder, ExpNode syntaxList )
{
base.FromInstance( entity );
Bound = entity.Bound;
Orientation = entity.Orientation;
ExpNodeNextEnumerator enumerator = new ExpNodeNextEnumerator( syntaxList );
enumerator.AssertEnumeratorCount( 3 );
StepFaceBound faceBound = new StepFaceBound();
faceBound.Name = enumerator.Values[ 0 ].CodeConvertTemplate;
binder.BindValue( enumerator.Values[ 1 ], v => faceBound.Bound = v.AsType<StepLoop>() );
faceBound.Orientation = ( enumerator.Values[ 2 ]as ExpBoolNode )!.Value;
return faceBound;
}
internal static StepFaceBound FromSyntax( StepModel binder, ExpSyntaxNode syntaxList )
internal override IEnumerable<StepRepresentationItem> GetReferencedItems()
{
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
enumerator.AssertEnumeratorCount( 3 );
StepFaceBound faceBound = new StepFaceBound( binder );
faceBound.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
faceBound.Bound = binder[ enumerator[ 1 ] ] as StepLoop;
faceBound.Orientation = ( enumerator[ 2 ]as ExpBoolNode )!.Value;
return faceBound;
yield return Bound;
}
}