[IoId("00000000-3a20-4591-9e77-090cd6c13c85")]
[Author("DavidR")]
public class SurfaceLocusParameter : Parameter<SurfaceLocus>
Parameter for storing SurfaceLocus data.
Constructors
Properties
Access
Gets the access for this parameter, i.e. whether it treats data as items, lists or trees.
Implements: Access
AccessVariability
Gets or sets the variability allowance of the access level. If this variability is anything other than None, the parameter will provide menu UI for changing its access state.
Implements: AccessVariability
Activity
Gets or sets the active state of this object. Note that this property is meaningless for certain types of object.
Implements: Activity
Implements: Attributes
ChildrenObjects
Gets all immediate child objects that belong to the current object. It is possible that an object does not have any children, and it is possible that a child object has children of its own.
Implements: ChildrenObjects
ColourOverride
Gets or sets the colour override for the display of this object.
Implements: ColourOverride
Connectivity
Gets the topological connectivity of this object. The topology is not updated automatically, so be sure to get a fresh instance every time you need it.
Overrides: DocumentObject.Connectivity
Implements: Connectivity
CustomValues
Gets a collection of keyed values which can be used to store custom data which will survive (de)serialisation.
Implements: CustomValues
Display
Gets or sets the display state of this object. Note that this property is meaningless for certain types of object.
Implements: Display
inherited fromActiveObject
DisplayCapable
Gets whether this object makes allowance for 3D viewport displays.
Implements: DisplayCapable
DisplayName
Overrides: DocumentObject.DisplayName
Implements: DisplayName
DisplayStyle
Gets or sets the display style to use for the geometric data inside this object. Note that this property is meaningless for certain types of object.
Implements: DisplayStyle
Document
Gets or sets the document this object belongs to. It is possible an object does not belong to any document, however it can never belong to more than one document simultaneously.
Implements: Document
EntireFamily
Enumerates over all objects in the hierarchy this object is part of. This enumeration starts at the root object and then continues over all children and grandchildren in a breadth-first fashion.
Implements: EntireFamily
Expression
Gets the expression associated with the expression text, if the text is not null/empty and a valid expression. Note that if the AbstractParameter.ExpressionEnabled property is set to false, this property still returns an expression if it can.
ExpressionEnabled
Gets or sets whether the expression is taken into consideration.
ExpressionText
Gets or sets the expression text for this parameter.
FallbackName
Gets or sets a fallback name to be used as DisplayName in case the UserName is null or empty.
Implements: FallbackName
FoundingObject
Gets the root or founding object in the object hierarchy. If the current object does not have a parent, it is a founding object.
Implements: FoundingObject
HardMetaData
Gets or sets the hard meta data to assign to all values passing through this parameter. Hard meta data is always assigned and may overwrite existing meta data with the same keys.
Implements: HardMetaData
Implements: Icon
Inputs
Gets the input parameters. This list only includes parameters that are connected through wires, it does not include globals this parameter depends on.
Implements: Inputs
InstanceId
Gets or sets the instance Id for this object. The instance Id should be different for every instance of every type. Do *not* assign this Id unless you know exactly what you are doing.
Implements: InstanceId
Kind
public Kind Kind { get; }
Gets the parameter station (in life). Input, output, floating or other.
Implements: Kind
ModifierIcons
Gets an array of all the state icons for this parameter.
Implements: ModifierIcons
Modifiers
Gets or sets the modifiers associated with this parameter.
Implements: Modifiers
Implements: Nomen
Implements: Obsolete
Outputs
Gets the output parameters. This list only includes parameters that are connected through wires, it does not include objects that in some other way depend on this parameter.
Implements: Outputs
ParentObject
Gets or sets the parent object that owns this object. Top-level objects do not have parents. Do not assign or remove parents unless you know exactly what you are doing.
Implements: ParentObject
PersistentData
Implements: PersistentData
PersistentDataWeak
Overrides: AbstractParameter.PersistentDataWeak
Implements: PersistentDataWeak
Implements: Phase
PostProcessInputTrees
Assign this method if you wish to process the trees harvested from source parameters before they are converted into a single, type compatible tree. Do note that any type conversions that occur here will not be included in the conversion record. Also note that this property must be assigned every time as it cannot be (de)serialised.
Implements: PostProcessInputTrees
Presets
Implements: Presets
PresetsWeak
Overrides: AbstractParameter.PresetsWeak
Implements: PresetsWeak
ProgressPercentage
Gets the progress as a percentage. If this object is currently not calculating a new solution, this number is not meaningful.
Implements: ProgressPercentage
Relevance
Gets or sets the auxiliary state of this object. Auxiliary objects are drawn in an inconspicuous way as they are considered in-between logic. Note that this property is meaningless for certain types of object.
Implements: Relevance
Requirement
Gets or sets the data requirement for this parameter. Requirement typically only make sense as component inputs, but the property exists on all parameters.
Implements: Requirement
Implements: Selected
Selection
Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
Implements: Selection
SiblingObjects
Gets all sibling objects in the object family tree.
Implements: SiblingObjects
SoftMetaData
Gets or sets the soft meta data to assign to all values passing through this parameter. Soft meta data is only assigned when it won't overwrite existing meta data with the same keys.
Implements: SoftMetaData
State
Gets the current state of this object. This is always the most recently completed state.
Overrides: DocumentObject.State
TypeAssistant
Each parameter type ought to provide an assistant. However this property may return null, in which case a lot of functionality will not be available.
Implements: TypeAssistant
TypeAssistantWeak
Overrides: AbstractParameter.TypeAssistantWeak
Implements: TypeAssistantWeak
TypeFlavour
Gets the flavour of the type this parameter contains.
Implements: TypeFlavour
Implements: UserName
Methods
AddUndoRecord
public void AddUndoRecord(Record record)
Add a custom undo record for this object.
AddUndoRecord
Add a single action undo record for this object.
Returns: Id of undo record.
Implements: AddUndoRecord
Parameters:
| panel (InputPanel) |
AppendCleaningModifiers
Append the parameter modifiers to do with cleaning, (Remove Empty Twig, Remove Nulls, Remove Invalid).
Parameters:
| panel (InputPanel) |
AppendCustomModifiers
Override this method to append a bar with custom modifiers, or, if you really want, mess with the already added input panel elements.
Parameters:
| panel (InputPanel) |
AppendDataElements
Append the parameter persistent data setters. (Clear, Internalise, Set One, Set Many, Edit).
Parameters:
| panel (InputPanel) |
AppendExpressionModifier
Append the expression modifier UI to the input panel. Override this method and do nothing to disable expressions on this parameter.
Parameters:
| panel (InputPanel) |
AppendModifierIcons
Override this method if you with to add your own modifier icons to this parameter.
Parameters:
| icons (ModifierIcons) |
AppendOrderingModifierElements
Append the parameter modifiers to do with item ordering, (Sort, Randomise, Reverse).
Parameters:
| panel (InputPanel) |
AppendStateInput
Append the 'Enabled' and 'Display' states to this input panel.
Parameters:
| panel (InputPanel) | Panel to append to. |
| enabledState (bool) | If true, the Enabled state button will be modifiable. |
| displayState (bool) | If true, the Display state button will be modifiable. |
AppendToInputPanel
Parameters:
| panel (InputPanel) |
Overrides: DocumentObject.AppendToInputPanel
Implements: AppendToInputPanel
AppendTopologyModifierElements
Append all default modifier options.
Parameters:
| panel (InputPanel) |
AppendUserNameInput
Append the user name text box within a category labelled 'Attributes'.
Parameters:
| panel (InputPanel) |
AppendVariableAccessElements
Append the group of input access variability inputs (Item, Twig, Tree), depending on parameter state.
Parameters:
| panel (InputPanel) |
ChangeInstanceIds
Parameters:
| map (Dictionary<Guid, Guid>) |
ClearModifierIcons
Implements: ClearModifierIcons
CollectFromPersistent
Parameters:
| id (SolutionId) |
Overrides: AbstractParameter.CollectFromPersistent
CollectFromSources
protected override SolutionData CollectFromSources(Solution solution, CallStack stack, Guid[] inputs)
Overrides: AbstractParameter.CollectFromSources
Compute
Compute a new solution for this object, or return a completed solution if one is available.
Returns: Result of computation.
Overrides: DocumentObject.Compute
ComputeInternal
Overrides: ActiveObject.ComputeInternal
CreateAttributes
Create default attributes for this object. If attributes already exist, this method will not replace them.
Overrides: DocumentObject.CreateAttributes
CreateDisplayFromTree
Override this method to populate displays.
Parameters:
| tree (Tree<T>) | |
| bag (DisplayBag) | |
| token (CancellationToken) |
CreateEmptyTree
Create an empty tree which can be used as a placeholder for null data in solution results.
Overrides: AbstractParameter.CreateEmptyTree
CreateValueControl
public virtual Control CreateValueControl()
Construct a lightweight control suitable for editing this parameter's value. Control provider is responsible for handling undo record and assigning changes. Return null if no control makes sense in any particular case. Note that the control which is returned by this method may never be shown.
DisplayBounds
Overrides: DocumentObject.DisplayBounds
DisplayFaces
Parameters:
| pipeline (DisplayPipeline) | |
| guises (Guises) | |
| extents (ref BoundingBox) |
Overrides: DocumentObject.DisplayFaces
DisplayWires
Parameters:
| pipeline (DisplayPipeline) | |
| guises (Guises) | |
| extents (ref BoundingBox) |
Overrides: DocumentObject.DisplayWires
EditMetaData
public void EditMetaData()
Pop up the hard and soft meta data editor.
EditPersistentValues
Show the persistent values editor.
Expire
public sealed override void Expire()
Expire this object and all objects that depend on it. This will request-cancel any running solutions inside whatever document contains this object.
Overrides: DocumentObject.Expire
ExpireAllRecipients
protected override void ExpireAllRecipients()
Overrides: ActiveObject.ExpireAllRecipients
ExpireDisplay
protected void ExpireDisplay()
Expire the attributes and raise the DisplayChanged event.
ExpireReferences
Expire all references which match a validator method.
Parameters:
| filter (Func<Guid, bool>) | Validator method. Only references which pass this filter need to be taken into account. |
| document (RhinoDoc) | Rhino document to search. |
| retainReferences (bool) | If true, missing references ought to be removed. I.e. GH1-style behaviour. |
Returns: True if the object state was modified due to a reference change.
Overrides: AbstractParameter.ExpireReferences
Implements: ExpireReferences
GetAllSourceTrees
GetCreationInfo
Gets information about who created this component and when.
Returns: True if the creation data was available.
Implements: GetCreationInfo
GetModificationInfo
Gets information about who last modified this component and when.
Parameters:
| name (out string) | Name of modifier. |
| time (out DateTime) | Time of modification in UTC coordinates. |
Returns: True if the modification data was available.
Implements: GetModificationInfo
InvalidateExistingLayout
protected void InvalidateExistingLayout()
Invalidate the attribute layout, but only if the attributes already exist.
LoadNewPersistentData
protected void LoadNewPersistentData(params T[] values)
Utility function for overriding persistent data. This method will:
- Add an undo record for the current persistent data.
- Assign new persistent data.
- Expire the parameter.
- Trigger a new solution on the document which owns this parameter.
Parameters:
| values (params T[]) |
LoadNewPersistentData
Utility function for overriding persistent data. This method will:
- Add an undo record for the current persistent data.
- Assign new persistent data.
- Expire the parameter.
- Trigger a new solution on the document which owns this parameter.
Parameters:
| values (Tree<T>) |
ModifyAndProcessResult
protected SolutionData ModifyAndProcessResult(Solution solution, CallStack stack, SolutionData result)
Apply the modifiers and the AbstractParameter.ProcessResult(Solution, SolutionData) method. This is automatically called as part of the standard AbstractParameter.ComputeInternal(Solution, CallStack) logic, so unless you're overriding that, you have no need of this method.
Parameters:
| solution (Solution) | |
| stack (CallStack) | |
| result (SolutionData) |
ModifyIcon
Override the icon for this object. Use this judiciously.
Parameters:
| newIcon (IIcon) | New icon to assign, or null to revert to the default icon. |
| overrideExtrinsicIcon (bool = true) | If true, the permanent extrinsic icon will be overwritten. If false, the temporary intrinsic icon will be overwritten. |
Implements: ModifyIcon
ModifyNameAndInfo
Programmatically modify the nickname, name and/or info strings on the Nomen.
Implements: ModifyNameAndInfo
Implements: OnDisplayChanged
OnExpired
protected internal void OnExpired()
Raise the Expired event.
Implements: OnLayoutChanged
OverrideAccess
[EditorBrowsable(EditorBrowsableState.Never)]
public void OverrideAccess(Access access, bool expire)
Method for overriding the access. You almost never want to change this yourself, which is why this functionality is hidden behind this method.
OverrideAccess
Override the access of this parameter. This is dangerous and almost never needed at runtime. Consider enabling AbstractParameter.AccessVariability if the access needs to change over time.
Parameters:
| access (Access) |
OverrideAttributes
Assign new attributes to this object. Not all attributes may be accepted, it depends on the implementation.
Parameters:
| attributes (IAttributes) | New attributes to assign. Assigning null will revert to default attributes. |
Returns: True if attributes were accepted.
Implements: OverrideAttributes
PickManyItems
Default implementation will show a multi-line text box.
Overrides: AbstractParameter.PickManyItems
PickOneItem
Default implementation will show a text box provided there's an assisatant which supports roundtripping.
Overrides: AbstractParameter.PickOneItem
PopulateDisplay
protected sealed override void PopulateDisplay(SolutionData result, DisplayBag bag, CancellationToken token)
Parameters:
| result (SolutionData) | |
| bag (DisplayBag) | |
| token (CancellationToken) |
Overrides: ActiveObject.PopulateDisplay
ProcessResult
Override this method if you wish to post-process the default result of this parameter. The intermediate result will either contain the merged tree of all source objects or the persistent data, processed by the parameter modifiers. It will also contain all relevant type conversion messaging. You may choose to replace the data in the intermediate result, add messages, or create an entirely new Result instance, but do note that the intermediate may contain a lot of useful messaging.
Parameters:
| solution (Solution) | Solution associated with this result. |
| intermediateResult (SolutionData) | Default result computed by the standard parameter implementation. |
Returns: Identical, modified or different Result.
RequestAutoSave
Request an autosave.
Parameters:
| reason (AutoSaveReason) | Autosave reason. |
| autosaveId (Guid) | Autosave Id. Consecutive requests with identical Ids are ignored. |
Implements: RequestAutoSave
RequestAutoSave
Request an autosave using the instance ID of this object as a filter. This means hat subsequent autosave requests coming from the same object will be ignored.
Parameters:
| reason (AutoSaveReason) | Autosave reason. |
Implements: RequestAutoSave
Set
Set one or more persistent values at path {0}. This method overwrites whatever persistent data may already be set.
Parameters:
| pears (params Pear<T>[]) |
Returns: This very same parameter instance. This return value is here so the Parameter<T>.Set(Pear<T>[]) method can be chained.
Set
Set one or more persistent values at path {0}. This method overwrites whatever persistent data may already be set.
Parameters:
| values (params T[]) |
Returns: This very same parameter instance. This return value is here so the Parameter<T>.Set(T[]) method can be chained.
Set
Set all persistent data. This method overwrites whatever persistent data may already be set.
Parameters:
| tree (Tree<T>) |
Returns: This very same parameter instance. This return value is here so the Parameter<T>.Set(Tree<T>) method can be chained.
SetCreationInfo
public void SetCreationInfo()
Set the CreatedBy and CreatedAt fields if they haven't been set already.
Implements: SetCreationInfo
SetModificationInfo
public void SetModificationInfo()
Set the ModifiedBy and ModifiedAt fields.
Implements: SetModificationInfo
SetProgressPercentage
Set the DocumentObject.ProgressPercentage field directly. The percentage is automatically limited to the [0, 100] interval.
Parameters:
| percentage (int) |
SetProgressPercentage
Set the DocumentObject.ProgressPercentage field based on a step count. This method always limits the percentage to the [1, 99] range, as 0% and 100% are oftentimes indicative of unstarted or completed processes, which probably gives the wrong impression.
Store
This method is called whenever the instance is required to serialize itself.
Parameters:
| writer (IWriter) | Writer object to serialize with. |
Overrides: AbstractParameter.Store
Implements: Store
UpdateDisplay
Parameters:
| data (SolutionData) | |
| rules (DisplayRules) | |
| token (CancellationToken) |
Overrides: DocumentObject.UpdateDisplay
VolatileDataDescription
Gets a set of strings which describe the current state of this parameter. This is used primarily to populate tooltip content.
Events
ActivityChanged
Raised whenever the Enabled state of this object changes.
Implements: ActivityChanged
AutosaveRequested
Raised whenever this object requests an autosave.
Implements: AutosaveRequested
ColourOverrideModified
DisplayChanged
Raised whenever the display state of this object changes.
Implements: DisplayChanged
DocumentChanged
Raised whenever this object becomes part of a different document.
Implements: DocumentChanged
Expired
Raised whenever the solution currently held by this object is expired.
Implements: Expired
InstanceIdChanged
Raised whenever the InstanceId of this object changes.
Implements: InstanceIdChanged
LayoutChanged
Raised whenever the layout of this object changes. Layout invalidation triggers a canvas redraw.
Implements: LayoutChanged
NameChanged
Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
Implements: NameChanged
RelevanceChanged
Raised whenever the Auxiliary state of this object changes.
Implements: RelevanceChanged
SelectedChanged
Raised whenever the Selected state of this object changes.
Implements: SelectedChanged