How do I change the color of a few faces from the Brep.Faces array?

Brep entity drawing is optimized, so you need to recompile the entity after changing any face color. For version 2022:

myBrep.Faces[5].ARGB = Color.Red.ToArgb();
myBrep.RegenMode = regenType.CompileOnly; myBrep.Compile(new CompileParams(design1)); design1.Invalidate();

For previous versions:

myBrep.Faces[5].Color = Color.Red;

myBrep.RegenMode = CompileOnly;
myBrep.Compile(new CompileParams(design1));

design1.Invalidate();
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

5 comments
  • how define  design1?

     

    0
  • Hi Yaakov,

    design1 is the main Eyeshot control in this case.

    0
  • can you show me sample how declere it?

    i use ViewportLayout and i cant find the way to create this "compileParams"

     

     

     

    0
  • What Eyeshot version are you using? What constructors does your CompileParams class support?

    0
  • Ultimate 2020

    control its ViewportLayout and i use Brep

    that was create from Region

    and i add it as entity to Block by Block Refernce

    0

Please sign in to leave a comment.