old data
This commit is contained in:
@@ -28,28 +28,27 @@
|
||||
//
|
||||
//-----------------------------------------------------------------------
|
||||
//-----------------------------------------------------------------------
|
||||
using StgSharp.Model.Step;
|
||||
using StgSharp.Script;
|
||||
using StgSharp.Script.Express;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace StgSharp.Model.Step
|
||||
namespace StgSharp.Modeling.Items
|
||||
{
|
||||
public class StepAxis2Placement3D : StepAxis2Placement, IExpConvertableFrom<StepAxis2Placement3D>
|
||||
public class StepAxis2Placement3D : StepAxis2Placement
|
||||
{
|
||||
|
||||
private StepDirection _axis;
|
||||
|
||||
private StepAxis2Placement3D( StepModel model ) : base( model ) { }
|
||||
private StepAxis2Placement3D() : base( string.Empty ) { }
|
||||
|
||||
public StepAxis2Placement3D(
|
||||
StepModel model,
|
||||
string name,
|
||||
StepCartesianPoint location,
|
||||
StepDirection axis,
|
||||
StepDirection refDirection )
|
||||
: base( model )
|
||||
: base( name )
|
||||
{
|
||||
Location = location;
|
||||
Axis = axis;
|
||||
@@ -61,35 +60,37 @@ namespace StgSharp.Model.Step
|
||||
get { return _axis; }
|
||||
set
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull( value );
|
||||
if( value == null ) {
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
_axis = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override StepItemType ItemType => StepItemType.AxisPlacement3D;
|
||||
|
||||
public override bool IsConvertableTo( string entityTypeName )
|
||||
internal static StepAxis2Placement3D CreateFromSyntaxList(
|
||||
StepBinder binder,
|
||||
ExpNode syntaxList )
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
internal static StepAxis2Placement3D FromSyntax(
|
||||
StepModel binder,
|
||||
ExpSyntaxNode syntaxList )
|
||||
{
|
||||
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
|
||||
StepAxis2Placement3D axis = new StepAxis2Placement3D( binder );
|
||||
ExpNodeNextEnumerator enumerator = new ExpNodeNextEnumerator( syntaxList );
|
||||
StepAxis2Placement3D axis = new StepAxis2Placement3D();
|
||||
enumerator.AssertEnumeratorCount( 4 );
|
||||
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;
|
||||
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>() );
|
||||
return axis;
|
||||
}
|
||||
|
||||
void IExpConvertableFrom<StepAxis2Placement3D>.FromInstance( StepAxis2Placement3D entity )
|
||||
internal override IEnumerable<StepRepresentationItem> GetReferencedItems()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
yield return Location;
|
||||
yield return Axis;
|
||||
yield return RefDirection;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user