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

add Rhino8 fakes #35

Open
wants to merge 1 commit into
base: main
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions Speckle.Host.Apis.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Revit2022.Fakes", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Revit2022.Fakes.Generator", "Speckle.Revit2022.Fakes.Generator\Speckle.Revit2022.Fakes.Generator.csproj", "{D2BD6A79-F43C-4D2C-A6AF-BEA5E91A380F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Rhino8.Fakes.Generator", "Speckle.Rhino8.Fakes.Generator\Speckle.Rhino8.Fakes.Generator.csproj", "{EDAB9556-9121-4EA7-81D9-56D18605322A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Rhino8.Fakes", "Speckle.Rhino8.Fakes\Speckle.Rhino8.Fakes.csproj", "{B4586179-DE2E-40E2-AA36-0AB18B3D8517}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -83,6 +87,14 @@ Global
{D2BD6A79-F43C-4D2C-A6AF-BEA5E91A380F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2BD6A79-F43C-4D2C-A6AF-BEA5E91A380F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2BD6A79-F43C-4D2C-A6AF-BEA5E91A380F}.Release|Any CPU.Build.0 = Release|Any CPU
{EDAB9556-9121-4EA7-81D9-56D18605322A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDAB9556-9121-4EA7-81D9-56D18605322A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDAB9556-9121-4EA7-81D9-56D18605322A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDAB9556-9121-4EA7-81D9-56D18605322A}.Release|Any CPU.Build.0 = Release|Any CPU
{B4586179-DE2E-40E2-AA36-0AB18B3D8517}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B4586179-DE2E-40E2-AA36-0AB18B3D8517}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B4586179-DE2E-40E2-AA36-0AB18B3D8517}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B4586179-DE2E-40E2-AA36-0AB18B3D8517}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{00F3BEC6-614D-4AEE-923A-0E2DF40FDE6B} = {42C36267-88A8-4F94-9E62-5D43A02D033C}
Expand All @@ -95,5 +107,7 @@ Global
{F97FB46C-223C-4818-8A5A-330E897F4FC0} = {3B0D8F6E-C701-446E-BAE3-B6FDF1812901}
{662B3B4B-5B46-4507-9A39-3320E82AD459} = {BD68BFA8-3EC7-4689-987E-6422A37CF3B0}
{D2BD6A79-F43C-4D2C-A6AF-BEA5E91A380F} = {3B0D8F6E-C701-446E-BAE3-B6FDF1812901}
{EDAB9556-9121-4EA7-81D9-56D18605322A} = {3B0D8F6E-C701-446E-BAE3-B6FDF1812901}
{B4586179-DE2E-40E2-AA36-0AB18B3D8517} = {F2F213A8-6D57-492F-BA11-C9F26057B1DA}
EndGlobalSection
EndGlobal
51 changes: 51 additions & 0 deletions Speckle.Rhino8.Fakes.Generator/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Reflection;
using Speckle.Shared;

var asm = Assembly.GetEntryAssembly().NotNull();
Assembly GetAssembly(string name)
{
var path = Path.Combine("C:\\Users\\adam\\.nuget\\packages\\rhinocommon\\8.12.24282.7001\\lib\\net48", name);
return Assembly.ReflectionOnlyLoadFrom(path);
}

Generator generator =
new(
"Speckle.Rhino8.Fakes",
[GetAssembly("RhinoCommon.dll")],
[
"Rhino",
"Rhino.Geometry",
"Rhino.Collections",
"Rhino.Runtime",
"Rhino.DocObjects",
"Rhino.Commands",
"Rhino.Render",
"Rhino.Display",
"Rhino.Geometry.Collections",
"Rhino.FileIO",
],
[
new("HostUtils", [new("GetCustomComputeEndpoints")]),
new("LinearDimension", [new("AnnotationType")]),
new("InstanceDefinition", [new("ComponentType")]),
new("Polyline", [new("Duplicate"), new("System.ICloneable.Clone")]),
new("RadialDimension", [new("AnnotationType")]),
new("MaterialRefs", [new("CopyTo")]),
new("PersistentSettingsConverter", [new("TryParseStringDictionary"), new("ToString")]),
new(
"PersistentSettings",
[new("TryGetStringDictionary"), new("GetStringDictionary"), new("SetStringDictionary"), new("SetDefault")]
),
new("Dimension", [new("TextFormula")]),
new("CreatePreviewEventArgs", [new("Objects")]),
new("RunCommandDelegate", []),
new("ArchivableDictionary", []),
new("RenderMaterial", [new("HandleTexturedValue")]),
new("CustomRenderMeshProvider2", [new("BoundingBox")]),
new("Color4f", [new("GetObjectData")]),
new("Point3dList", [new("Duplicate"), new("System.ICloneable.Clone")]),
new("File3dmCommonComponentTable`1", [new("System.Collections.Generic.ICollection<T>.Add")]),
new("GripObject", [new("GetSurfaceCVIndices")]),
]
);
generator.Generate();
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>
<Import Project="..\Speckle.Shared\Speckle.Shared.projitems" Label="Shared" />
<ItemGroup>
<PackageReference Include="RhinoCommon" IncludeAssets="compile;build" VersionOverride="8.12.24282.7001" />
<PackageReference Include="RhinoWindows" IncludeAssets="compile;build" VersionOverride="8.12.24282.7001" />
</ItemGroup>
</Project>
55 changes: 55 additions & 0 deletions Speckle.Rhino8.Fakes.Generator/packages.lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"MinVer": {
"type": "Direct",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+/SsmiySsXJlvQLCGBqaZKNVt3s/Y/HbAdwtop7Km2CnuZbaScoqkWJEBQ5Cy9ebkn6kCYKrHsXgwrFdTgcb3g=="
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"RhinoCommon": {
"type": "Direct",
"requested": "[8.12.24282.7001, )",
"resolved": "8.12.24282.7001",
"contentHash": "HdIcUKKrpJ/9crWMY2R4wNHPK355jhaEpjPbMFC9qD5QpuBUO5U8roi8OdHgE9/u2Fd1L//tAboSlOrQGPKcYA=="
},
"RhinoWindows": {
"type": "Direct",
"requested": "[8.12.24282.7001, )",
"resolved": "8.12.24282.7001",
"contentHash": "VxebZT9TIZrTG09RycmogLfnfPiX53oJZ40jIvlIoYtehBFZ5e3eESJCO4BvXTvmlAjU6KCDGxMEkus56lfT3w==",
"dependencies": {
"RhinoCommon": "[8.12.24282.7001]"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
}
},
".NETFramework,Version=v4.8/win7-x86": {}
}
}
15 changes: 15 additions & 0 deletions Speckle.Rhino8.Fakes/IndexPair.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Rhino;

public partial class IndexPair
{
int System.Collections.Generic.IList<System.Int32>.this[int x]
{
get => throw new System.NotImplementedException();
set { }
}

int System.Collections.Generic.IReadOnlyList<int>.this[int x]
{
get => throw new System.NotImplementedException();
}
}
6 changes: 6 additions & 0 deletions Speckle.Rhino8.Fakes/MaterialRefs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Rhino.DocObjects;

public partial class MaterialRefs
{
public void CopyTo(KeyValuePair<Guid, MaterialRef>[] array, int arrayIndex) => throw new NotImplementedException();
}
10 changes: 10 additions & 0 deletions Speckle.Rhino8.Fakes/RhinoList.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Rhino.Collections;

public partial class RhinoList<T>
{
T System.Collections.Generic.IList<T>.this[int x]
{
get => throw new System.NotImplementedException();
set { }
}
}
10 changes: 10 additions & 0 deletions Speckle.Rhino8.Fakes/SHA1OpenNURBS.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Rhino.FileIO;

public partial class SHA1OpenNURBS
{
protected override void HashCore(byte[] array, int ibStart, int cbSize) => throw new NotImplementedException();

protected override byte[] HashFinal() => throw new NotImplementedException();

public override void Initialize() => throw new NotImplementedException();
}
10 changes: 10 additions & 0 deletions Speckle.Rhino8.Fakes/Speckle.Rhino8.Fakes.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>true</IsPackable>
<Nullable>disable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Drawing.Common" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions Speckle.Rhino8.Fakes/generated/Rhino.AngleUnitSystem.s.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Rhino;

public enum AngleUnitSystem
{
None,
Turns,
Radians,
Degrees,
Minutes,
Seconds,
Gradians,
Unset,
}
9 changes: 9 additions & 0 deletions Speckle.Rhino8.Fakes/generated/Rhino.AntialiasLevel.s.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Rhino;

public enum AntialiasLevel
{
None,
Draft,
Good,
High,
}
23 changes: 23 additions & 0 deletions Speckle.Rhino8.Fakes/generated/Rhino.BitmapExtensions.s.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace Rhino;

public partial class BitmapExtensions
{
public BitmapExtensions() { }

public static System.Boolean IsNormalMap(
System.Drawing.Bitmap bitmap,
System.Boolean bLossyCompressionSource,
out System.Boolean bPositiveZComponent
) => throw new System.NotImplementedException();

public static System.Drawing.Bitmap ConvertToNormalMap(
System.Drawing.Bitmap bitmap,
System.Boolean bLossyCompressionSource,
out System.Boolean bPositiveZComponent
) => throw new System.NotImplementedException();

public static Rhino.FileIO.FileReference BitmapAsTextureFileReference(
System.Drawing.Bitmap bitmap,
System.UInt32 crc
) => throw new System.NotImplementedException();
}
40 changes: 40 additions & 0 deletions Speckle.Rhino8.Fakes/generated/Rhino.Collections.CurveList.s.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
namespace Rhino.Collections;

public partial class CurveList : Rhino.Collections.RhinoList<Rhino.Geometry.Curve>
{
public CurveList() { }

public CurveList(System.Int32 initialCapacity) => throw new System.NotImplementedException();

public CurveList(System.Collections.Generic.IEnumerable<Rhino.Geometry.Curve> collection) =>
throw new System.NotImplementedException();

public virtual void Add(Rhino.Geometry.Line line) => throw new System.NotImplementedException();

public virtual void Add(Rhino.Geometry.Circle circle) => throw new System.NotImplementedException();

public virtual void Add(Rhino.Geometry.Arc arc) => throw new System.NotImplementedException();

public virtual void Add(System.Collections.Generic.IEnumerable<Rhino.Geometry.Point3d> polyline) =>
throw new System.NotImplementedException();

public virtual void Add(Rhino.Geometry.Ellipse ellipse) => throw new System.NotImplementedException();

public virtual void Insert(System.Int32 index, Rhino.Geometry.Line line) =>
throw new System.NotImplementedException();

public virtual void Insert(System.Int32 index, Rhino.Geometry.Circle circle) =>
throw new System.NotImplementedException();

public virtual void Insert(System.Int32 index, Rhino.Geometry.Arc arc) => throw new System.NotImplementedException();

public virtual void Insert(
System.Int32 index,
System.Collections.Generic.IEnumerable<Rhino.Geometry.Point3d> polyline
) => throw new System.NotImplementedException();

public virtual void Insert(System.Int32 index, Rhino.Geometry.Ellipse ellipse) =>
throw new System.NotImplementedException();

public virtual System.Boolean Transform(Rhino.Geometry.Transform xform) => throw new System.NotImplementedException();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Rhino.Collections;

public partial interface IResizableList<T>
{
public System.Int32 Count { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Rhino.Collections;

public partial interface IRhinoTable<T>
{
public System.Int32 Count { get; }
public T this[System.Int32 index] { get; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Rhino.Collections;

public partial class Point3dList
{
public partial class XAccess
{
public XAccess() { }

public virtual System.Double this[System.Int32 index]
{
get => throw new System.NotImplementedException();
set { }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Rhino.Collections;

public partial class Point3dList
{
public partial class YAccess
{
public YAccess() { }

public virtual System.Double this[System.Int32 index]
{
get => throw new System.NotImplementedException();
set { }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Rhino.Collections;

public partial class Point3dList
{
public partial class ZAccess
{
public ZAccess() { }

public virtual System.Double this[System.Int32 index]
{
get => throw new System.NotImplementedException();
set { }
}
}
}
Loading