public int apply_cb()
{
int errorCode = 0;
try
{
//---- Enter your callback code here -----
NXOpen.TaggedObject[] curves = edge_select0.GetSelectedObjects();
double distance = double0.Value;
bool i = toggle0.Value;
CreateOffset(curves,distance,i);
CreateOffset(curves,-distance, i);
}
catch (Exception ex)
{
//---- Enter your exception handling code here -----
errorCode = 1;
theUI.NXMessageBox.Show("Block Styler", NXMessageBox.DialogType.Error, ex.ToString());
}
return errorCode;
}
private void CreateOffset(NXOpen.TaggedObject[] curves1, double distance, bool i)
{
//NXOpen.Session theSession = NXOpen.Session.GetSession();
NXOpen.Part workPart = theSession.Parts.Work;
NXOpen.Part
创建双边偏置曲线(通过TOGGLE控件来控制是否保留原来的曲线)
最新推荐文章于 2024-06-02 17:06:03 发布