美文网首页狮猿社_Rhino
RhinoCommon 创建Offset Curve

RhinoCommon 创建Offset Curve

作者: 锦囊喵 | 来源:发表于2020-03-30 10:13 被阅读0次
    partial class Examples
    {
      public static Result OffsetCurve(RhinoDoc doc)
      {
        ObjRef obj_ref;
        var rs = RhinoGet.GetOneObject(
          "Select Curve", false, ObjectType.Curve, out obj_ref);
        if (rs != Result.Success)
          return rs;
        var curve = obj_ref.Curve();
        if (curve == null)
          return Result.Nothing;
    
        Point3d point;
        rs = RhinoGet.GetPoint("Select Side", false, out point);
        if (rs != Result.Success)
          return rs;
        if (point == Point3d.Unset)
          return Result.Nothing;
    
        var curves = curve.Offset(point, Vector3d.ZAxis, 1.0,
          doc.ModelAbsoluteTolerance, CurveOffsetCornerStyle.None);
    
        foreach (var offset-curve in curves)
          doc.Objects.AddCurve(offset-curve);
    
        doc.Views.Redraw();
        return Result.Success;
      }
    }
    

    https://developer.rhino3d.com/samples/rhinocommon/offset-curve/

    相关文章

      网友评论

        本文标题:RhinoCommon 创建Offset Curve

        本文链接:https://www.haomeiwen.com/subject/omumuhtx.html