8.8.24170.13001, 2024-06-18
Why doesn’t
this _ScriptEditor C# script
using System;
using System.Collections.Generic;
using System.Diagnostics;
using Rhino;
using Rhino.Geometry;
var doc = RhinoDoc.ActiveDoc;
var ps = new PlaneSurface(
Rhino.Geometry.Plane.WorldXY,
new Interval(0.0, 10.0),
new Interval(0.0, 10.0));
var brep_In = ps.ToBrep();
doc.Objects.AddBrep(brep_In);
var curve = new LineCurve(
new Point3d(0.0, 6.0, 0.25),
new Point3d(10.0, 6.0, 0.75));
doc.Objects.AddCurve(curve);
var face = brep_In.Faces[0];
var out_fillets = new List<Brep>();
double[] fitResults;
face.FilletSurfaceToCurve(
curve: curve,
t: curve.Domain.Mid,
u: face.Domain(0).Mid,
v: face.Domain(1).Mid,
radius: 2.0,
alignToCurve: 1,
railDegree: 3,
arcDegree: 2,
arcSliders: new List<double>(){ 0.0, 0.0 },
numBezierSrfs: 1,
tolerance: doc.ModelAbsoluteTolerance,
out_fillets: new List<Brep>(),
fitResults: out fitResults);
Console.WriteLine($"out_fillets.Count: {out_fillets.Count}");
if (out_fillets.Count > 1)
{
foreach(var brep_Res in out_fillets)
doc.Objects.AddBrep(brep_Res);
}
doc.Views.Redraw();
produce a fillet?
Also, setting alignToCurve to 0 crashes Rhino.
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.brepface/filletsurfacetocurve
https://developer.rhino3d.com/api/rhinocommon/rhino.geometry.curve/filletsurfacetocurve
Thank you