1

Is it possible to enable osnaps on geometry drawn using WorldDraw in a DrawableOverrule? I am creating geometry that displays a line as a conveyor section. The only geometry that is snap-able is the original line. None of the overruled geometry is snap-able. Any assistance is appreciated.

As an example, here I am creating a divider line that runs perpendicular to my main line. I want to enable normal osnaps on the divider line.

private static void CreateDividerLine(WorldDraw wd, Line line, Point3d ul, Point3d ur, Vector3d endVec, double endAng, double distance)
{

    Point3d point = line.GetPointAtDist(distance);

    Matrix3d m1 = Matrix3d.Displacement(Point3d.Origin.GetVectorTo(point));
    Matrix3d mr1 = Matrix3d.Rotation(endAng + (Math.PI / 2), Vector3d.ZAxis, point);
    Matrix3d mrx1 = Matrix3d.Rotation(-Math.PI / 2, endVec, point);

    Point3d ulDivider = ul.TransformBy(mrx1.PostMultiplyBy(mr1).PostMultiplyBy(m1));
    Point3d urDivider = ur.TransformBy(mrx1.PostMultiplyBy(mr1).PostMultiplyBy(m1));

    wd.Geometry.WorldLine(ulDivider, urDivider);
}
RBT
  • 24,161
  • 21
  • 159
  • 240

0 Answers0