Rendering

Render Methods

A render of your model can be observed using the display() method.

This will pick how to display a Part or Assembly based on the environment in which it’s run (see get_env_name for details).

You may also explicitly set how you’d like your model displayed by calling another display method, such as freecad_display(), web_display(), and so on.

Look at cqparts.display for more information, and options.

Rendered Materials

Each Part can be made to look different based on its material.

A basic render may simply display everything in a grey matt finish, whereas a more thoroughly designed model may use colours, transparencies, and metallic finishes to make a model look more impressive.

The properties of a solid’s render is stored in the a RenderProps instance, stored in the _render attribute of each Part instance.

Warning

At this time the only properties of a render are its colour (RGB) and alpha values. This may increase in future to support more advanced rendering, for things like reflectance, diffusion, ambiance, I don’t know, I’m not a graphics guy.

For progress regarding this, keep an eye on issue #36, and feel free to voice your opinion, and/or support there.