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
+13 -15
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 StepEdge : StepTopologicalRepresentationItem, IExpConvertableFrom<StepEdge>
public abstract class StepEdge : StepTopologicalRepresentationItem
{
protected StepEdge( StepModel model ) : base( model ) { }
protected StepEdge() : base( string.Empty ) { }
protected StepEdge( StepModel model, StepVertex edgeStart, StepVertex edgeEnd )
: base( model )
protected StepEdge( string name, StepVertex edgeStart, StepVertex edgeEnd )
: base( name )
{
EdgeStart = edgeStart;
EdgeEnd = edgeEnd;
@@ -53,16 +52,15 @@ namespace StgSharp.Model.Step
public StepVertex EdgeEnd { get; set; }
public void FromInstance( StepEdge entity )
internal override IEnumerable<StepRepresentationItem> GetReferencedItems()
{
base.FromInstance( entity );
EdgeStart = entity.EdgeStart;
EdgeEnd = entity.EdgeEnd;
}
if( EdgeStart != null ) {
yield return EdgeStart;
}
public override bool IsConvertableTo( string entityName )
{
return base.IsConvertableTo( entityName ) || entityName == "StepEdge";
if( EdgeEnd != null ) {
yield return EdgeEnd;
}
}
}