Table of Contents

Method GetVisibleArea

Namespace
VectorDraw.Professional.vdObjects
Assembly
VectorDraw.Professional.dll

GetVisibleArea(vdEntities, vdSelection, Vector, double)

Get the visible area of passed entities at the specified view direction

public PrimitivesExport.RenderProperties.EntityViewAreas GetVisibleArea(vdEntities entities, vdSelection subentities, Vector VisibleDirection, double SquareRectSize)

Parameters

entities vdEntities

A collection of objects that make up the entire drawing.

subentities vdSelection

A collection of vdFigures for which the visible area will be calculated in connection with the entire drawing.If it is null the visible area of passed entities will be calculated.

VisibleDirection Vector

Visible view direction of clip view plane in World Coordinate System(WCS).Defines the Vector from target to camera point.

SquareRectSize double

Defines the size of small square in Drawing units that each surface is divided. Smaller values gets more time to calculate.

Returns

PrimitivesExport.RenderProperties.EntityViewAreas

A collection of PrimitivesExport.RenderProperties.EntityViewArea object type that contains information about the area of each passed vdFigure object.

Examples

Get the projection area in active View of all grip selected entities in Model Layout. If there are no grip selected entities the visible area of all entities in model layout is calculated. Note: set the SquareRectSize to 0.01 that is 1 square centimeter in case we assume that 1 DrawingUnit represents 1 meter.The return area value will be in square Drawing Units (square meters in this case)

vdSelection set = doc.GetGripSelection();
if (set != null && set.Count == 0) set = null;
VectorDraw.Render.PrimitivesExport.RenderProperties.EntityViewAreas ret =document.GetVisibleArea(document.Model.Entities, set, doc.Model.Render.ViewDir, 0.01);
double surfacesVisibleArea = ret.Area(false); //get the visible area of all entities surfaces.
double ProjectionToViewArea = ret.Area(true); //get the area that projected on the selected view.

GetVisibleArea(vdEntities, Vector, double)

Get the visible area of passed entities at the specified view direction

public PrimitivesExport.RenderProperties.EntityViewAreas GetVisibleArea(vdEntities entities, Vector VisibleDirection, double SquareRectSize)

Parameters

entities vdEntities

A collection of vdFigures for which the visible area will be calculated.

VisibleDirection Vector

Visible view direction of clip view plane in World Coordinate System(WCS).Defines the Vector from target to camera point.

SquareRectSize double

Defines the size of small square in Drawing units that each surface is divided. Smaller values gets more time to calculate.

Returns

PrimitivesExport.RenderProperties.EntityViewAreas

A collection of PrimitivesExport.RenderProperties.EntityViewArea object type that contains information about the area of each passed vdFigure object.

Examples

Get the projection area in Front View of all entities in Model Layout Note: set the SquareRectSize to 0.01 that is 1 square centimeter in case we assume that 1 DrawingUnit represents 1 meter.The return area value will be in square Drawing Units (square meters in this case)

VectorDraw.Render.PrimitivesExport.RenderProperties.EntityViewAreas ret =document.GetVisibleArea(document.Model.Entities, new Vector(0,-1,0), 0.01);
double surfacesVisibleArea = ret.Area(false); //get the visible area of all entities surfaces.
double ProjectionToViewArea = ret.Area(true); //get the area that projected on the selected view.