@@ -172,6 +172,9 @@ It is much easier to move while building if the origin of the model is at a rota
172172
173173Alternatively parts can be _created inside the model script from a range of shape primitives_.
174174
175+ *`assembly = collction([part1,part2,part3])`*::
176+ Collection is a general container of related parts
177+
175178Many shapes are _created at the origin_ and need to be _moved to the required location_ after creation.
176179
177180*`cylinder = CylinderX(x1, r1, x2, r2)`*::
@@ -210,9 +213,6 @@ part4 = Collection([part1, part2])
210213Parts may need to be moved in the Vismach space to assemble the model.
211214The origin does not move - Translate() and Rotate() move the Collection as you add parts, relative to a stationary origin.
212215
213- //FIXME unclear
214- They may also need to be moved to create the animation as the animation rotation axis is created at the origin (but moves with the Part).
215-
216216[[sub:qtvcp:vismach:translate]]
217217=== Translating Model parts
218218
@@ -227,7 +227,6 @@ They may also need to be moved to create the animation as the animation rotation
227227[[sec:qtvcp:vismach:animate]]
228228== Animating Parts
229229
230- //FIXME 2 or 3 functions ? HalToolCylinder not documented here ?
231230To *animate the model controlled by the values of HAL pins* there are four functions:
232231`HalTranslate`, `HalRotate`, `HalToolCylinder` and `HalToolTriangle`.
233232
@@ -305,7 +304,7 @@ toolshape = Color([1, 1, 0, 1],[HalToolTriangle()])
305304----
306305
307306=== HAL Adjustable Primitives
308- All primitives can have HAL pin names substituted for coordinates. +
307+ All shape primitives can have HAL pin names substituted for coordinates. +
309308Either by adding the component object as the first variable and substituting the pinname string for a coordinate, or +
310309by substituting the full component/pinname string for a coordinate. +
311310
@@ -396,17 +395,17 @@ Sets the _display color of the part_. +
396395*`part = Color([_colorspec_], [_part_])`*::
397396
398397 Note that unlike the other functions, the part definition comes second in this case. +
399- `_colorspec_`;; Three RGB values and opacity. +
400- For example [1,0,0,0.5] for a 50% opacity red.
398+ `_colorspec_`;; Three (0-1.0) RGB values and opacity. [R,G,B,A] +
399+ For example [1.0 ,0,0,0.5] for a 50% opacity red.
401400
402401=== HALColorFlip
403402Sets the _display color of the part based on a designated HAL bit pin state_. +
404403
405404*`part = HALColorFlip([_colorspec_], [_colorspec_], [_part_], hal_comp, hal_pin)`*::
406405
407406 Note that unlike the other functions, the part definition comes second in this case. +
408- `_colorspec_`;; Three RGB values and opacity. +
409- For example [1,0,0,0.5] for a 50% opacity red.
407+ `_colorspec_`;; Three (0-1.0) RGB values and opacity. +
408+ For example [1.0 ,0,0,0.5] for a 50% opacity red.
410409 `hal_comp`;; The _HAL component Object_ or None. +
411410 In QtVCP if you are reading _system pins_ directly, then the component argument is set to `None`. +
412411 `hal_pin`;; The _name of the BIT HAL IN pin_ that will change the color. +
@@ -462,6 +461,20 @@ Some of the available HalHUD function: +
462461* add_pin(text, format, pinname)
463462* set_text_color(red, green, blue)
464463
464+ === HideCollection
465+
466+ HideCollection is a container that uses a HAL pin to control display of the contained parts. +
467+ A logic high on the HAL pin will hide the contained parts.
468+
469+ [source,python]
470+ ----
471+ comp.newpin("hide-chuck", hal.HAL_BIT, hal.HAL_IN)
472+ # <snip make a machine with an A axis chuck assembly>
473+ chuckassembly = HideCollection([chuckassembly],comp,'hide-chuck')
474+ # also can be used like this
475+ chuckassembly = HideCollection([chuckassembly],None,'myvismach.hide-chuck')
476+ ----
477+
465478=== Capture
466479This sets the current position in the model.
467480
0 commit comments