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
@@ -28,27 +28,28 @@
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
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 StepAxis2Placement3D : StepAxis2Placement
public class StepAxis2Placement3D : StepAxis2Placement, IExpConvertableFrom<StepAxis2Placement3D>
{
private StepDirection _axis;
private StepAxis2Placement3D() : base( string.Empty ) { }
private StepAxis2Placement3D( StepModel model ) : base( model ) { }
public StepAxis2Placement3D(
string name,
StepModel model,
StepCartesianPoint location,
StepDirection axis,
StepDirection refDirection )
: base( name )
: base( model )
{
Location = location;
Axis = axis;
@@ -60,37 +61,35 @@ namespace StgSharp.Modeling.Items
get { return _axis; }
set
{
if( value == null ) {
throw new ArgumentNullException();
}
ArgumentNullException.ThrowIfNull( value );
_axis = value;
}
}
public override StepItemType ItemType => StepItemType.AxisPlacement3D;
internal static StepAxis2Placement3D CreateFromSyntaxList(
StepBinder binder,
ExpNode syntaxList )
public override bool IsConvertableTo( string entityTypeName )
{
ExpNodeNextEnumerator enumerator = new ExpNodeNextEnumerator( syntaxList );
StepAxis2Placement3D axis = new StepAxis2Placement3D();
throw new NotImplementedException();
}
internal static StepAxis2Placement3D FromSyntax(
StepModel binder,
ExpSyntaxNode syntaxList )
{
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
StepAxis2Placement3D axis = new StepAxis2Placement3D( binder );
enumerator.AssertEnumeratorCount( 4 );
axis.Name = enumerator.Values[ 0 ].CodeConvertTemplate;
binder.BindValue(
enumerator.Values[ 1 ], v => axis.Location = v.AsType<StepCartesianPoint>() );
binder.BindValue( syntaxList.Values[ 2 ], v => axis.Axis = v.AsType<StepDirection>() );
binder.BindValue(
enumerator.Values[ 3 ], v => axis.RefDirection = v.AsType<StepDirection>() );
axis.Name = ( enumerator[ 0 ]as ExpStringNode )!.Value;
axis.Location = binder[ enumerator[ 1 ] ] as StepCartesianPoint;
axis.Axis = binder[ enumerator[ 2 ] ] as StepDirection;
axis.RefDirection = binder[ enumerator[ 3 ] ] as StepDirection;
return axis;
}
internal override IEnumerable<StepRepresentationItem> GetReferencedItems()
void IExpConvertableFrom<StepAxis2Placement3D>.FromInstance( StepAxis2Placement3D entity )
{
yield return Location;
yield return Axis;
yield return RefDirection;
throw new NotImplementedException();
}
}