89 lines
3.3 KiB
C#
89 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using CaeMesh;
|
|
using CaeGlobals;
|
|
using System.ComponentModel;
|
|
using DynamicTypeDescriptor;
|
|
using CaeMesh.Meshing;
|
|
|
|
namespace CPSO.Forms
|
|
{
|
|
[Serializable]
|
|
public class ViewTetrahedralGmsh : ViewGmshSetupItem
|
|
{
|
|
// Variables
|
|
private TetrahedralGmsh _tetrahedronGmsh;
|
|
|
|
|
|
// Properties
|
|
[Category("Experimental for pyramids")]
|
|
[OrderedDisplayName(0, 10, "Recombine algorithm")]
|
|
[Description("Select the algorithm for recombination of triangles into quads.")]
|
|
[Id(1, 4)]
|
|
public GmshAlgorithmRecombineEnum AlgorithmRecombineEx
|
|
{
|
|
get { return _gmshSetupItem.AlgorithmRecombine; }
|
|
set { _gmshSetupItem.AlgorithmRecombine = value; UpdateVisibility(); }
|
|
}
|
|
//
|
|
[Category("Experimental for pyramids")]
|
|
[OrderedDisplayName(1, 10, "Recombine min quality")]
|
|
[Description("Minimum quality for quadrangles generated by recombination.")]
|
|
[Id(2, 4)]
|
|
public double RecombineMinQualityEx
|
|
{
|
|
get { return _gmshSetupItem.RecombineMinQuality; }
|
|
set { _gmshSetupItem.RecombineMinQuality = value; }
|
|
}
|
|
|
|
|
|
// Constructors
|
|
public ViewTetrahedralGmsh(TetrahedralGmsh tetrahedralGmsh)
|
|
{
|
|
_tetrahedronGmsh = tetrahedralGmsh;
|
|
SetBase(_tetrahedronGmsh);
|
|
//
|
|
_dctd.GetProperty(nameof(AlgorithmRecombine)).SetIsBrowsable(false);
|
|
_dctd.GetProperty(nameof(TransfiniteAngleDeg)).SetIsBrowsable(false);
|
|
//
|
|
_dctd.GetProperty(nameof(OptimizeFirstOrderShell)).SetIsBrowsable(false);
|
|
//
|
|
_dctd.GetProperty(nameof(ElementSizeType)).SetIsBrowsable(false);
|
|
_dctd.GetProperty(nameof(ElementScaleFactor)).SetIsBrowsable(false);
|
|
_dctd.GetProperty(nameof(NumberOfElements)).SetIsBrowsable(false);
|
|
_dctd.GetProperty(nameof(NormalizedLayerSizes)).SetIsBrowsable(false);
|
|
_dctd.GetProperty(nameof(NumOfElementsPerLayer)).SetIsBrowsable(false);
|
|
//
|
|
UpdateVisibility();
|
|
}
|
|
|
|
|
|
// Methods
|
|
public override MeshSetupItem GetBase()
|
|
{
|
|
return _tetrahedronGmsh;
|
|
}
|
|
public override void UpdateVisibility()
|
|
{
|
|
base.UpdateVisibility();
|
|
// Recombine
|
|
if (_dctd.GetProperty(nameof(AlgorithmRecombineEx)).IsBrowsable)
|
|
{
|
|
if (AlgorithmRecombine == GmshAlgorithmRecombineEnum.None)
|
|
{
|
|
_dctd.GetProperty(nameof(RecombineMinQualityEx)).SetIsBrowsable(false);
|
|
}
|
|
else
|
|
{
|
|
_dctd.GetProperty(nameof(RecombineMinQualityEx)).SetIsBrowsable(true);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|