コード例 #1
0
        private string GetCastellatedMeshControls(ShmCastellatedMeshControls d)
        {
            var t = new StringBuilder(ShmDictRes.TemplateCastellatedMeshControls);

            t.Replace("({[[maxLocalCells]]})", d.maxLocalCells.ToString());
            t.Replace("({[[maxGlobalCells]]})", d.maxGlobalCells.ToString());

            t.Replace("({[[locationInMesh_x]]})", d.locationInMesh.X.ToString());
            t.Replace("({[[locationInMesh_y]]})", d.locationInMesh.Y.ToString());
            t.Replace("({[[locationInMesh_z]]})", d.locationInMesh.Z.ToString());

            t.Replace("({[[minRefinementCells]]})", d.minRefinementCells.ToString());
            t.Replace("({[[nCellsBetweenLevels]]})", d.nCellsBetweenLevels.ToString());
            t.Replace("({[[resolveFeatureAngle]]})", d.resolveFeatureAngle.ToString());
            t.Replace("({[[allowFreeStandingZoneFaces]]})", d.allowFreeStandingZoneFaces.ToString().ToLowerInvariant());

            var features = GetFeatures(d.Features);

            t.Replace("({[[features]]})", features);

            var surfaces = GetSurfaces(d.Surfaces);

            t.Replace("({[[surfaces]]})", surfaces);

            var regions = GetRegions(d.Regions);

            t.Replace("({[[regions]]})", regions);

            return(t.ToString());
        }
コード例 #2
0
ファイル: ShmDictData.cs プロジェクト: mohsenboojari/offwind
        public ShmDictData()
        {
            castellatedMesh = true;
            snap = true;
            addLayers = false;
            mergeTolerance = 1e-06d;
            debug = 0;

            Geometries = new List<ShmGeometry>();
            CastellatedMeshControls = new ShmCastellatedMeshControls();
            SnapControls = new ShmSnapControls();
            AddLayersControls = new ShmAddLayersControls();
            MeshQualityControls = new ShmMeshQualityControls();
        }
コード例 #3
0
        public ShmDictData()
        {
            castellatedMesh = true;
            snap            = true;
            addLayers       = false;
            mergeTolerance  = 1e-06d;
            debug           = 0;

            Geometries = new List <ShmGeometry>();
            CastellatedMeshControls = new ShmCastellatedMeshControls();
            SnapControls            = new ShmSnapControls();
            AddLayersControls       = new ShmAddLayersControls();
            MeshQualityControls     = new ShmMeshQualityControls();
        }
コード例 #4
0
        private string GetCastellatedMeshControls(ShmCastellatedMeshControls d)
        {
            var t = new StringBuilder(ShmDictRes.TemplateCastellatedMeshControls);
            t.Replace("({[[maxLocalCells]]})", d.maxLocalCells.ToString());
            t.Replace("({[[maxGlobalCells]]})", d.maxGlobalCells.ToString());

            t.Replace("({[[locationInMesh_x]]})", d.locationInMesh.X.ToString());
            t.Replace("({[[locationInMesh_y]]})", d.locationInMesh.Y.ToString());
            t.Replace("({[[locationInMesh_z]]})", d.locationInMesh.Z.ToString());
            
            t.Replace("({[[minRefinementCells]]})", d.minRefinementCells.ToString());
            t.Replace("({[[nCellsBetweenLevels]]})", d.nCellsBetweenLevels.ToString());
            t.Replace("({[[resolveFeatureAngle]]})", d.resolveFeatureAngle.ToString());
            t.Replace("({[[allowFreeStandingZoneFaces]]})", d.allowFreeStandingZoneFaces.ToString().ToLowerInvariant());

            var features = GetFeatures(d.Features);
            t.Replace("({[[features]]})", features);

            var surfaces = GetSurfaces(d.Surfaces);
            t.Replace("({[[surfaces]]})", surfaces);

            var regions = GetRegions(d.Regions);
            t.Replace("({[[regions]]})", regions);

            return t.ToString();
        }