This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace CommonStuff | |
open Microsoft.FSharp.Reflection | |
open System | |
open System.Text | |
open System.Collections.Generic | |
open System.Linq | |
open System.Drawing | |
open System.Windows.Forms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Runtime.InteropServices; | |
using Rhino.Render; | |
using Rhino.Geometry; | |
using Rhino.UI; | |
using Rhino.DocObjects; | |
using Rhino.Commands; | |
using Rhino; | |
using System.Drawing; | |
using Rhino.Display; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace GhFsharpTest | |
open Grasshopper.Kernel | |
open Grasshopper.Kernel.Types | |
type Priority() = | |
inherit GH_AssemblyPriority() | |
override u.PriorityLoad() = | |
GH_LoadingInstruction.Proceed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Rhino; | |
using Rhino.Commands; | |
using Rhino.Geometry; | |
using Rhino.Input; | |
using Rhino.Input.Custom; | |
namespace MaterialTextureEvaluator | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int ShootRayOnCollection(ON_3dPoint point, ON_3dVector direction, | |
const ON_SimpleArray<const ON_Geometry*>* pConstGeometryArray, | |
ON_SimpleArray<ON_3dPoint>* pPoints, int maxReflections) | |
{ | |
int rc = 0; | |
// Currently only supports surfaces and breps with untrimmed faces. | |
// Add support for meshes and trimmed breps | |
int count = pConstGeometryArray?pConstGeometryArray->Count():0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Copyright 2014-2019 Robert McNeel and Associates | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Copyright 2014-2017 Robert McNeel and Associates | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
pub fn build(b: *std.Build) void { | |
const target = b.standardTargetOptions(.{}); | |
const optimize = b.standardOptimizeOption(.{}); | |
const exe = b.addExecutable(.{ | |
.name = "raytrace", | |
.target = target, | |
.optimize = optimize, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using 0.14.0-dev.23 | |
Run on command-line: | |
zig build && ./zig-out/bin/raytrace > img.ppm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "C:/Program Files/Rhino 8/System/RhinoCommon.dll" | |
#r "nuget:Rhino.Scripting.Fsharp, 0.8.1" | |
open System | |
open Rhino.Scripting | |
open Rhino.Scripting.Fsharp //recommended for F# | |
open FsEx // part of Rhino.Scripting | |
type rs = RhinoScriptSyntax |