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