It is common the need to draw an entity that will be shown above all other entities. For this task, there is not a univocal answer and there are different solutions that can be implemented based on the working context. For one of them, you can use the approach shown here.
Here, we discuss the possibility to use our TempEntities to achieve this task.
Here is a sample code:
Brep brp1 = Brep.CreateBox(10, 10, 10);
model1.Entities.Add(brp1, Color.Green);
Joint jt = new Joint(Point3D.Origin, 5, 2);
jt.Regen(1);
model1.TempEntities.Add(jt, Color.Red);
Mesh arrow = Mesh.CreateArrow(Point3D.Origin, new Vector3D(0, 1, 1), 3, 7, 5, 3, 12,Mesh.natureType.Plain, Mesh.edgeStyleType.Free);
arrow.Translate(-10,-10,-10);
arrow.Regen(0.1);
model1.TempEntities.Add(arrow,Color.Yellow);
TempEntities represent a powerful tool since they are natively supported, but they involve a few limitations that are listed in this article.
Comments
Please sign in to leave a comment.