Grasshopper

algorithmic modeling for Rhino

hello david
I need to develop a component with C # who did this to me:
1 - Transformation of the starting geometry: 
---- Converts curves to polylines
---- Selects lines, polylines, arc curves
---- Disable layer
---- Converts polylines into lines / curves straight
---- Selects lines, polylines, arc curves
I need your help to start -_-
thank youu !
sawsan

Views: 1453

Replies to This Discussion

If you clear the values on the input, no data will be passed to the c# script component. But in the internal script there are some objecttypes, that have their own default values.

It depends on the type of input. Only object type provides a null, if no value is ommitted. So even if you empty (clear values) an input of let's say a Point3d type...you have to test against Point3d.Unset.

if(P == Point3d.Unset)

   return;

strings type has "" as default. But if you want to get sure you should test like this:

if(string.IsNullOrWhiteSpace(mystring) || string.IsNullOrEmpty(mystring))

   return;

Cheers

FF

thank you Florian but my problem  is that when I select a curve and I would do another test with another curve my component takes into account both the first and second curves :(

 

Hi Florian,

this problem is due to the creation of layer to set the output .

but I don't know how I solve ://

Hi sawsan,

It's a bit complicated now to get the idea, what's going on in your component. Can you send an example or better do some tests with c# script component. So we can work it out.

Best regards

FF

hi Florian,

you will find attached an example:

"component lay" takes the component outputs explode and put them

 in  layer .

the problem  is that when I select a curve and I would do another test with another curve my component takes into account both the first and second curves :/

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service