public int FindParticleIndex(Point3d Pos, double tol, bool ByCurrent) { if (ByCurrent) { return(this.m_particles.FindIndex(x => RhinoMath.OrthoClose(x.Position, Pos, tol))); } return(this.m_particles.FindIndex(x => RhinoMath.OrthoClose(x.StartPosition, Pos, tol))); }
public int FindOrientedParticleIndex(Plane P, double tol, bool ByCurrent) { return(this.m_particles.FindIndex(x => (RhinoMath.OrthoClose(x.StartPosition, P.Origin, tol) && (x.StartOrientation.XAxis.IsParallelTo(P.XAxis) == 1)) && (x.StartOrientation.YAxis.IsParallelTo(P.YAxis) == 1))); }