-
-
Save goswinr/10f1c5b8e4e78ed7c63b2ad57224a70f to your computer and use it in GitHub Desktop.
Revisions
-
jesterKing revised this gist
Jul 20, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type Priority() = type Info() = inherit GH_AssemblyInfo() override u.Name = "GhFsharpTest" override u.Description = "Quick F# test, NOP component. Sets output to whatever is in the input." override u.Id = new System.Guid("43472a26-58ad-44a8-9948-137a7eaf3ada") // DON'T USE THIS PARTICULAR GUID override u.AuthorName = "Nathan 'jesterKing' Letwory" override u.AuthorContact = "nathan@mcneel.com" -
jesterKing revised this gist
Jul 20, 2018 . 1 changed file with 0 additions and 10 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -39,14 +39,4 @@ type NopTest() = | _ -> () override u.ComponentGuid = new System.Guid("94b16908-64a8-4562-a634-c9227582e99d") // DON'T USE THIS PARTICULAR GUID () -
jesterKing revised this gist
Jul 20, 2018 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ type Info() = inherit GH_AssemblyInfo() override u.Name = "GhFsharpTest" override u.Description = "Quick F# test, NOP component" override u.Id = new System.Guid("43472a26-58ad-44a8-9948-137a7eaf3ada") // DON'T USE THIS PARTICULAR GUID override u.AuthorName = "Nathan 'jesterKing' Letwory" override u.AuthorContact = "nathan@mcneel.com" @@ -38,7 +38,7 @@ type NopTest() = () | _ -> () override u.ComponentGuid = new System.Guid("94b16908-64a8-4562-a634-c9227582e99d") // DON'T USE THIS PARTICULAR GUID () override u.SolveInstance(DA: IGH_DataAccess) = @@ -49,6 +49,4 @@ type NopTest() = if r then DA.SetData(outpidx, qc) |> ignore | _ -> () () -
jesterKing revised this gist
Apr 27, 2018 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -24,10 +24,21 @@ type NopTest() = override u.RegisterInputParams(mgr: GH_Component.GH_InputParamManager) = inpidx <- mgr.AddGenericParameter("I","I","Generic Input",GH_ParamAccess.item) u.Params.Input.[inpidx].Optional <- true override u.RegisterOutputParams(mgr: GH_Component.GH_OutputParamManager) = outpidx <- mgr.AddGenericParameter("O", "O", "Generic Output", GH_ParamAccess.item) override u.SolveInstance(DA: IGH_DataAccess) = match u.Params.Input.[inpidx].SourceCount > 0 with | true -> let mutable (qc:IGH_Goo) = null let r = DA.GetData(inpidx, &qc) if r then DA.SetData(outpidx, qc) |> ignore () | _ -> () override u.ComponentGuid = new System.Guid("94b16908-64a8-4562-a634-c9227582e99d") () override u.SolveInstance(DA: IGH_DataAccess) = -
jesterKing revised this gist
Apr 27, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ type NopTest() = override u.SolveInstance(DA: IGH_DataAccess) = match u.Params.Input.[inpidx].SourceCount > 0 with | true -> let mutable (qc:IGH_Goo) = null let r = DA.GetData(inpidx, &qc) if r then DA.SetData(outpidx, qc) |> ignore -
jesterKing created this gist
Apr 27, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ namespace GhFsharpTest open Grasshopper.Kernel open Grasshopper.Kernel.Types type Priority() = inherit GH_AssemblyPriority() override u.PriorityLoad() = GH_LoadingInstruction.Proceed type Info() = inherit GH_AssemblyInfo() override u.Name = "GhFsharpTest" override u.Description = "Quick F# test, NOP component" override u.Id = new System.Guid("43472a26-58ad-44a8-9948-137a7eaf3ada") override u.AuthorName = "Nathan 'jesterKing' Letwory" override u.AuthorContact = "nathan@mcneel.com" type NopTest() = inherit GH_Component("F#Ex", "F#Ex", "Example Component in F#", "Test", "F#") let mutable inpidx = 0 let mutable outpidx = 0 override u.RegisterInputParams(mgr: GH_Component.GH_InputParamManager) = inpidx <- mgr.AddGenericParameter("I","I","Generic Input",GH_ParamAccess.item) u.Params.Input.[inpidx].Optional <- true () override u.RegisterOutputParams(mgr: GH_Component.GH_OutputParamManager) = outpidx <- mgr.AddGenericParameter("O", "O", "Generic Output", GH_ParamAccess.item) () override u.SolveInstance(DA: IGH_DataAccess) = match u.Params.Input.[inpidx].SourceCount > 0 with | true -> let mutable (qc:IGH_QuickCast) = null let r = DA.GetData(inpidx, &qc) if r then DA.SetData(outpidx, qc) |> ignore | _ -> () () override u.ComponentGuid = new System.Guid("94b16908-64a8-4562-a634-c9227582e99d")