SDS2 Parametric API
 All Classes Namespaces Functions Variables Pages
List of all members
Designable.Processable.Processable Class Reference

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...

Inheritance diagram for Designable.Processable.Processable:
Designable.ProcessableComponent.ProcessableComponent Designable.ProcessableMember.ProcessableMember Designable.ProcessableComponent.EndComponent

Methods defined here:

def CreateDependentMaterial
def CreateDependentMaterialOther
def CreateHoleMatch
def CreateHoleMatchOnMainMaterial
def CreateHoleMatchOnMainMaterialOther
def CreateHoleMatchOther
def CreateHoleOnMainMaterial
def CreateHoleOnMainMaterialOther
def CreateMaterial
def CreateMaterialOther
def Design
def DesignForMember
def Edit
def GetMaterialCreationPhases
def GraphicalCreateDependentMaterial
def GraphicalCreateDependentMaterialOther
def GraphicalCreateHoleMatch
def GraphicalCreateHoleMatchOther
def GraphicalCreateMaterial
def GraphicalCreateMaterialOther
def GraphicalProcessFinal
def GraphicalProcessFinalOther
def HasYetToBeAddedToJob
def MembersCurrentlyObserved
def MembersObservedInLatestDesign
def Modifies
def OnMaterialEvent
def OnGraphicalToggle
def OnMaterialEvent
def OnMaterialEvent
def ProcessFinal
def ProcessFinalOther
def RegisterDesignProxy
def ResetMaterialCreationPhases
def SetMaterialCreationPhases
def UseJustInTimeDesign
def __getstate__
def __init__
def __repr__
def __setstate__
def __str__

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

Detailed Description

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.

Constructor & Destructor Documentation

def Designable.Processable.Processable.__init__ (   args)

Member Function Documentation

def Designable.Processable.Processable.__dict__ (   args)
def Designable.Processable.Processable.__getstate__ (   args)
def Designable.Processable.Processable.__repr__ (   args)
def Designable.Processable.Processable.__setstate__ (   args)
def Designable.Processable.Processable.__str__ (   args)
def Designable.Processable.Processable.__weakref__ (   args)
def Designable.Processable.Processable.CreateDependentMaterial (   args)
def Designable.Processable.Processable.CreateDependentMaterialOther (   args)
def Designable.Processable.Processable.CreateHoleMatch (   args)
def Designable.Processable.Processable.CreateHoleMatchOnMainMaterial (   args)
def Designable.Processable.Processable.CreateHoleMatchOnMainMaterialOther (   args)
def Designable.Processable.Processable.CreateHoleMatchOther (   args)
def Designable.Processable.Processable.CreateHoleOnMainMaterial (   args)
def Designable.Processable.Processable.CreateHoleOnMainMaterialOther (   args)
def Designable.Processable.Processable.CreateMaterial (   args)
def Designable.Processable.Processable.CreateMaterialOther (   args)
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)
def Designable.Processable.Processable.GraphicalCreateDependentMaterial (   args)
def Designable.Processable.Processable.GraphicalCreateDependentMaterialOther (   args)
def Designable.Processable.Processable.GraphicalCreateHoleMatch (   args)
def Designable.Processable.Processable.GraphicalCreateHoleMatchOther (   args)
def Designable.Processable.Processable.GraphicalCreateMaterial (   args)
def Designable.Processable.Processable.GraphicalCreateMaterialOther (   args)
def Designable.Processable.Processable.GraphicalProcessFinal (   args)
def Designable.Processable.Processable.GraphicalProcessFinalOther (   args)
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)
def Designable.Processable.Processable.OnMaterialEvent (   args)
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)
def Designable.Processable.Processable.ProcessFinal (   args)
def Designable.Processable.Processable.ProcessFinalOther (   args)
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)
def Designable.Processable.Processable.SetMaterialCreationPhases (   args)
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.

Member Data Documentation

Designable.Processable.Processable.__getstate_manages_dict__ = True
staticprivate
Designable.Processable.Processable.UseSmallMaterialCreationPhasesPickle = False
static