API功能大纲:
namespace Bentley.DgnPlatformNET
{public class Modify : SolidUtil{public Modify();public static BentleyStatus BlendEdges(ref SolidKernelEntity target, SubEntity[] edgesIn, double[] radiiIn, int nEdgesIn, bool propagateSmoothIn);public static BentleyStatus BooleanCut(ref SolidKernelEntity target, CurveVector planarToolIn, CutDirectionMode directionModeIn, CutDepthMode depthModeIn, double distanceIn, bool invertIn, DVector3d defaultNormalIn, uint nodeIdIn);public static BentleyStatus BooleanCut(ref SolidKernelEntity target, CurveVector planarToolIn, CutDirectionMode directionModeIn, CutDepthMode depthModeIn, double distanceIn, bool invertIn, ValueType defaultNormalIn, uint nodeIdIn);public static BentleyStatus BooleanIntersect(ref SolidKernelEntity target, ref SolidKernelEntity[] tools, int nToolsIn);public static BentleyStatus BooleanSubtract(ref SolidKernelEntity target, ref SolidKernelEntity[] tools, int nToolsIn);public static BentleyStatus BooleanUnion(ref SolidKernelEntity target, ref SolidKernelEntity[] tools, int nToolsIn);public static BentleyStatus ChamferEdges(ref SolidKernelEntity target, SubEntity[] edgesIn, double[] values1In, double[] values2In, int nEdgesIn, ChamferMode modeIn, bool propagateSmoothIn);public static BentleyStatus DeleteFaces(ref SolidKernelEntity target, SubEntity[] facesIn, int nFacesIn);public static BentleyStatus DeleteRedundantTopology(ref SolidKernelEntity target);public static BentleyStatus Emboss(ref SolidKernelEntity target, SolidKernelEntity toolIn, bool reverseDirectionIn);public static BentleyStatus HollowFaces(ref SolidKernelEntity target, double defaultDistanceIn, SubEntity[] facesIn, double[] distancesIn, int nFacesIn, StepFacesOption addStepIn);public static BentleyStatus ImprintCurveVectorOnBody(ref SolidKernelEntity target, CurveVector curveVectorIn, ValueType directionIn, bool extendOpenCurvesToEdgeIn);public static BentleyStatus ImprintCurveVectorOnBody(ref SolidKernelEntity target, CurveVector curveVectorIn, DVector3d directionIn, bool extendOpenCurvesToEdgeIn);public static BentleyStatus ImprintWiresOnFace(out SubEntity faceOut, SolidKernelEntity[] wiresIn, bool extendToEdgeIn);public static BentleyStatus OffsetFaces(ref SolidKernelEntity target, SubEntity[] facesIn, double[] distancesIn, int nFacesIn, StepFacesOption addStepIn);public static BentleyStatus SewBodies(out SolidKernelEntity[] sewn, out SolidKernelEntity[] unsewn, ref SolidKernelEntity[] tools, int nToolsIn, double gapWidthBoundIn, int nIterationsIn);public static BentleyStatus SpinBody(ref SolidKernelEntity target, ValueType axisIn, double angleIn);public static BentleyStatus SpinFaces(ref SolidKernelEntity target, SubEntity[] facesIn, int nFacesIn, ValueType axisIn, double angleIn);public static BentleyStatus SweepBody(ref SolidKernelEntity target, ValueType pathIn);public static BentleyStatus SweepBody(ref SolidKernelEntity target, DVector3d pathIn);public static BentleyStatus SweepFaces(ref SolidKernelEntity target, SubEntity[] facesIn, int nFacesIn, ValueType pathIn);public static BentleyStatus SweepFaces(ref SolidKernelEntity target, SubEntity[] facesIn, int nFacesIn, DVector3d pathIn);public static BentleyStatus ThickenSheet(ref SolidKernelEntity target, double frontDistanceIn, double backDistanceIn);public static BentleyStatus TransformBody(ref SolidKernelEntity entityOut, ref DTransform3d transformIn);public static BentleyStatus TransformFaces(ref SolidKernelEntity target, SubEntity[] facesIn, ref DTransform3d translationsIn, int nFacesIn, StepFacesOption addStepIn);public enum CutDepthMode{All = 0,Blind = 1}public enum StepFacesOption{No = 0,Smooth = 1,NonCoincident = 2,All = 3}public enum CutDirectionMode{Forward = 0,Backward = 1,Both = 2}public enum ChamferMode{Ranges = 0,Length = 1,Distances = 2,DistanceAngle = 3,AngleDistance = 4}}
}
API功能明细:
// 将指定的边缘进行混合(例如,圆角处理)
public static BentleyStatus BlendEdges( ref SolidKernelEntity target, // 目标实体 SubEntity[] edgesIn, // 要处理的边缘数组 double[] radiiIn, // 每个边缘的半径数组 int nEdgesIn, // 要处理的边缘数量 bool propagateSmoothIn // 是否传播平滑效果
); // 使用平面工具对目标实体进行布尔切割操作
public static BentleyStatus BooleanCut( ref SolidKernelEntity target, // 目标实体 CurveVector planarToolIn, // 平面切割工具 CutDirectionMode directionModeIn, // 切割方向模式 CutDepthMode depthModeIn, // 切割深度模式 double distanceIn, // 切割距离 bool invertIn, // 是否反转切割结果 DVector3d defaultNormalIn, // 默认法线向量 uint nodeIdIn // 节点ID(可能是用于特定上下文或标识)
); // 与上一个方法类似,但默认法线向量的数据类型不同
public static BentleyStatus BooleanCut( // ... 参数与上一个方法类似,但defaultNormalIn的类型不同 ... ValueType defaultNormalIn, // 默认法线向量的值类型 // ... 其余参数相同 ...
); // 对目标实体和一系列工具实体进行布尔求交操作
public static BentleyStatus BooleanIntersect( ref SolidKernelEntity target, // 目标实体 ref SolidKernelEntity[] tools, // 工具实体数组 int nToolsIn // 工具实体的数量
); // 对目标实体和一系列工具实体进行布尔相减操作
public static BentleyStatus BooleanSubtract( // ... 参数与BooleanIntersect类似 ...
); // 对目标实体和一系列工具实体进行布尔并集操作
public static BentleyStatus BooleanUnion( // ... 参数与BooleanIntersect类似 ...
); // 对目标实体的边缘进行倒角处理
public static BentleyStatus ChamferEdges( ref SolidKernelEntity target, // 目标实体 SubEntity[] edgesIn, // 要处理的边缘数组 double[] values1In, // 第一个倒角值数组 double[] values2In, // 第二个倒角值数组 int nEdgesIn, // 要处理的边缘数量 ChamferMode modeIn, // 倒角模式 bool propagateSmoothIn // 是否传播平滑效果
); // 从目标实体中删除指定的面
public static BentleyStatus DeleteFaces( ref SolidKernelEntity target, // 目标实体 SubEntity[] facesIn, // 要删除的面数组 int nFacesIn // 要删除的面的数量
); // 从目标实体中删除冗余的拓扑结构
public static BentleyStatus DeleteRedundantTopology( ref SolidKernelEntity target // 目标实体
); // 使用工具实体对目标实体进行浮雕处理
public static BentleyStatus Emboss( ref SolidKernelEntity target, // 目标实体 SolidKernelEntity toolIn, // 工具实体 bool reverseDirectionIn // 是否反转浮雕方向
); // 对目标实体的面进行挖空处理
public static BentleyStatus HollowFaces( ref SolidKernelEntity target, // 目标实体 double defaultDistanceIn, // 默认挖空距离 SubEntity[] facesIn, // 要挖空的面数组 double[] distancesIn, // 每个面的挖空距离数组 int nFacesIn, // 要挖空的面的数量 StepFacesOption addStepIn // 挖空面的阶梯选项
); // 在目标实体上压印曲线向量
public static BentleyStatus ImprintCurveVectorOnBody( ref SolidKernelEntity target, // 目标实体 CurveVector curveVectorIn, // 要压印的曲线向量 ValueType directionIn, // 压印方向的值类型 bool extendOpenCurvesToEdgeIn // 是否将开放的曲线延伸到边缘
);// 将指定的边缘进行混合(例如,圆角处理)
public static BentleyStatus BlendEdges( ref SolidKernelEntity target, // 目标实体 SubEntity[] edgesIn, // 要处理的边缘数组 double[] radiiIn, // 每个边缘的半径数组 int nEdgesIn, // 要处理的边缘数量 bool propagateSmoothIn // 是否传播平滑效果
); // 使用平面工具对目标实体进行布尔切割操作
public static BentleyStatus BooleanCut( ref SolidKernelEntity target, // 目标实体 CurveVector planarToolIn, // 平面切割工具 CutDirectionMode directionModeIn, // 切割方向模式 CutDepthMode depthModeIn, // 切割深度模式 double distanceIn, // 切割距离 bool invertIn, // 是否反转切割结果 DVector3d defaultNormalIn, // 默认法线向量 uint nodeIdIn // 节点ID(可能是用于特定上下文或标识)
); // 与上一个方法类似,但默认法线向量的数据类型不同
public static BentleyStatus BooleanCut( // ... 参数与上一个方法类似,但defaultNormalIn的类型不同 ... ValueType defaultNormalIn, // 默认法线向量的值类型 // ... 其余参数相同 ...
); // 对目标实体和一系列工具实体进行布尔求交操作
public static BentleyStatus BooleanIntersect( ref SolidKernelEntity target, // 目标实体 ref SolidKernelEntity[] tools, // 工具实体数组 int nToolsIn // 工具实体的数量
); // 对目标实体和一系列工具实体进行布尔相减操作
public static BentleyStatus BooleanSubtract( // ... 参数与BooleanIntersect类似 ...
); // 对目标实体和一系列工具实体进行布尔并集操作
public static BentleyStatus BooleanUnion( // ... 参数与BooleanIntersect类似 ...
); // 对目标实体的边缘进行倒角处理
public static BentleyStatus ChamferEdges( ref SolidKernelEntity target, // 目标实体 SubEntity[] edgesIn, // 要处理的边缘数组 double[] values1In, // 第一个倒角值数组 double[] values2In, // 第二个倒角值数组 int nEdgesIn, // 要处理的边缘数量 ChamferMode modeIn, // 倒角模式 bool propagateSmoothIn // 是否传播平滑效果
); // 从目标实体中删除指定的面
public static BentleyStatus DeleteFaces( ref SolidKernelEntity target, // 目标实体 SubEntity[] facesIn, // 要删除的面数组 int nFacesIn // 要删除的面的数量
); // 从目标实体中删除冗余的拓扑结构
public static BentleyStatus DeleteRedundantTopology( ref SolidKernelEntity target // 目标实体
); // 使用工具实体对目标实体进行浮雕处理
public static BentleyStatus Emboss( ref SolidKernelEntity target, // 目标实体 SolidKernelEntity toolIn, // 工具实体 bool reverseDirectionIn // 是否反转浮雕方向
); // 对目标实体的面进行挖空处理
public static BentleyStatus HollowFaces( ref SolidKernelEntity target, // 目标实体 double defaultDistanceIn, // 默认挖空距离 SubEntity[] facesIn, // 要挖空的面数组 double[] distancesIn, // 每个面的挖空距离数组 int nFacesIn, // 要挖空的面的数量 StepFacesOption addStepIn // 挖空面的阶梯选项
); // 在目标实体上压印曲线向量
public static BentleyStatus ImprintCurveVectorOnBody( ref SolidKernelEntity target, // 目标实体 CurveVector curveVectorIn, // 要压印的曲线向量 ValueType directionIn, // 压印方向的值类型 bool extendOpenCurvesToEdgeIn // 是否将开放的曲线延伸到边缘
);
// 在实体上压印曲线向量
public static BentleyStatus ImprintCurveVectorOnBody( ref SolidKernelEntity target, // 目标实体(引用) CurveVector curveVectorIn, // 曲线向量 DVector3d directionIn, // 方向向量 bool extendOpenCurvesToEdgeIn // 是否将开放曲线扩展到边缘
); // 在面上压印线框
public static BentleyStatus ImprintWiresOnFace( out SubEntity faceOut, // 输出的面(输出参数) SolidKernelEntity[] wiresIn, // 输入的线框数组 bool extendToEdgeIn // 是否扩展到边缘
); // 偏移面
public static BentleyStatus OffsetFaces( ref SolidKernelEntity target, // 目标实体(引用) SubEntity[] facesIn, // 输入的面数组 double[] distancesIn, // 偏移距离数组 int nFacesIn, // 面的数量 StepFacesOption addStepIn // 添加步骤的选项
); // 缝合实体
public static BentleyStatus SewBodies( out SolidKernelEntity[] sewn, // 缝合后的实体数组(输出参数) out SolidKernelEntity[] unsewn, // 未缝合的实体数组(输出参数) ref SolidKernelEntity[] tools, // 工具实体数组(引用) int nToolsIn, // 工具实体的数量 double gapWidthBoundIn, // 间隙宽度的界限 int nIterationsIn // 迭代次数
); // 旋转实体
public static BentleyStatus SpinBody( ref SolidKernelEntity target, // 目标实体(引用) ValueType axisIn, // 旋转轴 double angleIn // 旋转角度
); // 旋转面
public static BentleyStatus SpinFaces( ref SolidKernelEntity target, // 目标实体(引用) SubEntity[] facesIn, // 输入的面数组 int nFacesIn, // 面的数量 ValueType axisIn, // 旋转轴 double angleIn // 旋转角度
); // 沿路径扫掠实体
// 有两个重载版本,分别接受ValueType和DVector3d作为路径参数
public static BentleyStatus SweepBody( ref SolidKernelEntity target, // 目标实体(引用) ValueType pathIn // 路径(ValueType类型)
); public static BentleyStatus SweepBody( ref SolidKernelEntity target, // 目标实体(引用) DVector3d pathIn // 路径(DVector3d类型)
); // 沿路径扫掠面
// 同样有两个重载版本,分别接受ValueType和DVector3d作为路径参数
public static BentleyStatus SweepFaces( ref SolidKernelEntity target, // 目标实体(引用) SubEntity[] facesIn, // 输入的面数组 int nFacesIn, // 面的数量 ValueType pathIn // 路径(ValueType类型)
); public static BentleyStatus SweepFaces( ref SolidKernelEntity target, // 目标实体(引用) SubEntity[] facesIn, // 输入的面数组 int nFacesIn, // 面的数量 DVector3d pathIn // 路径(DVector3d类型)
); // 加厚片体
public static BentleyStatus ThickenSheet( ref SolidKernelEntity target, // 目标实体(引用) double frontDistanceIn, // 前面加厚距离 double backDistanceIn // 后面加厚距离
); // 变换实体
public static BentleyStatus TransformBody( ref SolidKernelEntity entityOut, // 输出的实体(引用) ref DTransform3d transformIn // 变换矩阵(引用)
); // 变换面
public static BentleyStatus TransformFaces( ref SolidKernelEntity target, // 目标实体(引用) SubEntity[] facesIn, // 输入的面数组 ref DTransform3d translationsIn, // 变换矩阵(引用),这里可能是笔误,通常称为“变换”而不仅仅是“平移” int nFacesIn, // 面的数量 StepFacesOption addStepIn // 添加步骤的选项
);