Table of Contents

Class HatchStyleContour

Namespace
CADability.Attribute
Assembly
CADability.dll

An implementation of a HatchStyle, that defines a style consisting of contours inside the shape.

public class HatchStyleContour : HatchStyle, IPropertyEntry, IShowProperty, INamedAttribute, ICommandHandler, ISerializable
Inheritance
HatchStyleContour
Implements
Inherited Members

Constructors

HatchStyleContour()

Creates a contour hatch style with all values at their defaults: distances 0, circumscribe, Parallel, CounterClock and Inbound false, and no colour, line width or line pattern. Set at least LineDistance before the style is used; a hatch style created from the control center gets sensible defaults instead.

public HatchStyleContour()

HatchStyleContour(SerializationInfo, StreamingContext)

Constructor required by deserialization

protected HatchStyleContour(SerializationInfo info, StreamingContext context)

Parameters

info SerializationInfo

SerializationInfo

context StreamingContext

StreamingContext

Properties

ColorDef

Gets or sets the color of the lines of this hatch style

public ColorDef ColorDef { get; set; }

Property Value

ColorDef

CounterClock

Gets or sets the direction of the curves

public bool CounterClock { get; set; }

Property Value

bool

FirstDistance

Gets or sets the distance to the out bounds of the area to be filled.

public double FirstDistance { get; set; }

Property Value

double

HoleMode

Gets or sets the mode how to proceed with holes inside the area to be filled

public HatchStyleContour.EHoleMode HoleMode { get; set; }

Property Value

HatchStyleContour.EHoleMode

Inbound

Gets or sets the order of the curves: true from the outside to the inside, false from inside to outside

public bool Inbound { get; set; }

Property Value

bool

LineDistance

Gets or stes the line distance. This is the distance between adjacent contours.

public double LineDistance { get; set; }

Property Value

double

SpiralMode

Selects how the contours fill the area: separate parallel contours, one or more continuous spiral paths built from them, or a round spiral clipped by the shape (see HatchStyleContour.ESpiralMode).

public HatchStyleContour.ESpiralMode SpiralMode { get; set; }

Property Value

HatchStyleContour.ESpiralMode

SubItems

Must be overridden, when Flags contains PropertyEntryType.HasSubEntries. See SubItems

public override IPropertyEntry[] SubItems { get; }

Property Value

IPropertyEntry[]

Methods

Clone()

Creates a copy of this hatch style of the same type, with the same name and the same settings. The copy refers to the same colour, line width and line pattern objects and is not contained in a list. Used when a HatchStyleList is cloned and when hatch styles are copied between the project and the global settings.

public override HatchStyle Clone()

Returns

HatchStyle

the copy

GenerateContent(CompoundShape, Plane)

This method is used by a Hatch object to calculate its contents. It generates a set of contours parallel to the border of the shape according to LineDistance, FirstDistance, HoleMode and SpiralMode. The contours are projected into the 3D world by the given plane.

public override GeoObjectList GenerateContent(CompoundShape shape, Plane plane)

Parameters

shape CompoundShape

shape of the hatch object

plane Plane

local plane of the hatch object

Returns

GeoObjectList

GetShowProperty()

Returns an object to display the properties of the HatchStyle

public override IShowProperty GetShowProperty()

Returns

IShowProperty

Removed(IPropertyPage)

Implementation of Removed(IPropertyPage): closes the undo context of the project (an edit may have been interrupted by removing the entry), reports Removed and forgets the page. Override it to unsubscribe from events, and call the base implementation.

public override void Removed(IPropertyPage pp)

Parameters

pp IPropertyPage

the property page the entry was removed from