Examples of passing data to Rhino

(Chris Hanley) #41

I think it’s a preference on how many spaces denotes a tab key, but it made me think of this.

1 Like

(Nathan 'jesterKing' Letwory) #42

Sure, but the Python people found it necessary to draft PEP-8. This is followed zealously, to the point of enforcement.

0 Likes

(IVELIN PEYCHEV) #43

As an eternal script kiddie. I did not know of this standard. Still, until now the only place I’ve seen 2-spaces indentation in python example is within RhinoCommon API documentation.

@chanley, this is hilarious. :rofl: What movie/show is this from?

HAHAHA https://www.youtube.com/watch?v=SsoOG6ZeyUI

notice the frustration of the space-pressing :rofl: :rofl:

0 Likes

(Chris Hanley) #44

It’s a silly show on HBO, (here in the US at least), called Silicon Valley. It has it’s moments!

1 Like

(Steve Baer) #45

Which samples? We typically use four spaces for python

0 Likes

(IVELIN PEYCHEV) #46

oh, that’s gonna take a while.

Last time I remember was from a link posted by Nathan.

0 Likes

(Nathan 'jesterKing' Letwory) #47

I’d be interested in hearing as well.

I know I love my tabs, don’t like spaces that much. On the forum when typing directly in the reply box I may type just two, because that is just faster to do (and I like my tabs indents visualized at width of two spaces). You know, in web browsers pressing tab doesn’t always work that well (unless you have a properly set up text area/editor on a page).

0 Likes

(IVELIN PEYCHEV) #48

here’s one example. just opening methods randomly. There are others.

0 Likes

(Steve Baer) #49

@Alain may want to take a look at these. He usually keeps those samples up to date. You’re welcome to help too as the rhinoscriptsyntax files these come from are open source

0 Likes

(IVELIN PEYCHEV) #50

Yes, I know but the whole Pull-“Push” system of GitHub is … let’s say I need to invest some time to understand what all these terms mean.

0 Likes

#51

I see what @ivelin.peychev means now. To be honest, an “AddWhatever” function would make file writing operations easier on the programmer side, but that means that on the people maintaining the code will be more work and exceptions to deal with.

What I would love (and I didn’t research if it is currently possible) is to be able to add elements to a document passing a list to a function instead or additionally to single elements. Is currently this functionality embedded in Rhino3dm somehow?

Cheers.

0 Likes

(Alain Cormier) #52

I’ll pep the indentation for those samples with 4 spaces.
Logged here.
Thanks

2 Likes

(Nathan 'jesterKing' Letwory) #53

No, but I think it shouldn’t be too hard to write helper functions that allow you to do that. Even with lists that are not homogenous.

2 Likes

(IVELIN PEYCHEV) #54

Hi Alain,

Here’s another one:
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Display_DisplayPipeline_Draw2dText.htm

0 Likes

(Alain Cormier) #55

Thanks. I’m sure there are more. I’ll find them all with a script.

0 Likes

(IVELIN PEYCHEV) #56

:slight_smile: good point. I was wondering if there was such a way.

0 Likes