The Designable package (contains various modules)

On this page :

Also see :

PR 31341 In parametrics added the Designable package to aid developing processable plugins. See python's built-in help for that package. See the example source code in the DesignableExamples plugin package for sample code using Designable. (v2015)

PR 34318 In parametrics, fixed a bug where point-to-point bolts were seemingly not added to the model when using the Designable.ProcessableComponent module with Designable.Proxies. (v2015)

PR 34582 In parametrics, added Designable.Proxies.BreakApartMaterialsProxy for the corresponding function sds2.breakapart.BreakApartMaterials. See DesignableExamples.EndSplice for an example component that can explicitly break materials off a member. (v2016)

PR 34826 In the python module Designable.ProcessableComponent, changed EndComponent's IsAllowedOnMember implementation to always return True which fixes a bug where having one instance on each member end prevented either from creating solids. (v2015)

PR 36428 Plugins inheriting from Designable.Processable.Processable and not StateAccessor will no longer format the pickle in a way that StateAccessor can read, which makes pickling of these objects slightly faster. Existing pickles using the old format will still be read and will be converted the next time the plugin is saved. Once the new pickle format is saved, older binaries will no longer be able to read the new pickle format. (v2016)

PR 43358 In the Python API's, Proxies defined in Designable.Proxies now have an OnSolidsException method which allows subclasses to have custom exception handling when the underlying solids operation is called and generates an exception. (v2018)

PR 45284 Fixed a regression in the Python Designable.Proxies API where field bolts were incorrectly being added as shop bolts. (v2018.09)

page 1 | contents | modules | top


The Designable package contains the following modules:

  • Existing
  • Processable
  • ProcessableComponent
  • ProcessableMember
  • Proxies

page 1 | contents | modules | top


Documentation on the Designable package can be accessed using python's built in help function and the SDS2 Python Prompt .

SDS2 Python Prompt

>>> import Designable                                   # import the package
>>>
>>> help(Designable)                                     # access help on the package
Help on package Designable:

NAME
Designable

DESCRIPTION
This package provides modules that make writing custom members and components easier.

Existing, Proxies, Processable, ProcessableComponent, and ProcessableMember are modules that ensure process is handled correctly and allows developers to write the material creation logic as if it was executed in a single scope the way a traditional parametric can be.

The main contribution of this package is in the Proxies and Processable modules because they solve one of the biggest, unnecessary problems of writing plugins.

The rest of this documentation discusses the issue in more detail ...

# use the python prompt to see the rest of this documentation

page 1 | contents | modules | top


Use help(Designable.module_name) for more targeted documentation.

SDS2 Python Prompt

>>> import Designable.Proxies                     # import the module
>>>
>>> help(Designable.Proxies)                       # access help on the module
Help on module Designable.Proxies in Designable:

NAME
Designable.Proxies

DESCRIPTION
This module provides proxy classes and functions that mimic the functionality of the traditional parametric API for adding materials, bolts, welds, and holes to a job. These proxy clases are better suited for custom members and components because they can be pickled (and in general behave more like regular python objects), and are process aware (i.e. they know exactly what material creation phase of process they should be executed in). For example, consider ...

# use the python prompt to see the rest of this documentation

page 1 | contents | modules | top