Prod.: Engine, ver.: 6021, ID: 60001637, Wish : Rendering cliping surfaces with specific color when SectionClipCoverFaces is true

Wish : Rendering cliping surfaces with specific color when SectionClipCoverFaces is true

Article60001637
TypeWish
ProductEngine
Version6021
Date Added3/8/2012
FixedYes [3/8/2012]
Submitted byAlessio
Keywords

Subject

Rendering cliping surfaces with specific color when SectionClipCoverFaces is true

Summary

Rendering cliping surfaces with specific color when SectionClipCoverFaces is true

Solution

In 6022 a new property SectionClipCoverFacesColor of vdGlobalRenderProperties object added.

Default value is Color.Empty in order the active PolyFace color to be used.

Example in C#:

               //add a blue sphere with radius 3 and center 0,0,0
                doc.ActivePenColor = new vdColor(Color.Blue);
                doc.CommandAction.CmdSphere(new gPoint(0, 0, 0), 3.0, 15, 15);

                //add a new section clip
                vdSectionClip clip = new vdSectionClip();
                clip.Name = "Section_1";
                clip.OriginPoint = new gPoint(0,0,0);
                clip.Direction = new Vector(0,0,-1);//visible side of drawing
                clip.Enable = true;
                doc.ActiveLayOut.Sections.AddItem(clip);

                //enable to cover the section of polyfaces with filled regions
                doc.GlobalRenderProperties.SectionClipCoverFaces = true;

                //set the color of filled region to be Green
                doc.GlobalRenderProperties.SectionClipCoverFacesColor = Color.Green;

                //render 3d scene
                doc.CommandAction.View3D("SHADEON");