Exemple #1
0
        /// <summary>
        /// Returns a mapping tag that is used to detect when a mesh's colors need to be set.
        /// </summary>
        private MappingTag GetMappingTag()
        {
            var mt = new MappingTag();

            // Since the false colors that are shown will change if
            // the mesh is transformed, we have to initialize the
            // transformation.
            mt.MeshTransform = Transform.Identity;

            // This is the analysis mode id passed to the
            // CRhinoVisualAnalysisMode constructor. Use the
            // m_am_id member and it this code will alwasy
            // work correctly.
            mt.Id = Id;

            // This is a 32 bit CRC or the information used to
            // set the false colors.

            // For this example, the m_z_range and m_hue_range
            // intervals control the colors, so we calculate
            // their crc.
            uint crc = 0;

            crc           = RhinoMath.CRC32(crc, m_z_range.T0);
            crc           = RhinoMath.CRC32(crc, m_z_range.T1);
            crc           = RhinoMath.CRC32(crc, m_hue_range.T0);
            crc           = RhinoMath.CRC32(crc, m_hue_range.T1);
            mt.MappingCRC = crc;

            return(mt);
        }
Exemple #2
0
        public BaseWPExportData(WPExportDTO export)
        {
            this._export = export;

            MappingPost mappingPost = new MappingPost();

            this.MapperPost = mappingPost.Get;

            MappingProducts mappingProducts = new MappingProducts();

            this.MapperProduct = mappingProducts.Get;

            MappingCategory mappingCategory = new MappingCategory();

            this.MapperCategory = mappingCategory.Get;

            MappingTag mappingTag = new MappingTag();

            this.MapperTag = mappingTag.Get;

            MappingUser mappingUser = new MappingUser();

            this.MapperUser = mappingUser.Get;
        }