private void SectionBody(Body body)
{
Part workPart = theSession.Parts.Work;
for (int i = 150; i < 350; i+=5)
{
var curveSectionBuilder = workPart.Features.CreateSectionCurveBuilder(null);
curveSectionBuilder.ObjectsToSection.Add(body);
curveSectionBuilder.Tolerance = 0.01;
var plane = workPart.Planes.CreatePlane(new Point3d(0, 0, i), new Vector3d(0, 0, 1), SmartObject.UpdateOption.AfterModeling);
curveSectionBuilder.SectionPlane = plane;
curveSectionBuilder.Commit();
}
private void SectionFaces(TaggedObject[] faces)
{
Part workPart = theSession.Parts.Work;
for (int i = 260; i < 350; i += 5)
{
var curveSectionBuilder = workPart.Features.CreateSectionCurveBuilder(null);
curveSectionBuilder.ObjectsToSection.Add(faces);
curveSectionBuilder.Tolerance = 0.01;
var plane = workPart.Planes.CreatePlane(new Point3d(0, 0, i), new Vector3d(0, 0, 1), SmartObject.UpdateOption.AfterModeling);
curveSectionBuilder.SectionPlane = plane;
curveSectionBuilder.Commit();
}
}