SnapRuleBehavior enum
Describes how SnapRules affects the interactive snapping behavior of a SnapSource.
When rule-based snapping is configured on a GeometryEditor, each SnapSourceSettings.ruleBehavior indicates the snapping behavior for the snap source, based on the SnapRules that were passed to SnapSettings.syncSourceSettingsUsingRules. For more information about configuring a GeometryEditor to use rule-based snapping, see SnapRules.
Each SnapSourceSettings can be enabled or disabled independently of its SnapSourceSettings.ruleBehavior - see SnapSourceSettings.isEnabled for a summary of the other configuration options that can affect interactive snapping.
When snapping is configured without rule-based snapping (by calling SnapSettings.syncSourceSettings), all SnapSourceSettings.ruleBehavior values will be SnapRuleBehavior.none.
Values
- none → const SnapRuleBehavior
-
There are no applicable snap rules for this SnapSource, snapping behavior is determined by SnapSourceSettings.isEnabled.
This value is used in the following situations:
- There are no utility network connectivity rules relating to this combination of SnapSource and the UtilityAssetType being edited by the GeometryEditor because the snap source related to the operational layer is not based on an UtilityNetworkSource.
- Snap sources have been synchronized without SnapRules, by calling SnapSettings.syncSourceSettings.
You can set SnapSourceSettings.isEnabled to true for these snap sources if snapping is nevertheless appropriate for your specific scenario, or delegate the choice to the end user in your UI. When enabled (SnapSourceSettings.isEnabled is true), the user can interactively snap to geometry edges (segments) and vertices of any feature in the snap source.
When syncing with SnapSourceEnablingBehavior.setFromRules, any new SnapSourceSettings objects added to the SnapSettings.sourceSettings collection that have SnapRuleBehavior.none will have the default SnapSourceSettings.isEnabled value. Any SnapSourceSettings objects that already exist in the collection, due to previous synchronize calls, will be unaffected.
- rulesLimitSnapping → const SnapRuleBehavior
-
This value is returned from SnapSourceSettings.ruleBehavior when SnapRules.createFromAssetType or SnapRules.createFromAttributes determined that the given asset type can be geometrically coincident with certain features in the applicable snap source.
These rules limit the snapping in applicable ways, based on the logical connectivity of the items. They may be snapped to based on attributes. For example, rules may be defined that prevent snapping a metal water pipe to a plastic water pipe junction if these components are physically incompatible, but allow snapping to a compatible metal pipe junction.
Rules may also limit which parts of the snap source geometries can be snapped to, based on a connectivity policy (UtilityConnectivityPolicy). For example a connectivity rule may require that a fuse asset is only connected to a power line asset at one of its end points (the first or last vertex in the line), and therefore snapping at endpoints will be allowed, but snapping to the power line midspan (along a segment) will be prevented.
Visual snapping cues will guide the user to only the appropriate types of connectivity.
These snap sources will always be based on data from the UtilityNetwork used to create the SnapRules.
- rulesPreventSnapping → const SnapRuleBehavior
-
Rules specify that the asset type being edited should not snap to any features in the snap source.
This value is returned from SnapSourceSettings.ruleBehavior when SnapRules.createFromAssetType determined that the given asset type should not be geometrically coincident with features in the applicable snap source. In this case, interactive snaps to features in the snap source are prevented because the utility network data model indicates this is not a logical connection and the features should not be geometrically coincident. For example an electric fuse device feature cannot be coincident with another electric fuse device, as two devices cannot be in the same physical location, and snapping is prevented in this case.
If providing the ability for a user to enable or disable snap sources in your app you may wish to exclude these snap sources from any list to simplify the user experience, because the sources cannot actually be snapped to regardless of the value of SnapSourceSettings.isEnabled.
These snap sources will always be based on data from the UtilityNetwork used to create the SnapRules.
Properties
- coreValue → RT_SnapRuleBehavior
-
Convert to internal value.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
SnapRuleBehavior> - A constant List of the values in this enum, in order of their declaration.