Skip to content

Commit

Permalink
[Tests][Added][Populate] Use of Blender as renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Jan 16, 2024
1 parent bc697dc commit 63bf0f4
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/data/plain_html_simple.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Demo population manual

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Itaque earum rerum hic
tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias
consequatur aut perferendis doloribus asperiores repellat. Vestibulum fermentum
tortor id mi. Nulla turpis magna, cursus sit amet, suscipit a, interdum id,
felis.

- [[front | ]] This is the front side of the board we are populating
- [[front | RV1, RV2 ]] First, populate RV1 and RV2. Basically, any description
could be here.

## Conclusion

This is the end of the demo.
11 changes: 11 additions & 0 deletions tests/test_plot/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,17 @@ def test_populate_1(test_dir):
ctx.clean_up()


@pytest.mark.slow
@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7")
def test_populate_2(test_dir):
prj = 'simple_2layer' # Fake
ctx = context.TestContext(test_dir, prj, 'populate_blender', 'PopulateSimple')
ctx.run(no_board_file=True, extra=['-b', 'tests/data/ArduinoLearningKitStarter.kicad_pcb'])
ctx.expect_out_file_d(['img/populating_1.png', 'img/populating_2.png',
'ArduinoLearningKitStarter-blender_export.pcb3d', 'index.html'])
ctx.clean_up()


@pytest.mark.slow
@pytest.mark.skipif(not context.ki7(), reason="Just testing with 7")
def test_present_1(test_dir):
Expand Down
25 changes: 25 additions & 0 deletions tests/yaml_samples/populate_blender.kibot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
kiplot:
version: 1

outputs:
- name: Blender
comment: "How to draw a step"
type: blender_export
run_by_default: false
options:
render_options:
transparent_background: true
samples: 5
point_of_view:
rotate_x: 30
rotate_z: -20
outputs:
- type: render

- name: Populate
comment: "Populate example"
type: populate
dir: PopulateSimple
options:
renderer: Blender
input: tests/data/plain_html_simple.md

0 comments on commit 63bf0f4

Please sign in to comment.