Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
202 changes: 28 additions & 174 deletions src/Machina/Machina.csproj
Original file line number Diff line number Diff line change
@@ -1,179 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{15951838-F9D6-4988-A103-B7C72BFE81A2}</ProjectGuid>
<TargetFramework>netstandard2.0</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Machina</RootNamespace>
<AssemblyName>Machina</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<StartupObject />
<PostBuildEvent>REM JL: for the time being, only copy ddlls manually to avoid breaking the dependent projects
REM IF ($(ConfigurationName)) == (Debug) GOTO END
REM cd $(ProjectDir)
REM copy /y bin\Release\Machina.dll "D:\Dropbox\Jose Luis\code\MachinaDynamo\package\Machina\bin"
REM :END</PostBuildEvent>
<AssemblyTitle>Machina</AssemblyTitle>
<Company>Microsoft</Company>
<Product>Machina</Product>
<Copyright>Copyright © Microsoft 2016</Copyright>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>1</WarningLevel>
<DocumentationFile>bin\Debug\Machina.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\Machina.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<ItemGroup>
<Reference Include="ABB.Robotics.Controllers.PC">
<HintPath>assemblies\ABB.Robotics.Controllers.PC.dll</HintPath>
</Reference>
<Reference Include="RobotStudio.Services.RobApi.Desktop">
<HintPath>assemblies\RobotStudio.Services.RobApi.Desktop.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Actions\Action.cs" />
<Compile Include="ActionBuffer.cs" />
<Compile Include="Actions\ActionAcceleration.cs" />
<Compile Include="Actions\ActionArmAngle.cs" />
<Compile Include="Actions\ActionAttachTool.cs" />
<Compile Include="Actions\ActionAxes.cs" />
<Compile Include="Actions\ActionArcMotion.cs" />
<Compile Include="Actions\ActionComment.cs" />
<Compile Include="Actions\ActionCoordinates.cs" />
<Compile Include="Actions\ActionCustomCode.cs" />
<Compile Include="Actions\ActionDefineTool.cs" />
<Compile Include="Actions\ActionDetachTool.cs" />
<Compile Include="Actions\ActionExtrusion.cs" />
<Compile Include="Actions\ActionExtrusionRate.cs" />
<Compile Include="Actions\ActionInitialization.cs" />
<Compile Include="Actions\ActionIOAnalog.cs" />
<Compile Include="Actions\ActionIODigital.cs" />
<Compile Include="Actions\ActionMessage.cs" />
<Compile Include="Actions\ActionMotionMode.cs" />
<Compile Include="Actions\ActionPrecision.cs" />
<Compile Include="Actions\ActionPushPop.cs" />
<Compile Include="Actions\ActionRotation.cs" />
<Compile Include="Actions\ActionSpeed.cs" />
<Compile Include="Actions\ActionTemperature.cs" />
<Compile Include="Actions\ActionTransformation.cs" />
<Compile Include="Actions\ActionTranslation.cs" />
<Compile Include="Actions\ActionWait.cs" />
<Compile Include="Actions\ActionExternalAxis.cs" />
<Compile Include="Attributes\ParseableFromString.cs" />
<Compile Include="Compilers\CompilerMACHINA.cs" />
<Compile Include="Compilers\CompilerZMORPH.cs" />
<Compile Include="Compilers\CompilerKUKA.cs" />
<Compile Include="Compilers\CompilerUR.cs" />
<Compile Include="Compilers\CompilerABB.cs" />
<Compile Include="Compilers\CompilerHuman.cs" />
<Compile Include="Controllers\ControlFactory.cs" />
<Compile Include="Controllers\ControlManager.cs" />
<Compile Include="Controllers\OfflineControlManager.cs" />
<Compile Include="Controllers\StreamControlManager.cs" />
<Compile Include="Drivers\Communication\Protocols\KUKACommunicationProtocol.cs" />
<Compile Include="Drivers\Communication\Protocols\URCommunicationProtocol.cs" />
<Compile Include="Drivers\Communication\RobotStudioManager.cs" />
<Compile Include="Drivers\Communication\TCPCommunicationManagerKUKA.cs" />
<Compile Include="Drivers\Communication\TCPCommunicationManagerUR.cs" />
<Compile Include="Drivers\Communication\TCPCommunicationManagerABB.cs" />
<Compile Include="Drivers\Driver.cs" />
<Compile Include="Drivers\DriverKUKA.cs" />
<Compile Include="Drivers\DriverUR.cs" />
<Compile Include="Drivers\DriverABB.cs" />
<Compile Include="Drivers\DriverOffline.cs" />
<Compile Include="Drivers\Communication\Protocols\ABBCommunicationProtocol.cs" />
<Compile Include="Drivers\Communication\Protocols\Factory.cs" />
<Compile Include="Drivers\Communication\Protocols\Base.cs" />
<Compile Include="Enums.cs" />
<Compile Include="EventArgs\ActionExecutedArgs.cs" />
<Compile Include="EventArgs\ActionIssuedArgs.cs" />
<Compile Include="EventArgs\ActionReleasedArgs.cs" />
<Compile Include="EventArgs\MachinaEventArgs.cs" />
<Compile Include="EventArgs\MotionUpdateArgs.cs" />
<Compile Include="Interfaces.cs" />
<Compile Include="IO\IO.cs" />
<Compile Include="Logger.cs" />
<Compile Include="Net\Net.cs" />
<Compile Include="Types\Geometry\AxisAngle.cs" />
<Compile Include="Types\Geometry\ExternalAxes.cs" />
<Compile Include="Types\Data\RobotProgramFile.cs" />
<Compile Include="Types\Geometry\Orientation.cs" />
<Compile Include="Types\Geometry\Geometry.cs" />
<Compile Include="Types\Geometry\Plane.cs" />
<Compile Include="Types\Data\RobotProgram.cs" />
<Compile Include="Types\Geometry\Rotation.cs" />
<Compile Include="Types\Geometry\t_CoordinateSystem.cs" />
<Compile Include="Types\Geometry\Joints.cs" />
<Compile Include="Types\Geometry\Point.cs" />
<Compile Include="Types\Geometry\t_Frame.cs" />
<Compile Include="Types\Geometry\t_Path.cs" />
<Compile Include="Types\Geometry\t_Rotation.cs" />
<Compile Include="Types\Geometry\t_SpatialTrigger.cs" />
<Compile Include="Types\Geometry\Vector.cs" />
<Compile Include="Types\Geometry\YawPitchRoll.cs" />
<Compile Include="Types\Geometry\RotationMatrix.cs" />
<Compile Include="Types\Geometry\Quaternion.cs" />
<Compile Include="Types\Geometry\RotationVector.cs" />
<Compile Include="SettingsBuffer.cs" />
<Compile Include="Drivers\OldDriver.cs" />
<Compile Include="Control.cs" />
<Compile Include="Compilers\Compiler.cs" />
<Compile Include="Robot.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RobotCursor.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Tools\Tool.cs" />
<Compile Include="Users\User.cs" />
<Compile Include="Utilities\FileIO.cs" />
<Compile Include="Utilities\Parsing.cs" />
<Compile Include="Utilities\Strings.cs" />
<Compile Include="Utilities\Conversion.cs" />
<Compile Include="Utilities\Numeric.cs" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx" />
<EmbeddedResource Include="Resources\DriverModules\UR\machina_ur_driver.script" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -202,23 +64,15 @@
<ItemGroup>
<EmbeddedResource Include="Resources\DriverModules\KUKA\machina_kuka_driver.dat" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>REM JL: for the time being, only copy ddlls manually to avoid breaking the dependent projects
REM IF ($(ConfigurationName)) == (Debug) GOTO END
REM cd $(ProjectDir)
REM copy /y bin\Release\Machina.dll "D:\Dropbox\Jose Luis\code\MachinaDynamo\package\Machina\bin"
REM :END</PostBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ItemGroup>
<Reference Include="ABB.Robotics.Controllers.PC">
<HintPath>assemblies\ABB.Robotics.Controllers.PC.dll</HintPath>
</Reference>
<Reference Include="RobotStudio.Services.RobApi">
<HintPath>assemblies\RobotStudio.Services.RobApi.dll</HintPath>
</Reference>
<Reference Include="RobotStudio.Services.RobApi.Desktop">
<HintPath>assemblies\RobotStudio.Services.RobApi.Desktop.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
23 changes: 0 additions & 23 deletions src/Machina/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Machina")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Machina")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -21,16 +11,3 @@

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("12d4098e-2f9e-4e15-892b-fded71da4b47")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
63 changes: 0 additions & 63 deletions src/Machina/Properties/Resources.Designer.cs

This file was deleted.

22 changes: 22 additions & 0 deletions src/Machina/Utilities/Conversion.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using Machina.Types.Geometry;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

// ██╗ ██╗████████╗██╗██╗ ██╗████████╗██╗███████╗███████╗
// ██║ ██║╚══██╔══╝██║██║ ██║╚══██╔══╝██║██╔════╝██╔════╝
Expand Down Expand Up @@ -132,6 +134,26 @@ public static int[] ByteArrayToInt32Array(byte[] bytes, int byteCount = 0, bool
return d;
}

/// <summary>
/// Takes a Newtonsoft.Json JToken and converts it into an array of nullable doubles.
/// This is replacement for the NullableDoublesFromObjects function in .NetStandard and above.
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment states "This is replacement for the NullableDoublesFromObjects function in .NetStandard and above" but this is confusing. The new ToNullableDoubles function actually works alongside NullableDoublesFromObjects (it calls it internally). The comment should clarify that this provides a convenient wrapper for JSON parsing scenarios in .NET Standard 2.0, rather than saying it's a replacement.

Suggested change
/// This is replacement for the NullableDoublesFromObjects function in .NetStandard and above.
/// Provides a convenient wrapper around NullableDoublesFromObjects for JSON parsing scenarios
/// (for example when working with JSON in .NET Standard 2.0), rather than replacing it.

Copilot uses AI. Check for mistakes.
/// </summary>
/// <param name="token"></param>
/// <returns></returns>
public static double?[] ToNullableDoubles(JToken token)
{
if (token == null || token.Type == JTokenType.Null)
return null;

if (token.Type == JTokenType.Array)
{
// Convert JArray → object[] → existing Machina utility
object[] objs = token.ToObject<object[]>();
return Machina.Utilities.Conversion.NullableDoublesFromObjects(objs);
}

throw new JsonException("Expected array or null, got " + token.Type);
}

/// <summary>
/// Quick conversion for wobjs, but totally dislike this here. Mmmm...
Expand Down
2 changes: 1 addition & 1 deletion src/Sample Projects/EXAMPLE_ConnectionCheck/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/>
</startup>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EXAMPLE_ConnectionCheck</RootNamespace>
<AssemblyName>EXAMPLE_ConnectionCheck</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
Expand Down
2 changes: 1 addition & 1 deletion src/Sample Projects/EXAMPLE_KeyboardControl/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/>
</startup>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>EXAMPLE_KeyboardControl</RootNamespace>
<AssemblyName>EXAMPLE_KeyboardControl</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
Expand Down
Loading
Loading