Prod.: Engine, ver.: 6011, ID: 60000384, Wish : Slice Method and SectionClipping with CoverFaces.

Wish : Slice Method and SectionClipping with CoverFaces.

Article60000384
TypeWish
ProductEngine
Version6011
Date Added1/17/2008
FixedYes [3/4/2008]
Submitted byDavid Power
Keywords

Subject

Slice Method and SectionClipping with CoverFaces.

Summary

Is there a way that i can show a sliced polyface and see the faces that i "cut" covered and not being able to see inside the object?

Solution

In version 6012 the following changes have been commited:
A new override method of the slice command was implemented and exported as following:

<summary>Changes the vertexlist and facelist of the polyface in order to be sliced using a plane from the passed parameters.
"origin":A point needed to determine the slice plane.</param>
"direction":A Vector that is perpendicular to the plane and specifies the direction of the eliminated portion of the polyface.</param>
"CreateCoverFaces":A boolean value representing if extra faces will be added in order to cover the cutted edges.</param>
"CreatedFacesEdgesVisibility":A boolean value representing the edges visibility of the created cover faces.</param>
<returns>True if the operation was succesfull.</returns>
public bool Slice(gPoint origin, Vector direction,bool CreateCoverFaces,bool CreatedFacesEdgesVisibility)

The default Slice method before 6012 is now implemeted with the two extra parametrs set to false.

Also in 6012 we added the the posibility to cover the cutted faces of the vdpolyface objects while using section clips.

The above is controlled with a new property that was added to the VectorDraw.Render.vdRenderGlobalProperties object which is the following:

A boolean value that represents if when section clips are enabled cover faces will be created and drawn to PolyFaces that intersect with the section clips.True , the faces are drawn and false faces are not drawn.
public bool SectionClipCoverFaces { get , set }

Please note the following regarding this functionality:
a) It takes effect only in vdPolyface objects (not vdRect objects with thickness for example).
b) The faces that are displayed are calculated in realtime render so this is not recomended for complex and big polyface objects.In these cases the slice command can provide a descent solution.
c) The vdRenderGlobalProperties are not serializable so this property will not be saved in a VDML file. This property is something that you set in your current application.
d) The cover faces will take the pencolor of the vdpolyface object.