...
Point3d arcCentrePoint = new Point3d(lengthX/2 - (rBend+hBend/2), bendCoor, lengthZ / 2);
Arc acArcPath;
using (acArcPath = new Arc(arcCentrePoint, rBend+hBend/2, 0, alfaBend* Math.PI/180))
{
Matrix3d curUCSMatrix = acDoc.Editor.CurrentUserCoordinateSystem;
CoordinateSystem3d curUCS = curUCSMatrix.CoordinateSystem3d;
Vector3d vRot = new Point3d(lengthX / 2, bendCoor, lengthZ / 2).
GetVectorTo(new Point3d(lengthX / 2, bendCoor + 10, lengthZ / 2));
acArcPath.TransformBy(Matrix3d.Rotation(Math.PI / 2, vRot, new Point3d(lengthX / 2, bendCoor, lengthZ / 2)));
acBlkTblRec.AppendEntity(acArcPath);
acTrans.AddNewlyCreatedDBObject(acArcPath, true);
}
PtToCheck = new Point3d(lengthZ / 2, bendCoor, lengthZ / 2);
SubentityId subentId = new SubentityId(SubentityType.Null, IntPtr.Zero);
FullSubentityPath path = new FullSubentityPath(idSolidSlice, subentId);
using (AcBr.Brep brep = new AcBr.Brep(path))
{
foreach (AcBr.Face face in brep.Faces)
{
PointContainment ptContainment = new PointContainment();
using (BrepEntity brepEnt = face.GetPointContainment(PtToCheck, out ptContainment))
{
{
if (ptContainment == PointContainment.Inside)
{
SubentityId[] arraySubentityId = new SubentityId[] { face.SubentityPath.SubentId };
using (Solid3d extrFromFace = new Solid3d())
{
extrFromFace.ExtrudeFacesAlongPath(arraySubentityId, acArcPath);
acBlkTblRec.AppendEntity(extrFromFace);
acTrans.AddNewlyCreatedDBObject(extrFromFace, true);
}
}
}
}
}
}
...