Exemplo n.º 1
0
 public IXbimSolidSet CreateGrid(IIfcGrid grid, ILogger logger)
 {
     using (new Tracer(LogHelper.CurrentFunctionName(), this._logger, grid))
     {
         return(_engine.CreateGrid(grid, logger));
     }
 }
Exemplo n.º 2
0
 public void grid_with_polylines()
 {
     using (var er = new EntityRepository <IIfcGrid>(nameof(grid_with_polylines), true)) //model is in radians
     {
         Assert.IsTrue(er.Entity != null, "No IfcGrid found");
         var s = geomEngine.CreateGrid(er.Entity, logger);
         Assert.AreEqual(10, s.Count);
     }
 }
Exemplo n.º 3
0
 public void GridTest()
 {
     using (var model = MemoryModel.OpenRead(@"Ifc4TestFiles\grid-placement.ifc"))
     {
         var placements = model.Instances.OfType <IIfcGridPlacement>();
         Assert.IsTrue(placements.Any());
         foreach (var p in placements)
         {
             XbimMatrix3D m = geomEngine.ToMatrix3D(p);
             Assert.IsFalse(m.IsIdentity);
         }
         //make a graphic of the grid
         var ifcGrid = model.Instances.OfType <IIfcGrid>().FirstOrDefault();
         Assert.IsNotNull(ifcGrid);
         var geom = geomEngine.CreateGrid(ifcGrid);
         Assert.IsTrue(geom.Count > 0, "At least one solid must be returned");
         foreach (var solid in geom)
         {
             Assert.IsTrue(solid.Volume > 0);
         }
     }
 }
Exemplo n.º 4
0
 public IXbimSolidSet CreateGrid(IIfcGrid grid)
 {
     return(_engine.CreateGrid(grid));
 }