Пример #1
0
        /// <summary>
        /// update current Sketch3D using current UCS and settings
        /// </summary>
        private void UpdateSketch3D()
        {
            if (m_displayKind == DisplayKinds.GeometryModel)
            {
                GeometryData geomFactory;
                if (m_isSelectView)
                {
                    geomFactory   = new GeometryData(m_selected, m_currentView);
                    m_detailLevel = DetailLevels.Undefined;
                }
                else
                {
                    geomFactory = new GeometryData(m_selected, m_detailLevel, m_currentView);
                }

                Graphics3DData geom3DData = geomFactory.Data3D;
                Graphics3DData old3DData  = m_currentSketch3D.Data3D;
                geom3DData.CurrentUCS    = old3DData.CurrentUCS;
                m_currentSketch3D.Data3D = geom3DData;
                m_currentSketch3D.Data2D = Graphics2DData.Empty;
            }
            else if (m_displayKind == DisplayKinds.AnalyticalModel)
            {
                ModelData      modelFactory = new ModelData(m_selected);
                Graphics3DData model3DData  = modelFactory.Data3D;
                Graphics2DData model2DData  = modelFactory.Data2D;
                Graphics3DData old3DData    = m_currentSketch3D.Data3D;
                model3DData.CurrentUCS   = old3DData.CurrentUCS;
                m_currentSketch3D.Data3D = model3DData;
                m_currentSketch3D.Data2D = model2DData;
            }
        }
Пример #2
0
 public override System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader)
 {
     System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue <Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader));
     this.RenderModelSectionGroupDetailLevels = ((DetailLevels)(binaryReader.ReadInt16()));
     this.fieldpad = binaryReader.ReadBytes(2);
     pointerQueue.Enqueue(binaryReader.ReadBlamPointer(16));
     return(pointerQueue);
 }
Пример #3
0
        /// <summary>
        /// create 3D and 2D data of given GeometryElement
        /// </summary>
        /// <param name="elem"></param>
        /// <param name="detail"></param>
        /// <param name="currentView"></param>
        public GeometryData(Element elem, DetailLevels detail, View currentView)
        {
            Options opt = Command.CommandData.Application.Application.Create.NewGeometryOptions();
            opt.DetailLevel = detail;
            opt.ComputeReferences = false;
            GeometryElement geoElement = elem.get_Geometry(opt);

            Autodesk.Revit.DB.XYZ xyz = new Autodesk.Revit.DB.XYZ (0, 0, 0);
            Transform transform = Transform.get_Translation(xyz);
            AddGeoElement(geoElement, transform);

            m_bbox = elem.get_BoundingBox(currentView);
        }
Пример #4
0
        /// <summary>
        /// create 3D and 2D data of given GeometryElement
        /// </summary>
        /// <param name="elem"></param>
        /// <param name="detail"></param>
        /// <param name="currentView"></param>
        public GeometryData(Element elem, DetailLevels detail, View currentView)
        {
            Options opt = Command.CommandData.Application.Application.Create.NewGeometryOptions();

            opt.DetailLevel       = detail;
            opt.ComputeReferences = false;
            GeometryElement geoElement = elem.get_Geometry(opt);

            Autodesk.Revit.DB.XYZ xyz       = new Autodesk.Revit.DB.XYZ(0, 0, 0);
            Transform             transform = Transform.get_Translation(xyz);

            AddGeoElement(geoElement, transform);

            m_bbox = elem.get_BoundingBox(currentView);
        }
Пример #5
0
 public RenderModelSectionGroupBlock(BinaryReader binaryReader)
 {
     this.detailLevels = (DetailLevels)binaryReader.ReadInt16();
     this.padding = binaryReader.ReadBytes(2);
     this.compoundNodes = ReadCompoundnodes(binaryReader);
 }
Пример #6
0
 internal RenderModelSectionGroupBlockBase(BinaryReader binaryReader)
 {
     this.detailLevels  = (DetailLevels)binaryReader.ReadInt16();
     this.invalidName_  = binaryReader.ReadBytes(2);
     this.compoundNodes = ReadRenderModelCompoundNodeBlockArray(binaryReader);
 }
Пример #7
0
        /// <summary>
        /// update current Sketch3D using current UCS and settings
        /// </summary>
        private void UpdateSketch3D()
        {
            if (m_displayKind == DisplayKinds.GeometryModel)
            {
                GeometryData geomFactory;
                if(m_isSelectView)
                {
                    geomFactory = new GeometryData(m_selected, m_currentView);
                    m_detailLevel = DetailLevels.Undefined;

                }
                else
                {
                    geomFactory = new GeometryData(m_selected, m_detailLevel, m_currentView);
                }

                Graphics3DData geom3DData = geomFactory.Data3D;
                Graphics3DData old3DData = m_currentSketch3D.Data3D;
                geom3DData.CurrentUCS = old3DData.CurrentUCS;
                m_currentSketch3D.Data3D = geom3DData;
                m_currentSketch3D.Data2D = Graphics2DData.Empty;
            }
            else if (m_displayKind == DisplayKinds.AnalyticalModel)
            {
                ModelData modelFactory = new ModelData(m_selected);
                Graphics3DData model3DData = modelFactory.Data3D;
                Graphics2DData model2DData = modelFactory.Data2D;
                Graphics3DData old3DData = m_currentSketch3D.Data3D;
                model3DData.CurrentUCS = old3DData.CurrentUCS;
                m_currentSketch3D.Data3D = model3DData;
                m_currentSketch3D.Data2D = model2DData;
            }
        }