Skip to content

Commit

Permalink
1.6.7.1
Browse files Browse the repository at this point in the history
Components needed byChiCheng
  • Loading branch information
lin-ycv committed Mar 5, 2024
1 parent 0556e21 commit e435eb7
Show file tree
Hide file tree
Showing 36 changed files with 809 additions and 832 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Victor Lin
Copyright (c) 2024 Victor Lin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
40 changes: 0 additions & 40 deletions Properties/AssemblyInfo.cs

This file was deleted.

166 changes: 0 additions & 166 deletions RobotsExtended.csproj

This file was deleted.

6 changes: 0 additions & 6 deletions packages.config

This file was deleted.

12 changes: 2 additions & 10 deletions src/Kuka/CVEL.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using Grasshopper.Kernel;
using Robots;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RobotsExtended.Kuka
namespace RobotsExtended.Kuka
{
public class CVEL : GH_Component
{
Expand Down Expand Up @@ -43,7 +35,7 @@ protected override void SolveInstance(IGH_DataAccess DA)
DA.SetData(0, command);
}
protected override System.Drawing.Bitmap Icon => Properties.Resources.Speed_Approximation;
public override Guid ComponentGuid => new Guid("79B3841F-6BCE-4D80-B665-B6DF637C1797");
public override Guid ComponentGuid => new("79B3841F-6BCE-4D80-B665-B6DF637C1797");
}

}
28 changes: 7 additions & 21 deletions src/Kuka/MergeKRL.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
using GH_IO.Serialization;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Parameters;
using Grasshopper.Kernel.Types;
using Grasshopper.Kernel;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RobotsExtended.Kuka
namespace RobotsExtended.Kuka
{
public class MergeKRL : GH_Component, IGH_VariableParameterComponent
{
Expand Down Expand Up @@ -51,8 +38,8 @@ protected override void SolveInstance(IGH_DataAccess DA)
List<string> header =
code.Branches[0][0].Value
.Split(new string[] { "\r\n", "\r", "\n", Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
Dictionary<string, string> declare = new Dictionary<string, string>();
List<string> prog = new List<string>();
Dictionary<string, string> declare = [];
List<string> prog = [];
List<string> declOrg = string.Join(Environment.NewLine, code.Branches[1].Select(x => x.Value)).Split(new string[] { "\r\n", "\r", "\n", Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList(); ;
for (int i = 1; i < declOrg.Count - 1; i++)// Skip RVP+REL and ENDDAT
{
Expand All @@ -69,8 +56,7 @@ protected override void SolveInstance(IGH_DataAccess DA)
prog.Add(code.Branches[2][i].Value);
}

List<string> main = new List<string>();
main.AddRange(prog);
List<string> main = [.. prog];
if (fold)
main.Insert(2, "\r\n;FOLD");
else
Expand Down Expand Up @@ -175,8 +161,8 @@ protected override void SolveInstance(IGH_DataAccess DA)
void IGH_VariableParameterComponent.VariableParameterMaintenance() {}
bool save = false;
bool fold = false;
readonly Param_String param = new Param_String { Name = "Directory", NickName = "P", Description = "Specify Path where file will be saved\nIf not specified, will try to save to Desktop", Optional = true };
readonly Param_Boolean param2 = new Param_Boolean { Name = "Save", NickName = "S", Description = "Button or toggle to specify saving", Optional = false };
readonly Param_String param = new() { Name = "Directory", NickName = "P", Description = "Specify Path where file will be saved\nIf not specified, will try to save to Desktop", Optional = true };
readonly Param_Boolean param2 = new() { Name = "Save", NickName = "S", Description = "Button or toggle to specify saving", Optional = false };
private void SaveInputs(object sender, EventArgs e)
{
RecordUndoEvent("Enable/disable Save param");
Expand Down Expand Up @@ -207,7 +193,7 @@ public override bool Read(GH_IReader reader)
return base.Read(reader);
}
protected override System.Drawing.Bitmap Icon => Properties.Resources.KRL;
public override Guid ComponentGuid => new Guid("309454cf-ea5e-470f-80a8-fc19e3729dfc");
public override Guid ComponentGuid => new("309454cf-ea5e-470f-80a8-fc19e3729dfc");
}

}
10 changes: 1 addition & 9 deletions src/Kuka/MxAutomation.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
using Grasshopper.Kernel;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RobotsExtended.Kuka
namespace RobotsExtended.Kuka
{
//public class MxAutomation : GH_Component
//{
Expand Down
Loading

0 comments on commit e435eb7

Please sign in to comment.