Table of Contents

Property PolyCurves

Namespace
VectorDraw.Professional.vdFigures
Assembly
VectorDraw.Professional.dll

PolyCurves

Gets the collection of curve groups that make up this hatch.

public vdPolyCurves PolyCurves { get; }

Property Value

vdPolyCurves

A vdPolyCurves instance containing one or more vdCurves collections.
Each vdCurves holds individual vdCurve objects which define outer boundaries and holes for the hatch regions.

Examples

// Example: create a square with a circular hole and add it to a document's entities

vdRect rect = new vdRect(doc, new gPoint(0.0, 0.0, 0.0), 10.0, 10.0, 0.0);
vdCurves outers = new vdCurves();
outers.AddItem(rect);
outers.Operation = VectorDraw.Geometry.GpcWrapper.ClippingOperation.Union;

vdCircle ci = new vdCircle(doc, new gPoint(5.0, 5.0, 0.0), 3.0);
vdCurves innerholes = new vdCurves();
innerholes.AddItem(ci);
innerholes.Operation = VectorDraw.Geometry.GpcWrapper.ClippingOperation.Difference;

// Create a vdPolyhatch and select the curves for the hatch pattern
var hatch = new vdPolyhatch(doc);
hatch.PolyCurves.AddItem(outers);
hatch.PolyCurves.AddItem(innerholes);

// Configure hatch appearance
hatch.HatchProperties = new vdHatchProperties(VdConstFill.VdFillModeSolid);
hatch.HatchProperties.DrawBoundary = true;
// Optionally set HatchProperties.FillColor or HatchProperties.HatchScale here
hatch.HatchProperties.FillColor = new vdColor(Color.Red);
// Add to a document (replace 'doc' with your vdDocument instance)
doc.Model.Entities.AddItem(hatch);
doc.ZoomExtents();
doc.Redraw(false);

Remarks

The returned collection is owned by the hatch and should be modified (items added/removed) to change the hatch geometry. The collection itself is not settable; to replace the entire set of curves create a new vdPolyCurves and copy items into the existing collection. Curve coordinates are interpreted in the hatch's object coordinate system and are transformed depend on ExtrusionVector and ECSMatrix.