Programming Reference for VirtualLab Fusion  2026.1
Loading...
Searching...
No Matches
ComposedRegion2D Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Public class which defines a region composed by several subregions. These subregions are composed using logical operations like AND, OR, XOR, DIFF. Please note: The axis aligned bounding box cannot be determined exactly in every case. More...

Inheritance diagram for ComposedRegion2D:
Region2D IRegion1D2D IDocument

Public Member Functions

override void CalculateAxisAlignedBoundingBox ()
 
override object Clone ()
 Deep copy of the object.
 
 ComposedRegion2D ()
 Default constructor creating a new composed region, containing a single rectangular region. The composition mode is initialized as Union (OR).
 
 ComposedRegion2D (ComposedRegion2D composedRegion2D)
 Copy constructor.
 
 ComposedRegion2D (List< Region2D > subRegions, LogicalOperationType compositionMode, bool boundariesAreInside=false, PhysicalProperty propertyOfCoordinatesX=PhysicalProperty.Length, PhysicalProperty propertyOfCoordinatesY=PhysicalProperty.Length, bool checkForIdenticalBoundingBoxes=false)
 Constructor getting all field parameters.
 
bool ContainsSampledRegion ()
 Checks whether or not the composed region contains at least one sampled subregion.
 
new void DeserializationPostProcessing (ref List< System.Reflection.FieldInfo > unfindableFields, RemainingData remainingData)
 Method for doing post-processing after XML deserialization. Especially, handling of fields which have been altered since the version the data were saved with. But also additional operations (like filling caching variables etc.) can be done here.
 
override bool Equals (object obj, EqualityIntent equalityIntent)
 Equality operator.
 
override int GetHashCode ()
 
override InsideOutside GetInOutRelation (VectorD point, ExtrapolationInfo extrapolation2use=null)
 Method which checks whether or not a point lies inside or outside the 2D region or on its boundary.
 
override void MayBeNonzeroOutside (out bool maybeNonZeroLeft, out bool maybeNonZeroRight, out bool maybeNonZeroBottom, out bool maybeNonZeroTop)
 Method which determines whether or not the region can provide "inside" state outside of its boundary interval. This is not the case for extrapolation mode 'ConstantZero', of course.
 
override void UpdatePropertyOfCoordinates ()
 Method for handling update after change of the physical property of the coordinate.
 
- Public Member Functions inherited from Region2D
void CalculateAxisAlignedBoundingBox ()
 Method for (re)calculating the axis aligned bounding box.
 
override object Clone ()
 Clones the current object.
 
override bool Equals (object obj, EqualityIntent equalityIntent)
 Equality operation.
 
override int GetHashCode ()
 
InsideOutside GetInOutRelation (VectorD point, ExtrapolationInfo extrapolation2use=null)
 Method which checks whether or not a point lies inside or outside the 2D region or on its boundary.
 
override FormDocument GetNewDocumentWindow (Form formMain, string fileName)
 Gets a new document window containing this document.
Parameters
formMainReference to the main form (= MDI parent). Can be null if this form will not be shown (e.g. if it is generated just to get the view settings.
fileNameFile name from which the document was opened for inserting into window caption. If this string is empty, the default document name is used.
Returns
A FormDocument containing this document.

 
bool IsInside (double pointX, double pointY)
 Method which checks whether or not a point is inside the 2D region.
 
bool IsInside (VectorD point)
 Method which checks whether or not a point is inside the 2D region.
 
void MayBeNonzeroOutside (out bool maybeNonZeroLeft, out bool maybeNonZeroRight, out bool maybeNonZeroBottom, out bool maybeNonZeroTop)
 Method which determines whether or not the region can provide "inside" state outside of its boundary interval. This is not the case for extrapolation mode 'ConstantZero', of course.
 
 Region2D (bool boundariesAreInside, PhysicalProperty propertyOfCoordinatesX=PhysicalProperty.Length, PhysicalProperty propertyOfCoordinatesY=PhysicalProperty.Length)
 Constructor which gets the _boundariesAreInside flag. To be called from derived classes constructors.
 
 Region2D (Region2D region2bCopied)
 Copy constructor.
 

Static Public Member Functions

static bool operator!= (ComposedRegion2D o1, ComposedRegion2D o2)
 Unequals operator.
 
static bool operator== (ComposedRegion2D o1, ComposedRegion2D o2)
 Equals operator.
 
- Static Public Member Functions inherited from Region2D
static Region2D InvertRegion (Region2D region2Invert)
 Creates a new region with inverted in / out regions compared to this.
 
static Region2D Load (string fileName)
 Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VL 6.0) or with view settings.
 
static bool operator!= (Region2D o1, Region2D o2)
 Unequals operator.
 
static bool operator== (Region2D o1, Region2D o2)
 Equals operator.
 

Properties

LogicalOperationType CompositionMode [get, set]
 The logical operation to be used as composition mode.
 
virtual List< Parameter > ParameterRunParameters [get]
 Gets all available parameters. For variable parameters (i.e. those double and int parameters which can be used in the Parameter Run, Parametric Optimization and so on) add a VaryParameterInfo object (derived from Parameter class) to the returned list.
 
ReadOnlyCollection< Region2DSubRegions [get]
 Get or set the list of subregions (as read-only list).
 
- Properties inherited from Region2D
RectanglePhysical AxisAlignedBoundingBox [get]
 Gets the bounding box for the 2D region. Its sides are parallel to the x- and y-axis resp.
 
bool BoundariesAreInside [get, set]
 Gets or sets whether or not the boundaries of the region belong to the inner region.
 
string CommentOfCoordinates_X [get, set]
 Gets and sets the comment for the x-coordinates.
 
string CommentOfCoordinates_Y [get, set]
 Gets and sets the comment for the y-coordinates.
 
ExtrapolationInfo ExtrapolationHandling [get, set]
 The extrapolation mode for this region. See ITN.064 for more information on the mode 'border continuation'.
 
bool IsOneD [get]
 Gets whether this IRegion1D2D is 1D or 2D.
 
string Name [get, set]
 The name which can be given to the region by the user.
 
PhysicalProperty PropertyOfCoordinatesX [get, set]
 Physical property of the x-coordinates of the region.
 
PhysicalProperty PropertyOfCoordinatesY [get, set]
 Physical property of the y-coordinates of the region.
 
Region2DType RegionType [get]
 Gets the type of the region.
 
SamplingParameters SamplingForUsageWithComplexFields [get, set]
 Sampling parameters which will be used for a coordinate rescaling in case of using the region with a complex field.
 
- Properties inherited from IDocument
VirtualLabSession Session [get, set]
 every documents need to be handled in a session ==> default is the VirtualLab Mainsession
 
NodeVLExplorer TreeStructure [get]
 every document should have a node (maybe with subnodes) in the VirtualLab Explorer
 
DocumentType TypeOfDocument [get]
 Gets an enum entry specifying the type of the document.
 

Additional Inherited Members

- Static Public Attributes inherited from Region2D
const string DefaultDocumentName
 The default document name (= type description) for an Order Collection.
 
static readonly string FileDialogFilterString
 The filter string used in "Open File" dialogs.
 
const string FileExtensionString
 The file extension for an Order Collection.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Public class which defines a region composed by several subregions. These subregions are composed using logical operations like AND, OR, XOR, DIFF. Please note: The axis aligned bounding box cannot be determined exactly in every case.

Constructor & Destructor Documentation

◆ ComposedRegion2D() [1/2]

ComposedRegion2D ( List< Region2D > subRegions,
LogicalOperationType compositionMode,
bool boundariesAreInside = false,
PhysicalProperty propertyOfCoordinatesX = PhysicalProperty::Length,
PhysicalProperty propertyOfCoordinatesY = PhysicalProperty::Length,
bool checkForIdenticalBoundingBoxes = false )

Constructor getting all field parameters.

Parameters
subRegionsRegions to be composed.
compositionModeMode for compositing the regions. There is only one mode allowed for this object. If more than one mode is needed, this object may be part of another ComposedRegion2D, using another composition mode.
boundariesAreInsideFlag which says whether or not the boundary is part of the inner region or not.
propertyOfCoordinatesXPhysical property of the x-coordinate.
propertyOfCoordinatesYPhysical property of the y-coordinate.
checkForIdenticalBoundingBoxesIf true, the subregion's axis aligned bounding boxes will be checked for being identical. If this is not the case, an ArgumentException will be thrown.

◆ ComposedRegion2D() [2/2]

ComposedRegion2D ( ComposedRegion2D composedRegion2D)

Copy constructor.

Parameters
composedRegion2DComposed region to be copied.

Member Function Documentation

◆ Clone()

override object Clone ( )

Deep copy of the object.

Returns
A deep copy of this.

◆ ContainsSampledRegion()

bool ContainsSampledRegion ( )

Checks whether or not the composed region contains at least one sampled subregion.

Returns
True, if the composed region contains at least one sampled subregion. Otherwise false.

◆ DeserializationPostProcessing()

new void DeserializationPostProcessing ( ref List< System.Reflection.FieldInfo > unfindableFields,
RemainingData remainingData )

Method for doing post-processing after XML deserialization. Especially, handling of fields which have been altered since the version the data were saved with. But also additional operations (like filling caching variables etc.) can be done here.

Parameters
unfindableFieldsList of all those fields which are expected but could not be read from XML.
remainingDataData contained in XML but which haven't been read yet.

◆ Equals()

override bool Equals ( object obj,
EqualityIntent equalityIntent )

Equality operator.

Parameters
obj
equalityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or physical equality.
Returns

◆ GetInOutRelation()

override InsideOutside GetInOutRelation ( VectorD point,
ExtrapolationInfo extrapolation2use = null )

Method which checks whether or not a point lies inside or outside the 2D region or on its boundary.

Parameters
pointThe point to be checked whether it lies inside.
extrapolation2useExtrapolation info actually to be used.
Returns
Information where the point lies in relation to the region.

◆ MayBeNonzeroOutside()

override void MayBeNonzeroOutside ( out bool maybeNonZeroLeft,
out bool maybeNonZeroRight,
out bool maybeNonZeroBottom,
out bool maybeNonZeroTop )

Method which determines whether or not the region can provide "inside" state outside of its boundary interval. This is not the case for extrapolation mode 'ConstantZero', of course.

Parameters
maybeNonZeroLeftTrue, if there may be nonzero values left of the bounding box.
maybeNonZeroRightTrue, if there may be nonzero values right of the bounding box.
maybeNonZeroBottomTrue, if there may be nonzero values below the bottom of the bounding box.
maybeNonZeroTopTrue, if there may be nonzero values above the top of the bounding box.

◆ operator!=()

static bool operator!= ( ComposedRegion2D o1,
ComposedRegion2D o2 )
static

Unequals operator.

Parameters
o1
o2
Returns

◆ operator==()

static bool operator== ( ComposedRegion2D o1,
ComposedRegion2D o2 )
static

Equals operator.

Parameters
o1
o2
Returns