Skip to content

Commit

Permalink
#28 - enable process assembly and position by blender
Browse files Browse the repository at this point in the history
  • Loading branch information
kittlerm authored and kaklik committed Aug 1, 2023
1 parent 95143f5 commit e3c0a96
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 13 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/render_previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ jobs:
cd CAD/src
make
- name: Make -d CAD/src/assembly (position)
- name: Make -d CAD/src/assembly/position
run: |
cd CAD/src/assembly/position
make
- name: Make -d CAD/src/assembly
run: |
cd CAD/src/assembly
make
Expand Down
6 changes: 5 additions & 1 deletion CAD/src/assembly/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
STL_DIR=../../stl
AMF_DIR=../../amf
IMG_DIR=png
SRC_DIR=../../src/assembly/position
# FIXED: do only assembly targets
# SRC_DIR=../../src/assembly/position
# must be done in itself directory
# see ../../../.github/workflows/render_previews.yml
SRC_DIR=../../src/assembly
# DEP_DIR=../../dep
# GCD_DIR=../../gcode
# INI_DIR=../../slicing
Expand Down
4 changes: 2 additions & 2 deletions CAD/src/assembly/assembly.scad
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This enable generation png from blender:
//@blender_template(../build_manual/blender/build_manual_template.blend)
include <../../parameters.scad>
$fn=10;

// This enable generation png from blender:
//@blender_template(../build_manual/blender/build_manual_template.blend)

// include <yasim.scad>

Expand Down
2 changes: 2 additions & 0 deletions CAD/src/assembly/assembly_chassi.scad
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

//@set_slicing_config(../slicing/default.ini)
//@blender_template(../build_manual/blender/build_manual_template.blend)

include <../../parameters.scad>
// include <yasim.scad>

Expand Down
2 changes: 1 addition & 1 deletion CAD/src/assembly/assembly_pylon.scad
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

//@blender_template(../build_manual/blender/build_manual_template.blend)
//@set_slicing_config(../slicing/default.ini)
include <../../parameters.scad>

Expand Down
2 changes: 1 addition & 1 deletion CAD/src/assembly/assembly_rotor_head.scad
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

//@blender_template(../build_manual/blender/build_manual_template.blend)
//@set_slicing_config(../slicing/default.ini)
include <../../parameters.scad>
// include <yasim.scad>
Expand Down
1 change: 1 addition & 0 deletions CAD/src/assembly/assembly_rotorhead_complete.scad
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//@blender_template(../build_manual/blender/build_manual_template.blend)
include <../../parameters.scad>

include <position/position_rotorhead.scad>
Expand Down
3 changes: 2 additions & 1 deletion CAD/src/assembly/full_assembly.scad
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

// This enable generation png from blender:
//@blender_template(../build_manual/blender/build_manual_template.blend)
//@set_slicing_config(../slicing/default.ini)
include <../../parameters.scad>

Expand Down
14 changes: 14 additions & 0 deletions CAD/src/assembly/position/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
STL_DIR=../../../stl
AMF_DIR=../../../amf
IMG_DIR=png
SRC_DIR=../../../src/assembly/position
# DEP_DIR=../../../dep
# GCD_DIR=../../../gcode
# INI_DIR=../../../slicing
GIT_ROOT=../../../../
# FIXME: this is due to SRC+OUTPUT is at GIT ROOT
OUTPUT_FOLDER=CAD
NAME_PREFIX=TF-G2_assembly
PROCESSOR3D_PARAM=--no_gcode --no_amf --no_blend

include ../../../../utils/Makefile
8 changes: 5 additions & 3 deletions CAD/src/assembly/test/assembly_888_test.scad
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//@set_type(solid)
include <../../../parameters.scad>
//@blender_template(../../build_manual/blender/build_manual_template.blend)
//@blender_updater= ../../build_manual/update_render_src.py
//@blender_updater=../../build_manual/update_render_src.py
$fn=10;
// TODO: render viewport to position of camera
// e.g. see ../../build_manual/src/buildmanual_0001_c.json
Expand Down Expand Up @@ -41,8 +41,10 @@ include <../position/position_888_1006.scad> // Policka na payload

use <../../888_1004.scad>
color([0.3,0.3,0.3])
rotate([0, 90, 0])
rotate([0, -90, 0]) // @blender-skip
rotate([0, 45, 0])
// FIXME: cannot use parametr
// @blender-skip translate([0, -base_width/2, 0])
rotate([0, -90, 0]) // @blender-skip basic rotation from stl of module
888_1004();
//use <../888_1004.scad>
//use <../888_1005.scad>
Expand Down
4 changes: 2 additions & 2 deletions CAD/src/assembly/yasim.scad
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

//@skip_file=this

union() {
%translate(v = [-150.0, 0.0, 229.0]) {
Expand Down Expand Up @@ -34,4 +34,4 @@ union() {
}
}
}
}
}
3 changes: 2 additions & 1 deletion CAD/src/assembly/yasim_assembly.scad
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

// FIXME: this may fails in generation PNG from blender
//@blender_template(../build_manual/blender/build_manual_template.blend)
//@set_slicing_config(../slicing/default.ini)
include <../../parameters.scad>
include <yasim.scad>
Expand Down
18 changes: 18 additions & 0 deletions utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,24 @@ $(AMF_DIR)/%.amf: $(SRC_DIR)/%.scad

finish:
cd $(GIT_ROOT)/CAD/slicing/; rm ./*.ini 2> /dev/null

LIST_TARGETS =
ifdef AMF_DIR
LIST_TARGETS += list-targets-amf
endif
ifdef GCD_DIR
LIST_TARGETS += list-targets-gcd
endif

list-targets: ${LIST_TARGETS}

list-targets-amf:
@echo "AMF_TARGETS:"
@echo " $(AMF_TARGETS)" | sed 's# #\n #g'

list-targets-gcd:
@echo "GCD_TARGETS:"
@echo " $(GCD_TARGETS)" | sed 's# #\n #g'

# gdefault: $(TARGETS)
# $(GCD_DIR)/%.gcode: $(SRC_DIR)/%.scad
Expand Down

0 comments on commit e3c0a96

Please sign in to comment.