// _ ____ _____ _ ___ ___ __ // | |\/| | |_ | | | |_| / / \ | | \ ( (` // |_| | |_|__ |_| |_| | \_\_/ |_|_/ _)_) /// <summary> /// Add an operation to the member by specifiying the type of operation and the point at which the operation should occur /// </summary> /// <param name="pt"></param> /// <param name="type"></param> public void AddOperationByPointType(Triple pt, string type) { double location = _webAxis.ParameterAtPoint(pt) * _webAxis.Length; hOperation op = new hOperation(location, (Operation)System.Enum.Parse(typeof(Operation), type)); AddOperation(op); }
/// <summary> /// Get a combined list of all operations from a set of IMembers. /// Operation location for these operations will be set relative /// to the set of members as they would go through the Howick machine. /// </summary> /// <param name="members"></param> /// <returns></returns> public static List <hOperation> BuildCompositeListOfOperations(List <hMember> members) { var operations = new List <hOperation>(); var currentLocation = 0.0; var overhangingOps = false; foreach (hMember member in members) { overhangingOps = overhangingOps || OperationsOverhangFront(member); if (overhangingOps) { currentLocation += 2.5; } foreach (hOperation op in member.Operations) { var newOp = new hOperation(currentLocation + op._loc, op._type); operations.Add(newOp); } // Add this member's length to current location currentLocation += member.Length; // Add SHEAR waste to current location currentLocation += 0.125; overhangingOps = OperationsOverhangEnd(member); } return(operations); }
// ██████╗ ██╗ ██╗██████╗ // ██╔══██╗██║ ██║██╔══██╗ // ██████╔╝██║ ██║██████╔╝ // ██╔═══╝ ██║ ██║██╔══██╗ // ██║ ╚██████╔╝██████╔╝ // ╚═╝ ╚═════╝ ╚═════╝ // /// <summary> /// Adds operations to the member by specifying the locations and the types of operations /// </summary> /// <param name="member"></param> /// <param name="locations"></param> /// <param name="types"></param> /// <returns name="hMember"></returns> public hMember AddOperationByLocationType(List <double> locations, List <string> types) { hMember newMember = new hMember(this); for (int i = 0; i < locations.Count; i++) { hOperation op = new hOperation(locations[i], (Operation)System.Enum.Parse(typeof(Operation), types[i])); newMember.AddOperation(op); } return(newMember); }
public List <Triple> GetOperationPunchCenterPoint(hOperation op) { // Get location along web axis where operation occurs var locParam = op._loc / this.Length; var webAxisLocation = this.WebAxis.PointAtParameter(locParam); var lateralVecA = this.WebAxis.Direction.Cross(this.WebNormal).Normalized(); var lateralVecB = lateralVecA.Reverse(); switch (op._type) { case Operation.WEB: var webHoleA = webAxisLocation.Add(lateralVecA.Scale(15.0 / 16)); var webHoleB = webAxisLocation.Add(lateralVecB.Scale(15.0 / 16)); return(new List <Triple> { webAxisLocation, webHoleA, webHoleB }); case Operation.DIMPLE: case Operation.END_TRUSS: var centeredLocation = webAxisLocation.Add(this.WebNormal.Scale(studHeight / 2)); var dimpleHoleA = centeredLocation.Add(lateralVecA.Scale(studWidth / 2)); var dimpleHoleB = centeredLocation.Add(lateralVecB.Scale(studWidth / 2)); return(new List <Triple> { dimpleHoleA, dimpleHoleB }); case Operation.LIP_CUT: centeredLocation = webAxisLocation.Add(this.WebNormal.Scale(studHeight)); var lipCutHoleA = centeredLocation.Add(lateralVecA.Scale(studWidth / 2 - 0.25)); var lipCutHoleB = centeredLocation.Add(lateralVecB.Scale(studWidth / 2 - 0.25)); return(new List <Triple> { lipCutHoleA, lipCutHoleB }); case Operation.BOLT: case Operation.SERVICE_HOLE: case Operation.SWAGE: case Operation.NOTCH: default: return(new List <Triple> { webAxisLocation }); } }
/// <summary> /// Add an hOperation to the member's list of operations /// </summary> /// <param name="operation"></param> public void AddOperation(hOperation operation) { this.operations.Add(operation); }
/// <summary> /// AAdd an operation to the member by specifiying the type of operation and the location along the member at which the operation should occur /// </summary> /// <param name="location"></param> /// <param name="type"></param> public void AddOperationByLocationType(double location, string type) { hOperation op = new hOperation(location, (Operation)System.Enum.Parse(typeof(Operation), type)); AddOperation(op); }
/// <summary> /// Add an hOperation to the member's list of operations /// </summary> /// <param name="operation"></param> internal void AddOperation(hOperation operation) { this.operations.Add(operation); }