Skip to content
DeepSOIC edited this page Jan 31, 2016 · 4 revisions

Feature (document object)

ParaSeries feature varies a parameter of the model, recomputes the model, and gathers permutations of selected object into a compound. Calculations are performed in a separate temporary document. Object and everything it depends on is copied to the temporary document; that step alone can be quite long.

Properties

Object

Link to the object to collect permutations of. Note that the parameter to vary may and may not belong to Object; the requirement is that Object depends on the parameter.

Object must have a shape. Shapes are the stuff that is collected; anything else is ignored.

ParameterRef

Reference to parameter to vary. It is a string of the form ObjectName.Property.SubProperty, and it must point to a writable property.

ObjectName is the name of an object in the document. Name is not label, but often default label matches name. Object name can be looked up with Inspect tool.

Property.Subproperty.... is the path to the property. For example, to vary the length of a Pad, Property is Length (and no subproperty).

In general, you must be able to reach the needed property in Py console. Type App.ActiveDocument., and then what is to be put into ParameterRef.

Special cases and notable features:

  • Sketcher constraint datum values can be referenced like this: Sketch.Constraints.myConstraint, where myConstraint is the name of the constraint.
  • Spreadsheet cells can be referenced like this: Spreadsheet.A4. Even though the property that can be reached in Py console is read-only, ParaSeries knows how to modify cells of a spreadsheet, and recognizes this automatically.
  • You can't vary View properties (accessible through ViewObject). At the moment, ParaSeries doesn't work with visual objects.
  • Lengths of vector properties can be varied, like so: Extrude.Dir.Length.

New since rev. 186: multiple parameter references are supported. Parameter references should be separated with semicolon ;.

ParameterType

Sets the type of the parameter to vary. Values are converted to the ParameterType, before being written to the parameter. It is known, that it's impossible to write a float (real value) to an integer property.

Recomputing

This property controls if the ParaSeries feature is recomputed on document recompute, or not. It was introduced because of lack of document recomputation contolling in FreeCAD, and because recomputing ParaSeries can take very long time.

If 'Disabed', ParaSeries will fail to recompute.

If 'Recompute Once', ParaSeries will attempt to recompute, but only once. Upon the recompute, Recomputing property will self-reset to 'Disabled'.

if 'Enabled', ParaSeries will recompute whenever FreeCAD wants it to.

(this is a brief overview; click the title for more info)

Values property holds the values to vary the parameter through.

Values can be (default) typed in directly, sourced from a spreadsheed, or generated in-place. The source is chosen with ValuesSource property.

Generator is set up with its own set of properties, the most important of them are Count, SpanStart, SpanEnd, Step. Since these four are interrelated, those which can be edited and those computed are set up with GeneratorMode property:

  • SpanN: fit Count values into SpanStart-SpanEnd. Step is computed (read-only).
  • StepN (default): make Count values spaced by Step, starting from SpanStart. SpanEnd is computed (read-only).
  • SpanStep: fill SpanStart-SpanEnd interval with values spaced by Step. Count is computed (read-only).
  • Random: put Count values into SpanStart-SpanEnd interval, randomly. Step is ignored.

New since rev. 186: multiple parameters are supported. Values for respective parameters should be separated with semicolon ;. Values can be missing; if so, the original value of the parameter is substituted.

(click the title)

Note: ParaSeries is a bit special, when it outputs an array of placements. Because of that, MarkerSize propety and other properties common to Lattice tools that involve placements, don't work in ParaSeries.

If you explode-compound the resulting array of placements, you can extract the subarrays. This trick is a temporary solution; potentially, later, arrays will support internal hierarchy. Now, this strick with explde-compound only works for splitting arrays made with ParaSeries.

GUI Command (toolbar button)

feat-paraseries.files/ParaSeriesToolbar.png

Select an object to collect shapes from, and click the toolbar button. A new ParaSeries feature is created, with Object link preset to selected object. And a message box pops up, telling you that recomputes of ParaSeries is disabled.

Select the ParaSeries object, and modify some properties to make it function:

  • specify ParameterRef; it is empty by default, and if left empty, ParaSeries will fail.
  • Type in some values into Values property, or set up a generator. If Values are empty, ParaSeries will fail.
  • Change Recomputing property. It is 'Disabled' by default.

Once you got ParaSeries to compute, you'll probably get a all the shapes in one place. The shapes are packed into a compound. You can explode the compound to get each shape as a separate object, or you can arrange the shapes into a pattern using other Lattice tools, the last action being PopulateChildren.

Clone this wiki locally