mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 17:09:01 +08:00
Debugging code: Storing the test STLs inlined in the Perl code into a file.
This commit is contained in:
parent
068f71847e
commit
6dfe4c0b96
@ -139,11 +139,15 @@ sub mesh {
|
|||||||
|
|
||||||
sub model {
|
sub model {
|
||||||
my ($model_name, %params) = @_;
|
my ($model_name, %params) = @_;
|
||||||
|
|
||||||
|
my $input_file = "${model_name}.stl";
|
||||||
|
my $mesh = mesh($model_name, %params);
|
||||||
|
# $mesh->write_ascii("out/$input_file");
|
||||||
|
|
||||||
my $model = Slic3r::Model->new;
|
my $model = Slic3r::Model->new;
|
||||||
my $object = $model->add_object(input_file => "${model_name}.stl");
|
my $object = $model->add_object(input_file => $input_file);
|
||||||
$model->set_material($model_name);
|
$model->set_material($model_name);
|
||||||
$object->add_volume(mesh => mesh($model_name, %params), material_id => $model_name);
|
$object->add_volume(mesh => $mesh, material_id => $model_name);
|
||||||
$object->add_instance(
|
$object->add_instance(
|
||||||
offset => Slic3r::Pointf->new(0,0),
|
offset => Slic3r::Pointf->new(0,0),
|
||||||
rotation => $params{rotation} // 0,
|
rotation => $params{rotation} // 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user