Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

share RhinoSupport test #47

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
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
90 changes: 58 additions & 32 deletions src/Plankton.sln
Original file line number Diff line number Diff line change
@@ -1,32 +1,58 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C# Express 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plankton", "Plankton\Plankton.csproj", "{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanktonGh", "PlanktonGh\PlanktonGh.csproj", "{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanktonTests", "PlanktonTests\PlanktonTests.csproj", "{8FC24017-EDF3-4747-B966-C29DBD18103F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Release|Any CPU.Build.0 = Release|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Release|Any CPU.Build.0 = Release|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Release|Any CPU.Build.0 = Release|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Release|Any CPU.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plankton", "Plankton\Plankton.csproj", "{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanktonGh", "PlanktonGh\PlanktonGh.csproj", "{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanktonTests", "PlanktonTests\PlanktonTests.csproj", "{8FC24017-EDF3-4747-B966-C29DBD18103F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlanktonFold", "PlanktonFold\PlanktonFold.csproj", "{066DA097-92CE-4E8D-BE88-8C875AFDC204}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug32|Any CPU = Debug32|Any CPU
Debug64|Any CPU = Debug64|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug32|Any CPU.ActiveCfg = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug32|Any CPU.Build.0 = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug64|Any CPU.ActiveCfg = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Debug64|Any CPU.Build.0 = Debug|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}.Release|Any CPU.Build.0 = Release|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug32|Any CPU.ActiveCfg = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug32|Any CPU.Build.0 = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug64|Any CPU.ActiveCfg = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Debug64|Any CPU.Build.0 = Debug|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C7EA9A3-331B-4574-BF22-B9D609DE2F1E}.Release|Any CPU.Build.0 = Release|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug32|Any CPU.ActiveCfg = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug32|Any CPU.Build.0 = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug64|Any CPU.ActiveCfg = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Debug64|Any CPU.Build.0 = Debug|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8FC24017-EDF3-4747-B966-C29DBD18103F}.Release|Any CPU.Build.0 = Release|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Debug|Any CPU.ActiveCfg = Debug64|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Debug|Any CPU.Build.0 = Debug64|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Debug32|Any CPU.ActiveCfg = Debug32|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Debug32|Any CPU.Build.0 = Debug32|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Debug64|Any CPU.ActiveCfg = Debug64|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Debug64|Any CPU.Build.0 = Debug64|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Release|Any CPU.ActiveCfg = Release|Any CPU
{066DA097-92CE-4E8D-BE88-8C875AFDC204}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
136 changes: 77 additions & 59 deletions src/Plankton/Plankton.csproj
Original file line number Diff line number Diff line change
@@ -1,60 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Plankton</RootNamespace>
<AssemblyName>Plankton</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</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>4</WarningLevel>
</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\Plankton.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PlanktonFace.cs" />
<Compile Include="PlanktonFaceList.cs" />
<Compile Include="PlanktonHalfedge.cs" />
<Compile Include="PlanktonHalfedgeList.cs" />
<Compile Include="PlanktonMesh.cs" />
<Compile Include="PlanktonVertex.cs" />
<Compile Include="PlanktonVertexList.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PlanktonXYZ.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{BDD288F7-C2E2-4C2A-B083-E4D4D21F528F}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Plankton</RootNamespace>
<AssemblyName>Plankton</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\..\..\..\AppData\Roaming\Grasshopper\Libraries\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</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\Plankton.xml</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="MathNet.Numerics, Version=3.16.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MathNet.Numerics.3.16.0\lib\net40\MathNet.Numerics.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="RhinoCommon">
<HintPath>..\..\..\..\..\..\..\Program Files\Rhinoceros 5 (64-bit)\System\RhinoCommon.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PlanktonFace.cs" />
<Compile Include="PlanktonFaceList.cs" />
<Compile Include="PlanktonHalfedge.cs" />
<Compile Include="PlanktonHalfedgeList.cs" />
<Compile Include="PlanktonMesh.cs" />
<Compile Include="PlanktonVertex.cs" />
<Compile Include="PlanktonVertexList.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="PlanktonXYZ.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="PlanktonDiagram.cd" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</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>
-->
</Project>
63 changes: 63 additions & 0 deletions src/Plankton/PlanktonDiagram.cd
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="Plankton.PlanktonFace">
<Position X="0.5" Y="0.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAABAAAAAAAAAAAAAgBAAAAAAAAAAAAAAAAACAAAAAA=</HashCode>
<FileName>PlanktonFace.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Plankton.PlanktonFaceList">
<Position X="3" Y="0.5" Width="2.5" />
<TypeIdentifier>
<HashCode>AAIABUEAAAAgALAACAAACgQggAAAQAAEQAABAABAAAA=</HashCode>
<FileName>PlanktonFaceList.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="Plankton.PlanktonHalfedge">
<Position X="5.75" Y="0.5" Width="2.25" />
<TypeIdentifier>
<HashCode>AAABAAAAAAAAAAAAAgBAAAAACAAAAAIAAAAACAAAABA=</HashCode>
<FileName>PlanktonHalfedge.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Plankton.PlanktonHalfEdgeList">
<Position X="8.25" Y="0.5" Width="2.5" />
<TypeIdentifier>
<HashCode>AAICAAEAAAAggBAADAAACgQEggAAAAAEwgBBABABEAE=</HashCode>
<FileName>PlanktonHalfedgeList.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Class Name="Plankton.PlanktonMesh">
<Position X="0.5" Y="7.75" Width="2.25" />
<TypeIdentifier>
<HashCode>AAAAAIAAEAAAAAAAAQAAIAgAAAAAAEAAEAoAAIAAgAA=</HashCode>
<FileName>PlanktonMesh.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Plankton.PlanktonVertex">
<Position X="11" Y="0.5" Width="1.75" />
<TypeIdentifier>
<HashCode>AAAFAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAACQAAYAE=</HashCode>
<FileName>PlanktonVertex.cs</FileName>
</TypeIdentifier>
</Class>
<Class Name="Plankton.PlanktonVertexList">
<Position X="13" Y="0.5" Width="2" />
<TypeIdentifier>
<HashCode>CAIAAIIAECAgEBAECAAACAQgwAKAAAAFwACFAAAACAE=</HashCode>
<FileName>PlanktonVertexList.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" />
</Class>
<Struct Name="Plankton.PlanktonXYZ">
<Position X="5" Y="7.75" Width="1.5" />
<TypeIdentifier>
<HashCode>gAAAAAAJAAQAAAAE4AEAAABAAQAAAIAAAAIAAEAAYiE=</HashCode>
<FileName>PlanktonXYZ.cs</FileName>
</TypeIdentifier>
</Struct>
<Font Name="Microsoft JhengHei UI" Size="9" />
</ClassDiagram>
78 changes: 40 additions & 38 deletions src/Plankton/PlanktonFace.cs
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
using System;

namespace Plankton
{
/// <summary>
/// Represents a face in Plankton's halfedge mesh data structure.
/// </summary>
public class PlanktonFace
{
public int FirstHalfedge;

public PlanktonFace()
{
this.FirstHalfedge = -1;
}

internal PlanktonFace(int halfedgeIndex)
{
this.FirstHalfedge = halfedgeIndex;
}

/// <summary>
/// Gets an unset PlanktonFace. Unset faces have -1 for their first halfedge index.
/// </summary>
public static PlanktonFace Unset
{
get { return new PlanktonFace() { FirstHalfedge = -1 }; }
}

/// <summary>
/// Whether or not the face is currently being referenced in the mesh.
/// </summary>
public bool IsUnused { get { return (this.FirstHalfedge < 0); } }

[Obsolete()]
public bool Dead { get { return this.IsUnused; } }
}
}
using System;

namespace Plankton
{
/// <summary>
/// Represents a face in Plankton's halfedge mesh data structure.
/// </summary>
public class PlanktonFace
{
public int FirstHalfedge;
public int Index;


public PlanktonFace()
{
this.FirstHalfedge = -1;
}

internal PlanktonFace(int halfedgeIndex)
{
this.FirstHalfedge = halfedgeIndex;
}

/// <summary>
/// Gets an unset PlanktonFace. Unset faces have -1 for their first halfedge index.
/// </summary>
public static PlanktonFace Unset
{
get { return new PlanktonFace() { FirstHalfedge = -1 }; }
}

/// <summary>
/// Whether or not the face is currently being referenced in the mesh.
/// </summary>
public bool IsUnused { get { return (this.FirstHalfedge < 0); } }

[Obsolete()]
public bool Dead { get { return this.IsUnused; } }
}
}
Loading