algorithmic modeling for Rhino
Tags:
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
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;
}
Eirik Kjølsrud
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? ...
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by