public virtual void Stop() { if (null == TargetFeature) { return; } foreach (IFeatureRelationEditor topologyRule in TopologyRules) { topologyRule.StoreRelatedFeatures(SourceFeature, TargetFeature.Geometry, new List <int> { 0 }); } /* for (int i = 0; i < TargetFeature.Geometry.Coordinates.Length; i++) * { * //SourceFeature.Geometry.Coordinates[i].X = TargetFeature.Geometry.Coordinates[i].X; * //SourceFeature.Geometry.Coordinates[i].Y = TargetFeature.Geometry.Coordinates[i].Y; * //////SourceFeature.Geometry = (IGeometry) TargetFeature.Geometry.Clone();//#$# * }*/ SourceFeature.Geometry = (IGeometry)TargetFeature.Geometry.Clone(); //#$# //SourceFeature.Geometry.GeometryChangedAction(); TopologyRules.Clear(); }
public virtual void Start() { //var nodeToBranchTopologyRule = new NodeToBranchTopologyRule(); TargetFeature = CreateTargetFeature(); foreach (IFeatureRelationEditor topologyRule in GetRelationEditorRules(SourceFeature)) { IFeatureRelationEditor activeRule = topologyRule.Activate(SourceFeature, TargetFeature, AddRelatedFeature, 0, FallOffPolicy); if (null != activeRule) { TopologyRules.Add(activeRule); } } }