Exemplo n.º 1
0
        internal override IntPtr _InternalGetConstPointer()
        {
#if RHINO_SDK
            if (m_doc != null)
            {
                IntPtr rc = UnsafeNativeMethods.CRhinoHatchPatternTable_GetHatchPatternPointer(m_doc.RuntimeSerialNumber, m_id);
                if (rc == IntPtr.Zero)
                {
                    throw new Runtime.DocumentCollectedException($"Could not find HatchPattern with ID {m_id}");
                }
                return(rc);
            }
#endif
            Rhino.FileIO.File3dm parent_file = m__parent as Rhino.FileIO.File3dm;
            if (parent_file != null)
            {
                IntPtr pModel = parent_file.NonConstPointer();
                return(UnsafeNativeMethods.ONX_Model_GetModelComponentPointer(pModel, m_id));
            }
            return(m_constptr_static);
        }
Exemplo n.º 2
0
        internal override IntPtr _InternalGetConstPointer()
        {
#if RHINO_SDK
            if (m_doc != null)
            {
                var rc = UnsafeNativeMethods.CRhinoLinetypeTable_GetLinetypePointer2(m_doc.RuntimeSerialNumber, m_id);
                if (rc == IntPtr.Zero)
                {
                    throw new Runtime.DocumentCollectedException($"Could not find Linetype with ID {m_id}");
                }
                return(rc);
            }
#endif
            Rhino.FileIO.File3dm file_parent = m__parent as Rhino.FileIO.File3dm;
            if (file_parent != null)
            {
                IntPtr pModel = file_parent.NonConstPointer();
                return(UnsafeNativeMethods.ONX_Model_GetLinetypePointer(pModel, m_id));
            }

            return(IntPtr.Zero);
        }
Exemplo n.º 3
0
 internal Linetype(Guid id, Rhino.FileIO.File3dm onxModel)
 {
     m_id      = id;
     m__parent = onxModel;
 }
Exemplo n.º 4
0
 internal HatchPattern(Guid id, Rhino.FileIO.File3dm parent)
 {
     m_id      = id;
     m__parent = parent;
 }