예제 #1
0
 public static Bar SetBarInsertionPoint(this Bar bar, BarInsertionPointLocation insertionPoint = BarInsertionPointLocation.Centroid, bool modifyStiffness = true)
 {
     return((Bar)bar.AddFragment(new BarInsertionPoint()
     {
         InsertionPoint = insertionPoint, ModifyStiffness = modifyStiffness
     }, true));
 }
예제 #2
0
        /***************************************************/

        public static Bar SetAutoLengthOffset(this Bar bar, bool autoLengthOffset, double rigidZoneFactor)
        {
            if (rigidZoneFactor < 0 || rigidZoneFactor > 1.0)
            {
                rigidZoneFactor = Math.Min(Math.Max(0, rigidZoneFactor), 1);
                Engine.Base.Compute.RecordWarning("Rigid zone factor needs to be between 0 and 1. The value has been updated to fit in this interval");
            }

            return((Bar)bar.AddFragment(new AutoLengthOffset {
                AutoOffset = autoLengthOffset, RigidZoneFactor = rigidZoneFactor
            }, true));
        }
예제 #3
0
        public static Bar SetBarAutoMesh(this Bar bar, bool autoMesh = false, bool autoMeshAtPoints = false, bool autoMeshAtLines = false, int numSegs = 0, double autoMeshMaxLength = 0.0)
        {
            if (numSegs < 0)
            {
                numSegs = 0;
                Engine.Base.Compute.RecordWarning("Number of segments must be positive or zero. If zero, number of elements is not checked when automatic meshing is done.");
            }

            if (autoMeshMaxLength < 0)
            {
                autoMeshMaxLength = 0.0;
                Engine.Base.Compute.RecordWarning("Max length must be positive. If zero, element length is not checked when automatic meshing is done.");
            }

            return((Bar)bar.AddFragment(new BarAutoMesh {
                AutoMesh = autoMesh, AutoMeshAtPoints = autoMeshAtPoints, AutoMeshAtLines = autoMeshAtLines, NumSegs = numSegs, AutoMeshMaxLength = autoMeshMaxLength
            }, true));
        }
예제 #4
0
 public static Bar SetBarDesignProcedure(this Bar bar, BarDesignProcedureType designProcedure)
 {
     return((Bar)bar.AddFragment(new BarDesignProcedure {
         DesignProcedure = designProcedure
     }, true));
 }