Skip to content

Feature PopulateChildren

DeepSOIC edited this page Dec 31, 2015 · 2 revisions

Feature (document object)

PopulateChildren feature, like PopulateCopies, is used to build arrays of shapes from arrays of placements. However, unlike PopulateCopies, which makes copies of one object, PopulateChildren can arrange a set of shapes.

As the placements of an array are being populated, it enumerates children of a compound. So, it distributes the children of a compound to respective placements (correspondence is by order).

Although the feature can also be used with single placements, but in this case it becomes essentially equivalent to PopulateCopies.

Properties

LoopObjectSequence

If true, the compound is traversed again and again, if there are more placements to populate than children in the compound.

If false, and the number of children does not match the number of 'PlacementsTo', the tool completes the shortest sequence and stops. A warning will be displayed if the numbers differ, like this:

Warning: Populate: There are fewer children to populate, than placements to be populated (n, k). Extra placements will be dropped. The warning can be ignored if that early termination is the intended behavior.

Object

Link to object (compound) containing children to be moved/copied. If 'ObjectTraversal' is Recursive, subcompounds are also unpacked; otherwise, only direct children are extracted. You can use Inspect tool to analyse the compounding structure.

Lattice Placement/array can also be used as an object.

ObjectTraversal

Sets whether to look into subcompounds.

  • Direct children only - as the name suggests =). If a subcompound is encountered as a child, the subcompoundis not separated, and populated as a whole.
  • Recursive - if a subcompound is encountered as a child, the subcompound's children are separated.

PlacementsFrom

Link to a placement or to array of placements, that are to be used as origins of the objects. Speaking otherwise, they are the placements to move FROM, with PlacementsTo specifying the placements to move to.

The link must point either to a single placement, or to an array of size matching to 'PlacementsTo'.

This property is only in action, when 'Referencing' property is set to Use PlacementsFrom.

PlacementsTo

Link to a placement or to array of placements, that specify where to put children of 'Object'.

Referencing

'Referencing' property sets, how to override the origin.

  • Origin: no modifications. Transform eah child by corresponding placement in the array ('PlacementsTo'). This is equivalent to supplying a trivial placement (the global origin) as PlacementFrom.
  • First item: the first placement of the array ('PlacementsTo') is treated as the origin. As a result, the first child is not moved. This setting is a natural way of building an array (pattern) based on array of placements.
  • Last item: like First item, but the last placement of the array is used as the origin.
  • Use PlacementsFrom: reference placements (origins) are explicitly specified by 'PlacementsFrom' link. The result is a child being moved by the same movement that will get PlacementFrom coincide with PlacementTo.

Another way of thinking of PlacementsFrom-PlacmentsTo is as follows. Consider we have defined an attachment point for some object as a placement (let's say, it is a tip of a shaft). And we have defined an attachment point of another object (let it be a shaft hole of a wheel). Now if we want to move the wheel to put it onto the shaft, we need to specify the wheel's attachment point as PlacementFrom (aka reference, aka origin), and shaft's tip point as PlacementTo.

(click the title)

GUI Command (toolbar button)

feat-populatechildren.files/PopulateChildrenToolbar.png

There are three commands for creating PopulateChildren feature. The commands differ in that they set different values to 'Referencing' property, and accept different sets of selected objects.

"Populate with children"

Select a compound, and an array of placements. A new compound is made, containing children of the original compound transformed by corresponding placements. The new location of a child is so that, from the point of view of the copied child, the placement is exactly where, from the point of view of the original child, the global origin is. See 'Referencing' property documentation for more explanation. 'Referencing' is set to Origin by this command.

An array of placements can also be supplied instead of the compound. The order of selection is what is used to differentiate the array to populate and the array being populated in this case: the thing selected first is the array that is "objects", and the thing selected second - where to put the "objects".

"Populate with children: build array"

Select a compound, and an array of placements. A new compound is made, with the children arranged to follow the pattern of placements; the first child will not move. See 'Referencing' property documentation for more explanation. 'Referencing' is set to First item by this command.

An array of placements can also be supplied instead of the compound. The order of selection is what is used to differentiate the array to populate and the array being populated in this case: the thing selected first is the array that is "objects", and the thing selected second - where to put the "objects".

"Move children"

Select a compound with children to be moved, an array of placements to move FROM, and an array of placements to move TO (order of selection matters). Each child is moved by the same move that makes the corresponding placement FROM match the corresponding placement TO. See 'Referencing' property documentation for more explanation. 'Referencing' is set to Use PlacementsFrom by this command.

Clone this wiki locally