New utility script to split STL plates into individual STL files

This commit is contained in:
Alessandro Ranellucci 2012-01-28 15:05:42 +01:00
parent 7305b6da88
commit 669341cd11
3 changed files with 128 additions and 0 deletions

View file

@ -457,4 +457,20 @@ sub edge_id {
return join "-", sort @point_ids;
}
sub get_connected_facets {
my $self = shift;
my ($facet_id) = @_;
my @facets = ();
foreach my $edge_facets (values %{$self->edge_facets}) {
if (grep $_ == $facet_id, @$edge_facets) {
# this edge belongs to the current facet, so let's get
# the other facet(s)
push @facets, grep $_ != $facet_id, @$edge_facets;
}
}
return @facets;
}
1;