Grasshopper

algorithmic modeling for Rhino

Hello!

Inside a c# grasshopper component, I'm trying to retrieve the faces connected to a mesh edge, which, as there is a rhinocommon function to do so, should be easy enough. The issue seems to relate to the out bool[] parameter of the mesh.TopologyEdges.GetConnectedFaces method I use. The code compiles fine in visual studio, however, I get the following error in Grasshopper:

(in German)

Solution exception:"parameter #5" kann nicht gemarshallt werden: Ungültige verwaltete/nicht verwaltete Typenkombination (Arrays können nur als LPArray, ByValArray oder SafeArray gemarshallt werden)..

(in English, excuse my potentially wrong translation!)

Solution Exception: "parameter #5" cannot be marshaled. Invalid managed/unmanaged type combination (arrays can only be marshaled as LPArray, ByValArray or SafeArray)..

 

Here's the code :

 

int edgeIndex = 0;

int[] faceIndices;

bool[] faceOrientationMatchesEdgeDirection;

faceIndices = inputMesh.TopologyEdges.GetConnectedFaces(edgeIndex, out faceOrientationMatchesEdgeDirection);

 

Any ideas what I'm doing wrong?

 

Thanks for your help,

Dan

 

Rhino 5 Beta (8 Nov 2011)

Grasshopper 0.8.0052

 

 

 

 

Views: 372

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service