//Для построения от рабочих плоскостей. public PlanarSketch MakeNewSketch(int n, double offset) { Inventor.WorkPlane MainPlane = PartDefinition.WorkPlanes[n]; //[1 - ZY; 2 - ZX; 3 - XY] Inventor.WorkPlane OffsetPlane = PartDefinition.WorkPlanes.AddByPlaneAndOffset(MainPlane, offset, false); Inventor.PlanarSketch sketch = PartDefinition.Sketches.Add(OffsetPlane, false); return(sketch); }
//Для построения на поверхности детали. private PlanarSketch MakeNewSketch(Object Face, double Offset) { Inventor.WorkPlane OffsetPlane = _inventorApi.PartDefinition.WorkPlanes.AddByPlaneAndOffset(Face, Offset, false); Inventor.PlanarSketch sketch = _inventorApi.PartDefinition.Sketches.Add(OffsetPlane, false); //Face Face1 = partDef.SurfaceBodies[1].Faces[3]; return(sketch); }
//Для построения на поверхности детали. public PlanarSketch MakeNewSketch(Object face, double offset) { Inventor.WorkPlane OffsetPlane = PartDefinition.WorkPlanes.AddByPlaneAndOffset(face, offset, false); Inventor.PlanarSketch sketch = PartDefinition.Sketches.Add(OffsetPlane, false); return(sketch); }