在 Open CASCADE (OCC) 中,偏置曲线(Offset Curve)和曲面求交线涉及多个 API,分别适用于 2D、3D、闭合、非闭合曲线,以及曲面交线的偏置。以下是对应的方法及其用途:
Geom2d_OffsetCurve 、BRepOffsetAPI_MakeOffset、Geom_OffsetCurve、GeomAPI_IntSS
1、Geom2d_OffsetCurve
TopoDS_Face face = m_currentPlane;
TopoDS_Shape shape = m_currentShape; // 你的模型
Standard_Real u1, u2;
Handle(Geom2d_Curve) curve2d = BRep_Tool::CurveOnSurface(edge, face, u1, u2);
if (!curve2d.IsNull()) {
//二维曲线偏执
// 偏移距离
Standard_Real offsetDist = 0.1;
//vtkSmartPointer<IVtk