mirror of
https://github.com/nophead/NopSCADlib.git
synced 2025-08-18 05:01:22 +02:00
Can now inhibit exploded lines for issue #220.
This commit is contained in:
@@ -6787,7 +6787,7 @@ The `pose()` module allows assembly views in the readme to be posed differently
|
|||||||
|:--- |:--- |
|
|:--- |:--- |
|
||||||
| `assembly(name, big = undef, ngb = false)` | Name an assembly that will appear on the BOM, there needs to a module named `<name>_assembly` to make it. `big` can force big or small assembly diagrams. |
|
| `assembly(name, big = undef, ngb = false)` | Name an assembly that will appear on the BOM, there needs to a module named `<name>_assembly` to make it. `big` can force big or small assembly diagrams. |
|
||||||
| `dxf(name)` | Name a dxf that will appear on the BOM, there needs to a module named `<name>_dxf` to make it |
|
| `dxf(name)` | Name a dxf that will appear on the BOM, there needs to a module named `<name>_dxf` to make it |
|
||||||
| `explode(d, explode_children = false, offset = [0,0,0])` | Explode children by specified Z distance or vector `d`, option to explode grand children |
|
| `explode(d, explode_children = false, offset = [0,0,0], show_line = true)` | Explode children by specified Z distance or vector `d`, option to explode grand children |
|
||||||
| `hidden()` | Make item invisible, except on the BOM |
|
| `hidden()` | Make item invisible, except on the BOM |
|
||||||
| `no_explode()` | Prevent children being exploded |
|
| `no_explode()` | Prevent children being exploded |
|
||||||
| `no_pose()` | Force children not to be posed even if parent is |
|
| `no_pose()` | Force children not to be posed even if parent is |
|
||||||
|
@@ -49,10 +49,11 @@ function show_supports() = !$preview || exploded(); //! True if
|
|||||||
module no_explode() //! Prevent children being exploded
|
module no_explode() //! Prevent children being exploded
|
||||||
let($exploded_parent = true) children();
|
let($exploded_parent = true) children();
|
||||||
|
|
||||||
module explode(d, explode_children = false, offset = [0,0,0]) { //! Explode children by specified Z distance or vector `d`, option to explode grand children
|
module explode(d, explode_children = false, offset = [0,0,0], show_line = true) { //! Explode children by specified Z distance or vector `d`, option to explode grand children
|
||||||
v = is_list(d) ? d : [0, 0, d];
|
v = is_list(d) ? d : [0, 0, d];
|
||||||
o = is_list(offset) ? offset : [0, 0, offset];
|
o = is_list(offset) ? offset : [0, 0, offset];
|
||||||
if(exploded() && norm(v)) {
|
if(exploded() && norm(v)) {
|
||||||
|
if(show_line)
|
||||||
translate(o) // Draw the line first in case the child is transparent
|
translate(o) // Draw the line first in case the child is transparent
|
||||||
color("yellow") hull() {
|
color("yellow") hull() {
|
||||||
sphere(0.2);
|
sphere(0.2);
|
||||||
|
Reference in New Issue
Block a user