77 lines
2.2 KiB
C#
77 lines
2.2 KiB
C#
using System;
|
|
using System.IO;
|
|
using ToolPathParser;
|
|
|
|
using FlatendCalc = CaeCuttingForce.FlatendCutter.ClassicalCuttingForceCalculate;
|
|
using ToroidalCalc = CaeCuttingForce.ToroidalCutter.ClassicalCuttingForceCalculate;
|
|
|
|
namespace ConsoleAppCuttingForce
|
|
{
|
|
internal class Program
|
|
{
|
|
private static void TestFlatend()
|
|
{
|
|
// 1. 刀位文件
|
|
const string inputPath = @"C:\Users\Luke\Desktop\618\toolposition.txt";
|
|
var toolPositions = ToolPositionList.Process(inputPath);
|
|
|
|
// 2. 刀具参数
|
|
var toolParams = new ToolParameters
|
|
{
|
|
NumberOfTeeth = 4,
|
|
ToolRadius = 4.0,
|
|
HelixAngle = 30.0
|
|
};
|
|
|
|
// 3. 切削系数
|
|
var coefficients = new CuttingForceCoefficients
|
|
{
|
|
kte = 1.0,
|
|
kre = 1.0,
|
|
kue = 1.0,
|
|
ktc = 1.0,
|
|
krc = 1.0,
|
|
kuc = 1.0
|
|
};
|
|
|
|
FlatendCalc.AxialDepthGroupedForceCalculator(toolPositions, coefficients, toolParams);
|
|
}
|
|
|
|
private static void TestToroidalCalc()
|
|
{
|
|
// 1. 刀位文件
|
|
const string inputPath = @"C:\Users\Luke\Desktop\618\toolposition.txt";
|
|
var toolPositions = ToolPositionList.Process(inputPath);
|
|
|
|
// 2. 刀具信息
|
|
var toolParams = new ToolParameters
|
|
{
|
|
NumberOfTeeth = 4,
|
|
ToolRadius = 5.0,
|
|
HelixAngle = 38.0,
|
|
ArcRadius = 0.3
|
|
};
|
|
|
|
var coefficients = new CuttingForceCoefficients
|
|
{
|
|
kte = 1.0,
|
|
kre = 1.0,
|
|
kue = 1.0,
|
|
ktc = 1.0,
|
|
krc = 1.0,
|
|
kuc = 1.0
|
|
};
|
|
|
|
ToroidalCalc.AxialDepthGroupedForceCalculator(toolPositions, coefficients, toolParams);
|
|
|
|
string csvFilePath = @"C:\Users\Luke\Desktop\618\tp.csv";
|
|
CsvFileHelper.WriteListToCsv(toolPositions, csvFilePath);
|
|
}
|
|
|
|
static void Main(string[] args)
|
|
{
|
|
TestToroidalCalc();
|
|
}
|
|
}
|
|
}
|