Message 1 of 1
Objects not being drawn in jig
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey everyone
I'm trying to mimic a hovering effect with my jig, I don't think I need to go into details since my problem seems to lie in Autocad'ss jig's worldDraw method. I have written the method bellow in a class that is injected into the worldDraw method of my jig:
public void Draw(WorldDraw draw, Point3d point)
{
var ed = Application.DocumentManager.MdiActiveDocument.Editor;
ed.UpdateScreen();
// Highlight regions
foreach (var region in _regionsToHighlight) {
region.ColorIndex = 1;
region.LineWeight = LineWeight.LineWeight100;
draw.Geometry.Draw(region);
}
var closestPointUnRound =
PointUtils.GetClosestPointToFast(point.Convert2d(), _Kd2Tree);
var closestPoint = LocalUtils.RoundPoint(closestPointUnRound.Convert3d());
if (!_centroidDict.ContainsKey(closestPoint))
return;
var reg = _centroidDict[closestPoint];
if (!Check.IsPointInside(reg, point))
{
return;
}
reg.ColorIndex = 3;
draw.Geometry.Draw(reg);
if (_centoidTextDict.ContainsKey(closestPoint))
{
var text = _centoidTextDict[closestPoint];
text.Height = 100;
text.ColorIndex = 1;
draw.Geometry.Draw(text);
}
}Here is the worldDraw of my jig function:
protected override bool WorldDraw(WorldDraw draw)
{
if (_jigWorldDraw != null)
{
_jigWorldDraw.Draw(draw, _point);
}
return true;
}as you can see nothing special here.
So the problem is I have many objects that need to be drawn, and even though my break point at the draw.Geometry.Draw seems to be hit(forexample for the text) the text isn't being drawn. only a handful of the objects are being drawn. any help would be appreciated.