Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all 8539 articles
Browse latest View live

Mesh from Extrusion


C# Full Examples

$
0
0

Any full script examples (not through GH node)? Fooling around with a few things today, always great to read through some quality C# plugins. Thanks!

10 posts - 5 participants

Read full topic

Eto.Drawing.Grapics.Clear() bug

$
0
0

Hello @curtisw, @dale,

I need to generate a large amount of color swatches (bitmaps) to be used in a GridView. In order to create them, i tried to build the bitmap like this:

bitmap = Eto.Drawing.Bitmap(20, 20, Eto.Drawing.PixelFormat.Format32bppRgb)
color = Eto.Drawing.Colors.AliceBlue
graphics = Eto.Drawing.Graphics(bitmap)
graphics.Clear(color)

The process to create 6 empty bitmaps (20x20 pixels) like above, takes 6 seconds which cannot be right. So i tried to clear the graphics with a solid brush like this:

bitmap = Eto.Drawing.Bitmap(20, 20, Eto.Drawing.PixelFormat.Format32bppRgb)
color = Eto.Drawing.Colors.AliceBlue
brush = Eto.Drawing.SolidBrush(color)
graphics = Eto.Drawing.Graphics(bitmap)
graphics.Clear(brush)

without any change in speed. So i tried to draw a rectangle in my color into the graphics object which seems to work very fast:

bitmap = Eto.Drawing.Bitmap(20, 20, Eto.Drawing.PixelFormat.Format32bppRgb)
color = Eto.Drawing.Colors.Red
brush = Eto.Drawing.SolidBrush(color)
graphics = Eto.Drawing.Graphics(bitmap)
rectangle = Eto.Drawing.Rectangle(0, 0, 12, 12)
graphics.FillRectangle(brush, rectangle)

but the result is a black bitmap unless i add this at the end:

graphics.Dispose()

As soon as this line is added, the bitmap creation process runs as slow as before. Running out of ideas, i’ve used bitmap.SetPixel(x,y,color) in a double nested loop as reported here which seems to run slightly faster but with more than 100 swatches to generate, takes too long to be usable.

How can i generate these color swatches fast enough ?

thanks,
c.

1 post - 1 participant

Read full topic

Can't get Eto Form to show

$
0
0

Hi, I’m trying to get an Eto form to show called by a script, but I get an “empty” form:
Untitled

Here’s are the excerpts from the three scripts I’m using.
I’m importing all the necessary modules (designated by “import ...”).
I created dialogs before that did work, but in one script, so not divided over several scripts.
I think therein lies the problem …

Can anybody help me fix this?

MAIN SCRIPT

import points as p
p.add_points()

POINTS MODULE

import ...
import interface as i

points_list = []

def add_points():
    ...
    create_point()

def create_point():
    dialog = AddPoint()
    dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)
    print points_list

class AddPoint(Eto.Forms.Dialog):
    def __INIT__(self):
        ...
        self.point_name = i.txb(None)
        button_ok = i.btn('OK')
        botton_ok.Click += self.button_ok_click
        ...
        layout = i.dyn()
        layout.AddSeparateRow(i.lbl('Name:', self.point_name)
        layout.AddSeparateRow(button_ok, ...)
        self.Content = layout

    def button_ok_click():
        global points_list
        name = self.point_name.Text
        points_list.append(name)
        self.Close()

INTERFACE SCRIPT

import ...

def btn(...):
    # define button

def dyn(...):
    # define dynamic layout

def lbl(...):
    # define label

def txb(...):
    # define text box

@nathanletwory, @curtisw, I hope you don’t mind me adding you to my post, but you helped me a lot in the past and I hope one of you can tell me what I’m doing wrong. Thanks.

3 posts - 2 participants

Read full topic

How reach Grasshopper list values in Rhino Plugin

$
0
0

Hi everyone,

I was trying to use some grasshopper-based analysis results in my native Rhino Plugin. Let’s assume I want to use this data as some Head-Up Display using with DisplayConduits.

When I try to reach values using with this code; (It was just for test)

  string componentName = "";
  RhinoGet.GetString("Which component do you want to search?", false, ref componentName);
  ComponentFunctionInfo component = Components.FindComponent(componentName);
  string result = component.OutputDescriptions[0];
  Console.WriteLine(result );

When I debug this code lines in Rhino typing componentName,
Although component exist in Grasshopper with its name, Components.FindComponent function returns null.

What am I missing?

Thanks in advence,
-Oğuzhan

2 posts - 1 participant

Read full topic

How to get instance visibility when its ON::idef_object

$
0
0

Hi, I’m reading a 3dm file, but have some instance visible that should not be. how can i get an object visibility, while model_geometry->Mode() == ON::idef_object ?
Thanks in advance.
#C++

4 posts - 3 participants

Read full topic

Information about Breps

$
0
0

Hi guys!
I would like to learn everything about Breps:

  • What they are
  • What’s inside them
  • How they can be analyzed and edited
    Can you please suggest some links / books / whatever useful to find information?
    Thanks a lot! :slight_smile:

1 post - 1 participant

Read full topic

Rhino Plugin Installer to Install on Specific location

$
0
0

Hi Team,

we have a Rhino common plugin developed using c#.
we use to zip all the depended configuration files along with the rhp to create the installer .rhi extension by renaming it , installation works perfectly fine.

Our plugin need to connect to our api every time it launches and download and write a xml file .
There are some users those who are not admin on their machines, plugin is crashing for them.
The plugin is crashing because it not able to write file in the rhino folder “C:\Users******\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-inspluginname (6cef8511-a474-4679-af71-f4e919de7a76)\s”

is there any way we can customise the rhino installer to install it on a different drive or folder.
we cant get rid of this api call and downloading file at the moment.

can anyone suggest how to make installer which can point to custom location while installing?
if not , is there any other way to handle this apart from manual installation?

thanks,
Nevin

3 posts - 3 participants

Read full topic


Eto gridView binding to observableCollection (including a Rhino-crasher piece of sh.. code)

$
0
0

Hi @curtisw, all, I’m struggling to bind some custom class -CustomObj- properties to gridView DataCells in IronPython.

CustomObj class looks like this:

class CustomObj(System.Object):
    def __init__(self,name=None,obj=None,active=False,type=None):
        self._name = name
        self._obj = obj
        self._active = active
        self.type = type
    @property
    def name(self):
        return self._name
    @name.setter
    def name(self,value):
        self._name = value
    @property
    def obj(self):
        return self._obj
    @obj.setter
    def obj(self,value):
        self._obj = value
    @property
    def active(self):
        return self._active
    @active.setter
    def active(self,value):
        self._active = value

CustomObjs are stored in an instance of MyModel class, in various properties that are .net BindableCollections.

class MyModel():
    def __init__(self):
        self.views = System.Collections.ObjectModel.ObservableCollection[type(CustomObj())]()
        self.versions = System.Collections.ObjectModel.ObservableCollection[type(CustomObj())]()

    def add(self,customObj):
        if customObj.type == 'view':
            self.views.Add(customObj)
        elif customObj.type == 'version':
            self.versions.Add(customObj)

I finally create a dialogClass with a gridView, and assign one of the MyModels observableCollections as gridView’s DataStore. Now, I’m struggling to figure out how I can bind a property of each item of the observableCollection to DataCells.
I tried with Binding.Property as follows:

class MyDialog(forms.Dialog[bool]):
    def __init__(self,myModel):
        self.cm = myModel
        self.gridView = forms.GridView()
        self.gridView.ShowHeader = True
        self.gridView.DataStore = self.cm.views #set a bindableCollection as gridView DataStore

        col_01 = forms.GridColumn()
        col_01.HeaderText = 'view'
        col_01.Editable = False
        col_01.DataCell = forms.TextBoxCell(Binding = forms.Binding.Property[type(CustomObj()),System.String]('name')) ##NOT WORKING CODE!!

        col_02 = forms.GridColumn()
        col_02.Editable = True
        col_02.DataCell = forms.CheckBoxCell(Binding=forms.Binding.Property[type(CustomObj()),System.Boolean]('active'))  ##NOT WORKING CODE!!

        #[code follows...]

image

Alternative, I tried using delegates as the example shared by @dale here . With this tecnique, it seems that TextBoxCell is correctly binding to ‘name’ property, but it fails to bing to the other DataCell of type CheckBoxCell.

class MyDialog(forms.Dialog[bool]):
    def __init__(self,myModel):
        self.cm = myModel
        self.gridView = forms.GridView()
        self.gridView.ShowHeader = True
        self.gridView.DataStore = self.cm.views #set a bindableCollection as gridView DataStore

        col_01 = forms.GridColumn()
        col_01.HeaderText = 'view'
        col_01.Editable = False
        col_01.DataCell = forms.TextBoxCell(Binding = forms.Binding.Delegate[CustomObj,System.String] (self.myNameDelegate)) #THIS BINDING WORKS!!!

        col_02 = forms.GridColumn()
        col_02.Editable = True
        col_02.DataCell = forms.CheckBoxCell(Binding = forms.Binding.Delegate[CustomObj,System.Boolean](self.myActiveDelegate)) #THIS MISERABLY FAILS!!! WHY. THE OTHER BINDING WORKS SO NICELY...
        #[code follows... complete code at the end of the post]
    def myNameDelegate(self,customObj):
        return customObj.name
    def myActiveDelegate(self,customObj):
        nullableBool = clr.Convert(customObj.active,System.Nullable)
        return nullableBool

I really can’t figure out how is done this with IronPython. All examples found out there were for C# and I can’t figure out how to translate them to IronPython.

Any help would be appreciated. Let me share the full code. Thanks!

import System
import Eto.Forms as forms
import Eto.Drawing as drawing
import clr




class CustomObj(System.Object):
    def __init__(self,name=None,obj=None,active=False,type=None):
        self._name = name
        self._obj = obj
        self._active = active
        self.type = type
    @property
    def name(self):
        return self._name
    @name.setter
    def name(self,value):
        self._name = value
    @property
    def obj(self):
        return self._obj
    @obj.setter
    def obj(self,value):
        self._obj = value
    @property
    def active(self):
        return self._active
    @active.setter
    def active(self,value):
        self._active = value
  
class MyModel():
    def __init__(self):
        self.views = System.Collections.ObjectModel.ObservableCollection[type(CustomObj())]()
        self.versions = System.Collections.ObjectModel.ObservableCollection[type(CustomObj())]()

    def add(self,customObj):
        if customObj.type == 'view':
            self.views.Add(customObj)
        elif customObj.type == 'version':
            self.versions.Add(customObj)

class MyDialog(forms.Dialog[bool]):
    def __init__(self,myModel):
        self.cm = myModel
        self.gridView = forms.GridView()
        self.gridView.ShowHeader = True
        self.gridView.DataStore = self.cm.views #set a bindableCollection as gridView DataStore

        col_01 = forms.GridColumn()
        col_01.HeaderText = 'view'
        col_01.Editable = False
             ###binding to property trial...###
        #col_01.DataCell = forms.TextBoxCell(Binding = forms.Binding.Property[type(CustomObj()),System.String]('name'))

             ###binding to delegate trial...###
        col_01.DataCell = forms.TextBoxCell(Binding = forms.Binding.Delegate[CustomObj,System.String](self.myNameDelegate))  ## THIS IS WORKING CODE!!

        col_02 = forms.GridColumn()
        col_02.Editable = True
             ###binding to property trial...###
        #col_02.DataCell = forms.CheckBoxCell(Binding=forms.Binding.Property[type(CustomObj()),System.Boolean]('active'))  ##NOT WORKING CODE!!

            ###binding to delegate trial...###
        #col_02.DataCell = forms.CheckBoxCell(Binding = forms.Binding.Delegate[CustomObj,System.Boolean](self.myActiveDelegate))

        
        
        self.gridView.Columns.Add(col_01)
        self.gridView.Columns.Add(col_02)
        
        addButton = forms.Button(Text = 'test Add Element')

        def onAddButtonClick(sender,e):
            try:
                self.cm.add(CustomObj(name = 'testName',active = True,type='view'))
                self.veriLabel.Text = 'number of elements: {0}'.format(str(self.cm.views.Count))
            except Exception as es:
                Rhino.RhinoApp.WriteLine(str(e))
        addButton.Click += onAddButtonClick
        
        self.veriLabel = forms.Label(Text = 'number of elements: {0}'.format(str(self.cm.views.Count)))
        
        self.layout = forms.TableLayout(
                    Padding=drawing.Padding(5),
                    Size = drawing.Size(500,500)
                    )
        self.layout.Rows.Add(forms.TableRow(self.gridView))
        self.layout.Rows.Add(forms.TableRow(addButton))
        self.layout.Rows.Add(forms.TableRow(self.veriLabel))
        
        self.Content = self.layout

    def myNameDelegate(self,customObj):
        return customObj.name
    def myActiveDelegate(self,customObj):
        nullableBool = clr.Convert(customObj.active,System.Nullable)
        return nullableBool
 
#CREATE ANY MODEL
myModel = MyModel()
for i in range(10):
    name = 'name_{0}'.format(i)
    if i>5:
        active = False
    else:
        active = True
    myModel.add(CustomObj(name=name, active=active,type='view'))

#LAUNCH DIALOG
myDlg = MyDialog(myModel)
myDlg.ShowModal()
```

3 posts - 1 participant

Read full topic

PlugIn.CreatePreview called (apparently) unnecessarily

Lambdas translation from c# to IronPython

$
0
0

How is this C# lambda translated into an IronPython lambda?

(PropertyListViewModel avm) => avm.SelectedProperty

The necessity of explicitly indicating the type is driving me nuts…

1 post - 1 participant

Read full topic

Wish: keep material preview focused on top-level material when editing child content in place

$
0
0

It is awesome to have in-place editing working for material content children, whether material-based or texture-based. Thanks for that.

However, from a user standpoint I think the material preview should remain focused on the current top-level material, rather than switching to preview a texture, or worse, a conceptually non-material content that is necessarily implemented as a material.

The idea being, if I am editing a material, and select a texture, I don’t prefer to see the texture previewed in 2D, but would rather continue to see my material, which of course will also reflect any changes I am making to the texture.

In the case of a non-material content, this is even more desirable. For example, we have a topcoat layer type of node that can be placed over various material substrates, and it would be far preferable, when selecting it to edit its attributes, for the top-level material to continue to be shown. In other cases, the content simply has no visual representation on its own.

Perhaps the last point suggests a need for there to be a fourth “utility” type of content, in addition to the existing texture/environment/material ones, but even in that case, this wish about keeping the top-level material in the preview would still stand.

1 post - 1 participant

Read full topic

Cage edit command that can adapt to any form automatically

$
0
0

I want cage edit command that can adapt to any form automatically.
As pic show, it is very hard to edit the form freely after bending.
Any idea?
Grasshopper can do that?
Thank you!

1 post - 1 participant

Read full topic

PlaneSurface.CreateThroughBox not working with latest update

$
0
0

(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)

1 post - 1 participant

Read full topic

How Can I access Gumball numeric Textfield function if it is there?

$
0
0

@stevebaer @brian I am working with the Gumball documentation and would like to know if the numeric textfield is available anywhere to access.


I have been trying to search through the API documents, but no luck so far.
Can you guys please point me to the right direction. Thanks.

3 posts - 2 participants

Read full topic


Add prefix to material names via script

$
0
0

Dear all,

i’m new to scripting in rhino and don’t know the right syntax yet.
Perhaps someone could help with one inconvenience. :wink:

I like to work with worksessions, but i am really bad in properly organizing the used materials in each file.
When it comes to combine them in a worksession there are multiple materials with names like “custom 01”. The first “custom 01” is a carpet, the next wood, the next simple black, and so on…

The problem is, that rhino assigns one material (texture, glossyness, whatever) to all “custom 01s”. So that now all “custom 01s” get a carpet texture.

Is there a simple way scripting a prefix to all file materials?

Means, i have file named 01_floor, 02_walls, 03_ceiling and i can rename all used materials in each file with the number prefix of the file, in order to get “01 custom 01” for the carpet, “02 custom 01” for the wood, “03 custom 01” for the simple black…

Thank you very much!

Seb.

1 post - 1 participant

Read full topic

Serializing Hatch crashes Rhino when debugged by VS & Tibidabo is loaded

$
0
0

The Tibidabo plugin is shipped with Land Design.

How to replicate:

  1. Make Tibidabo not to load on startup by disabling Land Design.
  2. Start Rhino in the debugger mode, from Visual Studio (as I am debugging my Grasshopper plugin)
  3. Draw a solid hatch
  4. Try to use BinaryFormatter.Serialize to serialize a Hatch geometry, which is retrieved by HatchObject.HatchGeometry
  5. The operation succeeds
  6. Load Tibidabo manually by entering its command, e.g. tbAudit
  7. Redo steps 3-5
  8. Rhino crashses

I can see something weird happened inside openNurbs. I don’t know if it’s because Tibidabo’s anti-debugger code.

Captured stack

0000004f`f5bcdcc8 00007ff8`d980da02 KERNELBASE!DebugBreak+0x2
0000004f`f5bcdcd0 00007ff8`8abe88bf opennurbs!ON_ErrorEx+0x18f
0000004f`f5bcde00 00007ff8`8ad1067d opennurbs!ON_BinaryArchive::Write3dmReferencedComponentIndex+0x18d
0000004f`f5bcde30 00007ff8`8ac462c1 opennurbs!ON_Hatch::Write+0xd1
0000004f`f5bcdeb0 00007ff8`8aacb83f opennurbs!ON_BinaryArchive::Internal_WriteObject+0xef
0000004f`f5bcdf10 00007ff8`8aacb3e7 opennurbs!ON_BinaryArchive::WriteObject+0x757
0000004f`f5bcdff0 00007ff8`899d3198 rhcommon_c!ON_WriteBufferArchive_NewWriter+0xf8
0000004f`f5bce060 00007ff8`50a33842 unknown!noop+0x0
0000004f`f5bce120 00007ff8`50a335c2 unknown!unknown+0x0
0000004f`f5bce1e0 00007ff8`50a334af unknown!unknown+0x0
0000004f`f5bce220 00007ff8`a24c80ba mscorlib_ni+0x5c80ba
0000004f`f5bce2a0 00007ff8`a24c7e4d mscorlib_ni+0x5c7e4d
0000004f`f5bce320 00007ff8`a24c7727 mscorlib_ni+0x5c7727
0000004f`f5bce3c0 00007ff8`a24c71f6 mscorlib_ni+0x5c71f6
0000004f`f5bce440 00007ff8`a24ea056 mscorlib_ni+0x5ea056
0000004f`f5bce470 00007ff8`50a309ae unknown!unknown+0x0
0000004f`f5bce6b0 00007ff8`50a2feb7 unknown!unknown+0x0
0000004f`f5bce7a0 00007ff8`50a2fbd3 unknown!unknown+0x0
0000004f`f5bce7f0 00007ff8`50a27a1a unknown!unknown+0x0
0000004f`f5bce910 00007ff8`50a0542c unknown!unknown+0x0
0000004f`f5bce9c0 00007ff8`50a03dbc unknown!unknown+0x0
0000004f`f5bcead0 00007ff8`50a2e6eb unknown!unknown+0x0
0000004f`f5bceb10 00007ff8`504ac198 unknown!unknown+0x0
0000004f`f5bceb40 00007ff8`504abad0 unknown!unknown+0x0
0000004f`f5bcec40 00007ff8`4d9edbb3 unknown!unknown+0x0
0000004f`f5bced00 00007ff8`abd5c0ab System_Windows_Forms_ni+0xa5c0ab
0000004f`f5bced40 00007ff8`abd607cd System_Windows_Forms_ni+0xa607cd
0000004f`f5bcedc0 00007ff8`ab5b11ec System_Windows_Forms_ni+0x2b11ec
0000004f`f5bcee80 00007ff8`ab5b00a2 System_Windows_Forms_ni+0x2b00a2
0000004f`f5bcef20 00007ff8`abce5382 System_Windows_Forms_ni+0x9e5382
0000004f`f5bcef90 00007ff8`ad0321fe clr+0x21fe
0000004f`f5bcf020 00007ff8`dc4674d6 user32!DispatchMessageW+0x6a6
0000004f`f5bcf1a0 00007ff8`dc466ff2 user32!DispatchMessageW+0x1c2
0000004f`f5bcf220 00007ff8`a571c182 mfc140u+0x27c182
0000004f`f5bcf250 00007ff8`a571ca85 mfc140u+0x27ca85
0000004f`f5bcf290 00007ff8`7ed0e5b4 RhinoCore!RhRunMessageLoop+0x164
0000004f`f5bcfc70 00007ff6`dc4a1072 Rhino+0x1072
0000004f`f5bcfcb0 00007ff6`dc4a129e Rhino+0x129e
0000004f`f5bcfcf0 00007ff8`dc307974 kernel32!BaseThreadInitThunk+0x14
0000004f`f5bcfd20 00007ff8`dc9da261 ntdll!RtlUserThreadStart+0x21

Rhino’s version & system info

Rhino 6 SR26 2020-5-26 (Rhino 6, 6.26.20147.06511, Git hash:master @ 7788f6214ee9335d5793cc6177985a1c745e663b)
License type: 教育版, 版本2020-05-26 (Educational)
License details: Cloud Zoo.  In use by: Keyu ()

Windows 10.0 SR0.0 or greater (Physical RAM: 16Gb)
Machine name: xxxxx

Non-hybrid graphics.
Primary display and OpenGL: NVIDIA GeForce GTX 1050 (NVidia) Memory: 2GB, Driver date: 7-24-2019 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 432.00

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: Height
  
  Vendor Name: NVIDIA Corporation
  Render version: 4.6
  Shading Language: 4.60 NVIDIA
  Driver Date: 5-22-2019
  Driver Version: 26.21.14.3086
  Maximum Texture size: 32768 x 32768
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 32768 x 32768
  Total Video Memory: 2 GB

Rhino plugins
  C:\Program Files\Rhino 6\Plug-ins\Commands.rhp	"Commands"	6.26.20147.6511
  C:\Program Files\Rhino 6\Plug-ins\WebBrowser.rhp	"WebBrowser"	
  C:\Program Files\Rhino 6\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 6\Plug-ins\RhinoScript.rhp	"RhinoScript"	
  C:\Program Files\Rhino 6\Plug-ins\RhinoBonusTools.rhp	"Rhino Bonus Tools"	
  C:\Program Files\Rhino 6\Plug-ins\IdleProcessor.rhp	"IdleProcessor"	
  C:\Program Files\Rhino 6\Plug-ins\Tibidabo\Tibidabo.rhp	"Tibidabo"	
  C:\Program Files\Rhino 6\Plug-ins\RhinoRender.rhp	"Rhino Render"	
  C:\Program Files\Rhino 6\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	6.26.20147.6511
  C:\Program Files\Rhino 6\Plug-ins\rdk_ui.rhp	"Renderer Development Kit UI"	
  C:\Program Files\Rhino 6\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 6\Plug-ins\Alerter.rhp	"Alerter"	
  C:\Program Files\Rhino 6\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	6.26.20147.6511
  C:\Program Files\Rhino 6\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	6.26.20147.6511
  C:\Program Files\Rhino 6\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino 6\Plug-ins\Displacement.rhp	"Displacement"	

3 posts - 3 participants

Read full topic

xNURBS Grasshoper

$
0
0

Some xNURBS customers ask Grasshoper because they need to automatically generate a lot of surfaces based on xNURBS on the fly and to speed up their designing process based on xNURBS. Only three simple APIs from xNURBS plug-in are needed to implement xNURBS GH, which can be used to develop a ton of surfacing tools (It is possible to combine the three APIs into one API.). If we export the C APIs, could xNURBS customers use these C APIs?

1 post - 1 participant

Read full topic

RhinoCommon equivalent to GH Linear Array?

$
0
0

Is there a ghPython equivalent in RhinoCommon for the Grasshopper Linear Array component (or other Array components)?

I currently access the Linear Array component from Grasshopper using the ghpythonlib.components.LinearArray but I will probably not be able to use this Node in Code functionality once I refactor the Python code to C#. I want to make this original code future proof for the next phase.

If there isn’t a RhinoCommon equivalent, could somebody from McNeel post the definition from Linear Array that I can plug into my Python code using RhinoCommon?

Thanks.

1 post - 1 participant

Read full topic

Circles Fractal in C#

$
0
0

Hi, I’m exploring recursions in C#, so I decided to start with simple circle scaling as shown in the ref image. But wasn’t able to code it properly, Any help with this?

Please find attached the ref image and c# code.

Image:
unnamed

Code:

Circles fractal.gh (5.0 KB)

2 posts - 2 participants

Read full topic

Viewing all 8539 articles
Browse latest View live