generative modeling for Rhino
Hi Brian. Did you ever find a way?
I'm trying to get the curvature of a point on a curve, if this point is inside a given area.
It doesn't really seem to work? Where is my error?
private void RunScript(Curve curve, Surface surface, ref object A)
// border to check if inside
Brep border = Brep.CreateFromSurface(surface);
// return list
test = new List
// divide curve
double divisions = curve.DivideByCount(100, true);
for(int i = 0; i < divisions.Length; i++)
Point3d examine = curve.PointAt(divisions[i]);
Vector3d curvature = curve.CurvatureAt(divisions[i]);
if(border.IsPointInside(examine, RhinoMath.SqrtEpsilon, false))
test.Add(new Line(examine, curvature));
A = test;
when I read the SDK
Determine if a 3D point is inside of a brep. This function only makes sense for closed manifold Breps.
Would the BrepEdge.Contains(Point3d) do the trick?
How to get from a surface to a BrepEdge then? ...
You need to have a gap between the point and the brep, they can't do co-planar.
There is now the fonction " Containment" !
You can found it in Curve> analysis