private bool CreatFeeler() { double z = this.datum.EleHeight; try { this.FeelerBody = ExtrudeUtils.CreateExtrude(new Vector3d(0, 0, 1), "0", z.ToString(), null, sketch.Center).GetBodies()[0]; MoveObject.CreateMoveObjToXYZ("moveBoxX", "moveBoxY", "moveBoxZ", null, FeelerBody); return(true); } catch (NXException ex) { ClassItem.WriteLogFile("创建对刀台错误!" + ex.Message); return(false); } }
private bool CreateDatum() { Vector3d dir = new Vector3d(0, 0, -1); try { Body body1 = ExtrudeUtils.CreateExtrude(dir, "0", "DatumHeigth", null, sketch.LeiLine.ToArray()).GetBodies()[0]; CreateChamfer(body1.Tag); SetDatumAttr(body1); Body body2 = ExtrudeUtils.CreateExtrude(dir, "DatumHeigth", "extrudePreparation", null, sketch.WaiLine.ToArray()).GetBodies()[0]; this.DatumBody = BooleanUtils.CreateBooleanFeature(body1, false, false, NXOpen.Features.Feature.BooleanType.Unite, body2).GetBodies()[0]; return(true); } catch (NXException ex) { ClassItem.WriteLogFile("创建基准台错误!" + ex.Message); return(false); } }