Grasshopper

algorithmic modeling for Rhino

Hello,

I know that this has been asked before (e.g. here and here), but it seems that the new Grasshopper v0.8.0050 has broken the functionality of the linked script.

This is the DotNET VB script, that doesn't work:

a = rhutil.RhinoSplitBrepFace(y, 0, x.ToArray, doc.AbsoluteTolerance)

 

Because of the following error (translated from german, so it might be different for you):

'Error: The object of the type "Rhino.Geometry.Brep" could not be converted to "RMA.OpenNurbs.IOnBrep".'

 

Hopefully somebody can try to reproduce this error for confirmation or give me a hint what I'm doing wrong. Is there another way to achieve trimming within the new version?

Thanks

Views: 3144

Replies to This Discussion

You may be able to use the "Surface Split" component to achieve what you're after. If you absolutely must use the legacy script, make sure that the input to the scripting component that takes the surface includes a type hint of "OnBrep".

And the C# RhinoCommon equivalent of the above script would look like this:

 

private void RunScript(List<Curve> crv, Brep srf, ref object A)  {
    A = srf.Faces[0].Split(crv, doc.ModelAbsoluteTolerance); 

}

 

Works like a treat! Thanks, Andrew.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service