Grasshopper

algorithmic modeling for Rhino

Hello all;

I've ran into the same problem time and time again, and always did some work around, but I feel there's something I'm not doing right.

When I manipulate trimmed surfaces in VB the information of the trimming gets lost.

Basically if I cut some holes on a rectangle on grasshopper and then I use the resulting surfaces in VB the VB seem to think I'm just using rectangles.

Any Ideas why this might be ocuring

Thank you in advance

Views: 675

Replies to This Discussion

Try yourBrep.Faces.ExtractFace[0]

As an addition mostapha:

It's because what grasshopper calls surfaces are actually Breps with one face in RhinoCommon. In RhinoCommon surfaces do not have any trimming information, that why you should use BRep as a type hint instead of surface for script components if you wish to keep the trimming information.

Aha so that is why.

Yeah I usually work around it using Breps, and Brep faces, but always wondered if I was doing something wrong and that was I was having to do the little Brep work around.

 

Good to know  why now

 

Thanks

I wonder what would be the difference between ExtractFace and DuplicateFace methods? They both extract the face from brep and "convert" it into a new brep?

import Rhino

face = brep.Faces[0]
a1 = face.DuplicateFace(True)

faces = brep.Faces
a2 = faces.ExtractFace(0)

DuplicateFace could copy shading meshes. It also "works" on Face list, while ExtractFace works a single face. Is that their main difference? Could one of these two be redundant?

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