private static void AddCurvesByLayer(SpaceClaim.Svg.Document svgDoc, Color? fillColor, Dictionary<Layer, List<CurveSegment>> CurvesOnLayer) { foreach (Layer layer in CurvesOnLayer.Keys) { List<List<ITrimmedCurve>> profiles = CurvesOnLayer[layer].Cast<ITrimmedCurve>().ToList().ExtractChains().Select(c => c.ToList()).ToList(); foreach (List<ITrimmedCurve> profile in profiles) { svgDoc.AddPath(profile, false, GetLineWeight(layer.GetLineWeight(null)), layer.GetColor(null), fillColor); } } }
protected override void OnExecute(Command command, SpaceClaim.Api.V10.ExecutionContext context, Rectangle buttonRect) { Window window = Window.ActiveWindow; window.SetTool(new AnimationTool()); }