Processables, when combined with Proxies that are added during Design, can generically implement most of the custom member and component protocols for graphical and process. More...
Data descriptors defined here: | |
def | __dict__ |
dictionary for instance variables (if defined) | |
def | __weakref__ |
list of weak references to the object (if defined) | |
def | material_creation_phases |
Data and other attributes defined here: | |
UseSmallMaterialCreationPhasesPickle = False | |
__getstate_manages_dict__ = True |
Processables, when combined with Proxies that are added during Design, can generically implement most of the custom member and component protocols for graphical and process.
Processable plugins inheriting directly from MemberBase and Component typically implement Modifies, Edit/MultiEdit, Design, and the various material creation methods. In contrast most plugins deriving from Processable will only implement MembersCurrentlyObserved, MultiEdit, and DesignForMember. In fact, overriding any of the material creation methods is most likely a wrong decision.
During DesignForMember, derived classes should register Proxy objects, via RegisterDesignProxy. These proxies are stored in the material_creation_phases, which maintains lists of proxy objects that need to be added during each phase of material creation.
Each Proxy object knows the members involved in that operation. Hence, Processables know a list of members that they 'modified' in the latest design. In fact, MembersObservedInLatestDesign returns that information. This information makes up one part of a default Modifies implementation. Because the latest design isn't necessarily what is currently being modified, derived classes should override MembersCurrentlyObserved to ensure Modifies always returns up-to-date information.
The default implementation for Edit is to call MultiEdit. This means when base classes implement MultiEdit they get Edit for free.
Each time through design Processables should clear the old material_creation_phases out. Otherwise the preexisting Proxies would be recreated during the material creation phases of process. The default Design implementation knows it should only be designed when the plugin is not graphical and will clear out the old design information. Then, if UseJustInTimeDesign() is False Design will call DesignForMember, which is what most base classes should override instead of Design. Otherwise, the call to DesignForMember is postponed until solids creation. Postponing the DesignForMember call until solids creation is helpful for preexisting parametrics that design around material on the member (which may not exist during Design or may be stale). Unfortunately, postponing the call until solids creation could still have problems when the plugin designs around material on any members besides the minumum member that the plugin creates solids on. Ideally parametrics should be written so that the design does not take input from actual material on any member. However, postponing DesignForMember until solids creation will avoid a subset of these problems and all problems for plugins that only create material on the host member.
Finally, dict is pickled with each Processable. Hence, by simply adding a variable to the dict derived classes can rest assured the information persists.
def Designable.Processable.Processable.__init__ | ( | args | ) |
__init__(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.__dict__ | ( | args | ) |
dictionary for instance variables (if defined)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.__getstate__ | ( | args | ) |
__getstate__(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.__repr__ | ( | args | ) |
__repr__(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.__setstate__ | ( | args | ) |
__setstate__(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.__str__ | ( | args | ) |
__str__(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.__weakref__ | ( | args | ) |
list of weak references to the object (if defined)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateDependentMaterial | ( | args | ) |
CreateDependentMaterial(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateDependentMaterialOther | ( | args | ) |
CreateDependentMaterialOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateHoleMatch | ( | args | ) |
CreateHoleMatch(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateHoleMatchOnMainMaterial | ( | args | ) |
CreateHoleMatchOnMainMaterial(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateHoleMatchOnMainMaterialOther | ( | args | ) |
CreateHoleMatchOnMainMaterialOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateHoleMatchOther | ( | args | ) |
CreateHoleMatchOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateHoleOnMainMaterial | ( | args | ) |
CreateHoleOnMainMaterial(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateHoleOnMainMaterialOther | ( | args | ) |
CreateHoleOnMainMaterialOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateMaterial | ( | args | ) |
CreateMaterial(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.CreateMaterialOther | ( | args | ) |
CreateMaterialOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.Design | ( | args | ) |
if not self.graphical: self.ResetMaterialCreationPhases() return (True if self.UseJustInTimeDesign() else self.DesignForMember(self.member_number) ) The default implementation above is suitable for most plugins. Plugins should override DesignForMember instead.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.DesignForMember | ( | args | ) |
Design the plugin for the given member_number and return True iff the plugin can be designed. Plugins *should* override this.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.Edit | ( | args | ) |
return self.MultiEdit([]) The default implementation is to call MultiEdit which is what most plugins should override.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GetMaterialCreationPhases | ( | args | ) |
GetMaterialCreationPhases(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalCreateDependentMaterial | ( | args | ) |
GraphicalCreateDependentMaterial(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalCreateDependentMaterialOther | ( | args | ) |
GraphicalCreateDependentMaterialOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalCreateHoleMatch | ( | args | ) |
GraphicalCreateHoleMatch(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalCreateHoleMatchOther | ( | args | ) |
GraphicalCreateHoleMatchOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalCreateMaterial | ( | args | ) |
GraphicalCreateMaterial(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalCreateMaterialOther | ( | args | ) |
GraphicalCreateMaterialOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalProcessFinal | ( | args | ) |
GraphicalProcessFinal(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.GraphicalProcessFinalOther | ( | args | ) |
GraphicalProcessFinalOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.HasYetToBeAddedToJob | ( | args | ) |
Return True iff the plugin has been committed to the job. ProcessableMember and ProcessableComponent have different implementations but this is *not* something each specific plugin will override.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.material_creation_phases | ( | args | ) |
def Designable.Processable.Processable.MembersCurrentlyObserved | ( | args | ) |
Returns a list of members currently used as input to the design of this plugin. The default implementation is the host member and MembersObservedInLatestDesign but should be overridden by derived classes because MembersObservedInLatestDesign lags Modifies and could be stale.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableMember.ProcessableMember, and Designable.ProcessableComponent.EndComponent.
def Designable.Processable.Processable.MembersObservedInLatestDesign | ( | args | ) |
flatten = lambda l: sum(l, []) return Existing.UniqueListOfMemberNumbers( flatten([d.ObjectsImpactingDesign() for d in flatten(self.material_creation_phases)]) ) The default implementation should be suitable.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.Modifies | ( | args | ) |
The default implementation should be fine for most plugins that override MembersCurrentlyObserved which will ensure the returned list isn't stale.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.OnGraphicalToggle | ( | args | ) |
OnGraphicalToggle(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.OnMaterialEvent | ( | args | ) |
OnBoltEvent = OnMaterialEvent(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableMember.ProcessableMember, Designable.ProcessableMember.ProcessableMember, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.OnMaterialEvent | ( | args | ) |
The default implementation for Processable's OnMaterialEvent can be a little smarter than the default implementation for MemberBase and Component because it only turns graphical when the uuid is on a member that is in the MembersCurrentlyObserved() list.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableMember.ProcessableMember, Designable.ProcessableMember.ProcessableMember, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.OnMaterialEvent | ( | args | ) |
OnWeldEvent = OnMaterialEvent(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableComponent.EndComponent, Designable.ProcessableMember.ProcessableMember, Designable.ProcessableMember.ProcessableMember, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.ProcessFinal | ( | args | ) |
ProcessFinal(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.ProcessFinalOther | ( | args | ) |
ProcessFinalOther(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.RegisterDesignProxy | ( | args | ) |
Called by the derived class during design to add a Proxy object which is later added during the appropriate material creation phase of process.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.ResetMaterialCreationPhases | ( | args | ) |
ResetMaterialCreationPhases(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.SetMaterialCreationPhases | ( | args | ) |
SetMaterialCreationPhases(args)
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
def Designable.Processable.Processable.UseJustInTimeDesign | ( | args | ) |
Return True iff the plugin should postpone DesignForMember until it needs to create material the first time. Delaying DesignForMember until solids creation allows for a greater number existing parametrics that design around actual material on a member to work without modification. Also, doing so avoids designing around information on the member that SDS2 connection design occasionally changes after Design.
Reimplemented in Designable.ProcessableComponent.ProcessableComponent, Designable.ProcessableComponent.EndComponent, and Designable.ProcessableMember.ProcessableMember.
|
staticprivate |
|
static |