Esempio n. 1
0
        public void ScaledPositioningBoxes()
        {
            var m = new List<XbimModel>();

            var m0 = new XbimModel();
            m0.Open(@"Scale\P1_cm.xBIM");
            m.Add(m0);
            
            var m1 = new XbimModel();
            m1.Open(@"Scale\P2_cm.xBIM");
            m.Add(m1);

            var m2 = new XbimModel();
            m2.Open(@"Scale\P2_mm.xBIM");
            m.Add(m2);

            var m3 = new XbimModel();
            m3.Open(@"Scale\GeomV1\P2_mm.xBIM");
            m.Add(m3);

            //var p = new List<XbimModelPositioning>();
            var r = new List<XbimRect3D>();
            foreach (var xbimModel in m)
            {
                var tmp = new XbimModelPositioning(xbimModel);
                // p.Add(tmp);
                r.Add(tmp.GetLargestRegionRectInMeters());
            }

            HaveSameSize(r[1], r[2]);
            HaveSameSize(r[1], r[3]);
            //HaveSameSize(r[0], r[2]);
            // HaveSameSize(r[0], r[3]);
            
            HaveSameLocation(r[1], r[2]);
            HaveSameLocation(r[1], r[3]);
            // NeedToBeSame(r[1], r[0]);
            //NeedToBeSame(r[0], r[3]);

            foreach (var xbimModel in m)
            {
                xbimModel.Close();
            }            
        }
        public void AddModel(IModel model)
        {
            var tmp = new XbimModelPositioning(model);

            _collection.Add(model, tmp);
        }
 public void AddModel(XbimModel model)
 {
     var tmp = new XbimModelPositioning(model);
     _collection.Add(model, tmp);
 }