public void DisplayAlongLine(AcGe.Point3d directionPoint, double offset, double step, int quantity) { AcDb.Ray ray = new AcDb.Ray { BasePoint = this.BasePointArrays, UnitDir = this.BasePointArrays.GetVectorTo(directionPoint) }; double length = offset; for (int i = 0; i < quantity; i++) { ServiceBlockElements.InsertBlock(this.NameBlock, ray.GetPointAtDist(length), this.ScaleBlock, this.RotationBlock); length += step; } }
public static bool InPoly(_AcGe.Point3d vertexPoint, double xOffs, double yOffs, _AcDb.Entity pElFG) { using (_AcDb.Ray ray = new _AcDb.Ray()) { ray.BasePoint = vertexPoint; ray.UnitDir = new _AcGe.Vector3d(xOffs, yOffs, 0.0); _AcGe.Point3dCollection col = new _AcGe.Point3dCollection(); ((_AcDb.Entity)ray).IntersectWith(pElFG, _AcDb.Intersect.OnBothOperands, col, IntPtr.Zero, IntPtr.Zero); if ((col.Count % 2) == 1) { return(true); } else { return(false); } } }