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
@@ -28,25 +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 StepCylindricalSurface : StepElementarySurface, IExpConvertableFrom<StepCylindricalSurface>
public class StepCylindricalSurface : StepElementarySurface
{
public StepCylindricalSurface( StepModel model ) : base( model ) { }
private StepCylindricalSurface() : base() { }
public StepCylindricalSurface(
StepModel model,
StepAxis2Placement3D position,
float radius )
: base( model, position )
public StepCylindricalSurface( string name, StepAxis2Placement3D position, float radius )
: base( name, position )
{
Radius = radius;
}
@@ -55,22 +51,17 @@ namespace StgSharp.Model.Step
public override StepItemType ItemType => StepItemType.CylindricalSurface;
public void FromInstance( StepCylindricalSurface entity )
internal static StepRepresentationItem CreateFromSyntaxList(
StepBinder binder,
ExpNode syntaxList )
{
base.FromInstance( entity );
Radius = entity.Radius;
}
internal static StepRepresentationItem FromSyntax(
StepModel binder,
ExpSyntaxNode syntaxList )
{
ExpNodePresidentEnumerator enumerator = new ExpNodePresidentEnumerator( syntaxList );
ExpNodeNextEnumerator enumerator = new ExpNodeNextEnumerator( syntaxList );
enumerator.AssertEnumeratorCount( 3 );
StepCylindricalSurface surface = new StepCylindricalSurface( binder );
surface.Name = ( enumerator[ 0 ] as ExpStringNode )!.Value;
surface.Position = binder[ enumerator[ 1 ] ]as StepAxis2Placement3D;
surface.Radius = ( enumerator[ 2 ]as ExpRealNumberNode )!.Value;
StepCylindricalSurface surface = new StepCylindricalSurface();
surface.Name = enumerator.Values[ 0 ].CodeConvertTemplate;
binder.BindValue(
enumerator.Values[ 1 ], v => surface.Position = v.AsType<StepAxis2Placement3D>() );
surface.Radius = ( enumerator.Values[ 2 ]as ExpRealNumberNode )!.Value;
return surface;
}