Пример #1
0
 /// <summary>
 /// Utility for picking mesh vertices
 /// </summary>
 /// <param name="mesh"></param>
 /// <returns>indices of mesh topology vertices that were picked</returns>
 /// <since>5.0</since>
 public int[] PickMeshTopologyVertices(Geometry.Mesh mesh)
 {
     using (var indices = new Runtime.InteropWrappers.SimpleArrayInt())
     {
         IntPtr const_ptr_this = ConstPointer();
         IntPtr const_ptr_mesh = mesh.ConstPointer();
         IntPtr ptr_indices    = indices.NonConstPointer();
         int    rc             = UnsafeNativeMethods.CRhinoPickContext_PickMeshTopologyVertices(const_ptr_this, const_ptr_mesh, ptr_indices);
         return(rc < 1 ? new int[0] : indices.ToArray());
     }
 }
Пример #2
0
 /// <summary>
 /// Utility for picking mesh vertices
 /// </summary>
 /// <param name="mesh"></param>
 /// <returns>indices of mesh topology vertices that were picked</returns>
 public int[] PickMeshTopologyVertices(Rhino.Geometry.Mesh mesh)
 {
     using (var indices = new Runtime.InteropWrappers.SimpleArrayInt())
     {
         IntPtr pConstThis = ConstPointer();
         IntPtr pConstMesh = mesh.ConstPointer();
         IntPtr pIndices   = indices.NonConstPointer();
         int    rc         = UnsafeNativeMethods.CRhinoPickContext_PickMeshTopologyVertices(pConstThis, pConstMesh, pIndices);
         if (rc < 1)
         {
             return(new int[0]);
         }
         return(indices.ToArray());
     }
 }
Пример #3
0
 /// <summary>
 /// Get a list of the RhinoCommon added content section serial numbers
 /// associated with this sections container.
 /// </summary>
 /// <returns>
 /// Return a list of the RhinoCommon added content section serial numbers
 /// associated with this sections container.
 /// </returns>
 private int[] GetSiblingIdList()
 {
   using (var idList = new Runtime.InteropWrappers.SimpleArrayInt())
   {
     var pointerToIdList = idList.NonConstPointer();
     var serialNumber = SerialNumber;
     UnsafeNativeMethods.Rdk_CoreContent_UiSectionConentSiblingList(serialNumber, ref m_SearchHint, pointerToIdList);
     return idList.ToArray();
   }
 }
Пример #4
0
 /// <summary>
 /// Utility for picking mesh vertices
 /// </summary>
 /// <param name="mesh"></param>
 /// <returns>indices of mesh topology vertices that were picked</returns>
 public int[] PickMeshTopologyVertices(Rhino.Geometry.Mesh mesh)
 {
   using (var indices = new Runtime.InteropWrappers.SimpleArrayInt())
   {
     IntPtr pConstThis = ConstPointer();
     IntPtr pConstMesh = mesh.ConstPointer();
     IntPtr pIndices = indices.NonConstPointer();
     int rc = UnsafeNativeMethods.CRhinoPickContext_PickMeshTopologyVertices(pConstThis, pConstMesh, pIndices);
     if (rc < 1)
       return new int[0];
     return indices.ToArray();
   }
 }