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
infoSerializationInfoSerializationInfo
contextStreamingContextStreamingContext
Properties
ColorDef
Gets or sets the color of the lines of this hatch style
public ColorDef ColorDef { get; set; }
Property Value
CounterClock
Gets or sets the direction of the curves
public bool CounterClock { get; set; }
Property Value
FirstDistance
Gets or sets the distance to the out bounds of the area to be filled.
public double FirstDistance { get; set; }
Property Value
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
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
LineDistance
Gets or stes the line distance. This is the distance between adjacent contours.
public double LineDistance { get; set; }
Property Value
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
SubItems
Must be overridden, when Flags contains PropertyEntryType.HasSubEntries. See SubItems
public override IPropertyEntry[] SubItems { get; }
Property Value
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
shapeCompoundShapeshape of the hatch object
planePlanelocal plane of the hatch object
Returns
GetShowProperty()
Returns an object to display the properties of the HatchStyle
public override IShowProperty GetShowProperty()
Returns
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
ppIPropertyPagethe property page the entry was removed from