generative modeling for Rhino
Tags: Brep, Closed, Curve, IsPointInside
Permalink Reply by Eirik K on January 19, 2011 at 8:59am 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
Permalink Reply by Eirik K on January 19, 2011 at 9:07am when I read the SDK
Determine if a 3D point is inside of a brep. This function only makes sense for closed manifold Breps.
Permalink Reply by Eirik K on January 19, 2011 at 9:46am Would the BrepEdge.Contains(Point3d) do the trick?
How to get from a surface to a BrepEdge then? ...
Permalink Reply by Daniel Davis on January 19, 2011 at 6:56pm
Permalink Reply by RG on January 20, 2011 at 3:48am Hi,
You need to have a gap between the point and the brep, they can't do co-planar.
Regards,
Permalink Reply by Fred Pieri on January 16, 2013 at 10:10am Hello,
There is now the fonction " Containment" !
You can found it in Curve> analysis
Regards
fred
Added by Mgeorgio 0 Comments 0 Likes
Added by Mgeorgio 0 Comments 0 Likes
© 2013 Created by Scott Davidson.
Powered by