compas_nest.viewer¶
compas_nest.viewer
¶
Optional compas_viewer helper for the live animation (requires pip install compas_viewer).
animate drives a running solve in a top (plan) view fitted to the geometry, groups
sheets and elements (with their holes), and optionally writes the final layout to COMPAS JSON.
animate(handle, geo, sheets, save=None, park=-80.0)
¶
Animate a running solve live (top view); save the final layout to save on close.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
handle
|
:class:`compas_nest.collision_solve` or :class:`compas_nest.nfp_solve`
|
What :meth: |
required |
geo
|
:class:`compas_nest.nest_geo`
|
The parts to draw/save (one viewer object per instance). May differ from the geometry the
|
required |
sheets
|
:class:`compas_nest.nest_sheets`
|
The sheets being nested into. |
required |
save
|
str
|
If given, the final layout is written to this JSON path when the window closes. |
None
|
park
|
float
|
Y offset where not-yet-placed elements are staged (below the sheets). |
-80.0
|
Source code in compas_nest/viewer.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |