Skip to content

Commit

Permalink
Improved ReferencePoint.DrawViewportWires.
Browse files Browse the repository at this point in the history
  • Loading branch information
kike-garbo committed Nov 29, 2024
1 parent 326ad92 commit 1a101a3
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions src/RhinoInside.Revit.GH/Types/DatumPlane.cs
Original file line number Diff line number Diff line change
Expand Up @@ -839,13 +839,26 @@ protected override void DrawViewportWires(GH_PreviewWireArgs args)
args.Color
);

//if (args.Color == System.Drawing.Color.FromArgb(args.Color.A, GH_Document.DefaultSelectedPreviewColour))
//{
// var location = Location;
// args.Pipeline.DrawDirectionArrow(location.Origin, location.XAxis, System.Drawing.Color.DarkRed);
// args.Pipeline.DrawDirectionArrow(location.Origin, location.YAxis, System.Drawing.Color.DarkGreen);
// args.Pipeline.DrawDirectionArrow(location.Origin, location.ZAxis, System.Drawing.Color.DarkBlue);
//}
var showPlanes = Value.CoordinatePlaneVisibility;
if
(
showPlanes == ARDB.CoordinatePlaneVisibility.Always ||
(showPlanes == ARDB.CoordinatePlaneVisibility.WhenSelected && args.Color == System.Drawing.Color.FromArgb(args.Color.A, GH_Document.DefaultSelectedPreviewColour)))
{
var xyId = new string[]
{
Value.GetCoordinatePlaneReferenceYZ().ConvertToStableRepresentation(Document),
Value.GetCoordinatePlaneReferenceXZ().ConvertToStableRepresentation(Document),
Value.GetCoordinatePlaneReferenceXY().ConvertToStableRepresentation(Document)
};
var location = Location;
//if (!Value.ShowNormalReferencePlaneOnly)
{
args.Pipeline.DrawDirectionArrow(location.Origin, location.XAxis, System.Drawing.Color.DarkRed);
args.Pipeline.DrawDirectionArrow(location.Origin, location.YAxis, System.Drawing.Color.DarkGreen);
}
args.Pipeline.DrawDirectionArrow(location.Origin, location.ZAxis, System.Drawing.Color.DarkBlue);
}
}
}
#endregion
Expand Down

0 comments on commit 1a101a3

Please sign in to comment.