The random_seed parameter does not produce the desired effects. Creates different files even though they share the same random_seed.
This commit is contained in:
parent
aae4fbe763
commit
85bcc06ea0
|
@ -75,5 +75,29 @@ fi
|
|||
|
||||
rm -rf "${C14N}"
|
||||
|
||||
##############
|
||||
# RANDOM_SEED
|
||||
##############
|
||||
|
||||
echo "random_seed..."
|
||||
|
||||
RANDOM_SEED=$(mktemp -d)
|
||||
FIRST="${RANDOM_SEED}/first.stl"
|
||||
SECOND="${RANDOM_SEED}/second.stl"
|
||||
|
||||
openscad -q -o "${FIRST}" scad/deterministic_random_seed.scad
|
||||
openscad -q -o "${SECOND}" scad/deterministic_random_seed2.scad
|
||||
|
||||
DIFF_VAL=$(diff "${FIRST}" "${SECOND}")
|
||||
|
||||
if [[ "${DIFF_VAL}" == "" ]]; then
|
||||
echo "Files are the same"
|
||||
else
|
||||
#echo "${DIFF_VAL}"
|
||||
echo "Files are different"
|
||||
fi
|
||||
|
||||
rm -rf "${RANDOM_SEED}"
|
||||
|
||||
#--export-format asciistl
|
||||
#--export-format binstl
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
$fn = 100;
|
||||
random_seed=1337;
|
||||
|
||||
difference () {
|
||||
cube([40, 40, 40], center = true);
|
||||
cylinder(r = 20/2, h = 40 + 1, center = true);
|
||||
rotate([90, 0, 0]) cylinder(r = 20/2, h = 40 + 1, center = true);
|
||||
rotate([0, 90, 0]) cylinder(r = 20/2, h = 40 + 1, center = true);
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
$fn = 100;
|
||||
random_seed=1337;
|
||||
|
||||
difference () {
|
||||
cube([40, 40, 40], center = true);
|
||||
rotate([0, 90, 0]) cylinder(r = 20/2, h = 40 + 1, center = true);
|
||||
rotate([90, 0, 0]) cylinder(r = 20/2, h = 40 + 1, center = true);
|
||||
cylinder(r = 20/2, h = 40 + 1, center = true);
|
||||
}
|
Loading…
Reference in New Issue