[Plugin] Slicer v4.3 20110619
-
Moved from the 'Roof' thread...
@matt77 said:Excellent Script. Many thanks -- works a treat for me!!!
I must commend you also on another of your scripts that I find invaluable at work. It's your slicer ruby. It comes in very handy for working out the floor space across very large master-plan massing models. It has saved me so much time. Thank you. I'm not sure it was ever intended for this, but if you set the floor to ceiling height say 3 metres, but don't give the slices any thickness, then run the script across a large grouped area of buildings then explode the floor slabs within the main group, by using the area tool with all faces within that group selected you get a total floor space for that whole area. You may have to delete the top slices so that you don't include the roofs. But very, very handy indeed...
Whilst using your most recent roof script I was impressed in the way that you could assign a material and a layer to the new roof.
I have a request. (Not that your not busy enough as it is)
Is it possible to implement this within in the slicer ruby? So that the when you create the new slices you have an option of also assigning a material to the new slices. In this way you could have separate materials for residential, commercial and retail space. This information regarding the areas assigned to the materials could be then exported to an excel sheet. Giving you a detailed breakdown very quickly regarding your model.
MattA few months ago we started using Slicer.rb for exactly the same thing - to get a rough idea of the floor-space in massing blocks on master-plans [although its original use was for making 3D card models from a Sketchup volume - cheap 3D-printer !]
Not so long ago I added a make your own layer and pick materials on the fly option to VolumeCalculator.rb. Since this a son (or perhaps grandson ?) of Slicer it'll be pretty easy to implement (I hope)... I'll add it to the list of things to do.Here's an updated version - there's a more wide-ranging version on the back-burner [making components of slices etc]... but this one fixes some glitches to ensure that if your 3d form is not properly 'solid' at least each slice get made without the tool 'stalling' - even it some slices don't form/face/extrude/etc as hoped...
Copyright 2005-2011, TIG
Permission to use, copy, modify, and distribute this software for
any purpose and without fee is hereby granted, provided the above
copyright notice appear in all copies.THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.#-----------------------------------------------------------------------
Name : Slicer.rbDescription : A tool to 'Slice' up a volume - useful in real-model
making and finding likely areas in master plan volumes...Menu Item : Plugins -> Slicer
Context Menu: See menu-section at end on how to include it here: Slicer
Author : TIG
Usage : First select a Group or Component that has faces that
form a volume, then use the Plugins Menu Item 'Slicer': you can aso
pick the right-click Context-Menu and choose 'Slicer' IF you have
enabled it (see menu-section at end)...A dialog asks for the Slice spacing, the Slice thickness and the
Slice orientation (XYZ). The units are in current units...
Entering 0 thickness makes just a face. Entering negative
values reverts to default. Entering spacing less than thickness
reverts to default. It also asks for the the Layer and Colour
of the Slices. The layer choices are 'Layer0' (or <Default> in your
local langauge), a unique name 'SLCE-nnnnnnn' (it will then make a new
layer named 'SLCE-nnnnnnn', where nnnnnnnn is based on the date/time),
'<Make New Layer>' (it will then open another dialog & ask for a new
layer-name) and then it lists of all other layers in alphabetical order.
The Colour choices are all of the default colours in alphabetical order.
Tip: To scroll beyond bottom of list type the first letter of name and
then search from there - e.g. W >> 'Wheat', then use arrow keys to
scroll down to 'White'...A dialog asks if you would like the slices equalized - Yes/No - if
'Yes' - spacing is apportioned into total dimension for even spacing
of all slices at the spacing or just below, if 'No' then slices are
spaced as entered and the last slice's spacing is adjusted to fit any
remaining gap.A dialog asks you if you want to number the slices - Yes/No - if
'Yes' - an incrementing number is added to the slice near its lower-
left bounding-box corner.If you are making more than 25 slices you are warned because this
might take some time to process.It then makes a series of slices through the selection's faces.
If needed to fill the volume, an unevenly spaced last slice is added.
Volumes with punched holes will get the slices formed around them but
only to the 'accuracy' of the slice spacing and the slice thickness.
The slices are named Slice-n-nnnnnnnn (where n is the slice-number)All of the slice-groups are combined into a group called Slice-nnnnnnnn.
Before ending it checks if 'Xray Mode' was already switched 'on' at
the start and if so there is no action and it exits. Otherwise the
original selection is 'Hidden' so you can clearly see the slice-group.
You are then asked in a dialog if you want to leave it 'Hidden'.
If 'Yes' then it exits leaving it 'Hidden'. If 'No' the original
selection is 'Unhidden' and 'Xray Mode' is then switched 'on' so you
can see the slice-group inside of the original selection and a dialog
asks if you want to leave 'Xray Mode' switched 'on'. If you answer
'No' the normal view is restored and it exits (but then the slices will
be obscured !). If you answer 'Yes' it exits leaving 'Xray Mode'
switched 'on'.You are finally asked if you would like to make a 'flattened' copy.
Answer 'Yes' to make another group. A dialog asks for the min. gap
between 'flattened' slices in current units. The flattened-slices
group is named 'Flat-Slice-nnnnnnn' on layer FLAT-+'Your_Layer_Name'.
It is placed below the original slice-base with all slices put down
'flattened' with equal Zs, arranged in order, in as near a 'square'
pattern (n x n) as possible. Because the non-Z oriented slices have
to be rotated 'flat' and when rotated they shouldn't overlap, you will
find that sometimes the spacings between rows(Y) or columns(X) will
exceed the minimum gap specified. You can always move the flattened
numbered slices around by editing the flattened-slice group - this
might then further optimise any real material use etc.'Slicer' can't be expected to be 100% foolproof ! It treats an open
topped object as it if were filled with water, taking slices from the
outer 'skin' inwards to work out which are the solid and which are the
hollow volumes. With a little ingenuity you will be able to contrive
a form with complex linked holes punched in, or a suitable array of
thin volumes spaced apart so as to miss the sampling slices - which
because it uses a series of slices, can produce unexpected results.
Keep forms simple and build them up in bits for safety...Date : 12/2005
Type : Tool
Verison :
1.0 18/12/05 First issue.
1.1 18/12/05 Inches --> inch typo fixed.
1.2 18/12/05 Circle def moved into class (Mac).
1.3 19/12/05 X orienatation and last slice glitch fixed.
1.4 19/12/05 Decimal . AND , trapped...
1.5 19/12/05 Disc made larger...
1.6 20/12/05 Pushpull made compatible with earlier version.
Glitch with groups on -ve axes fixed.
Option to equalize slice spacings added.
1.7 20/12/05pm v5+ program only error added.
1.8 21/12/05 Undo text corrected.
1.9 22/12/05 Slice numbering option added.
2.0 24/12/05 Glitches in number locations fixed.
Slices and their Numbers are now grouped
individually inside one bigger group.
Option to make a 'flattened' copy added.
2.1 16/12/06 'Layer0' removed - Spanish versions etc, now
makes active_layer the default, whatever it's name -
& puts text/slices on it before layering groups.
3.0 09/10/07 Choose / make Layer on fly and select any 'Colour'
options added. All geometry now on 'default' layer.
4.0 20100201 Beta - Updated to add possible insets at start and end.
Added possible 'lines' bisecting vertices onto faces.
Arguments in () etc...
4.1 20110206 Temp version to fix complex glitch.
4.2 20110609 Several fixes; typename>>class, begin/rescue/valid? tests...
4.3 20110619 Image option added, usage: preselect 'Flat-Slice-nnnnnnnn'
group and type in Ruby Console: Slicer::images - it makes
png image files named after each slice, in new folder with
model named 'ModelName-Slice-Images-nnnnnnnn'.
Please ensure that any earlier versions are removed from the Plugins folder [e.g. named Slicer32.rb] before you place this new version into that folder and restart...Slicer.rb
THIS TOOL IS SUPERSEDED BY 'SLICER5', AVAILABLE HERE http://forums.sketchucation.com/viewtopic.php?p=374969#p374969 -
Thank you very much.
I'll keep an eye out for any developments.
Many thanks
Matt
-
I get this error message with Slicer.rb (version 3.0), see image attached.
-
@unknownuser said:
I get this error message with Slicer.rb (version 3.0), see image attached.
[attachment=1:1k4woufo]<!-- ia1 -->slicer error.JPG<!-- ia1 -->[/attachment:1k4woufo]
I apologise. I uploaded a version that's customized to my menu setup by mistake ! Of the 40 or so who've viewed it so far you are the only one to point it out... Here's v3.1 that's fixed to suit all.
-
Thank you TIG for another useful script
Walter
-
Thanks so much for the new version - works great! I'm using it similarly to the original purpose TIG mentioned, as a cheap 3D printer. Now to create a (cheap) automated way to cut them out!
best,
Matt
[mattratto]
-
Very impressive !
And so usefull .
Thanks a million !The final touch, for the cutting machine (cnc), would be numbers as lines so it can engrave them on the piece.
Oh and also the possibility to add a letter before the number, like A1, A2, .. B1, B2 ...Great plugin. !
-
@mariocha said:
Very impressive !
And so usefull .
Thanks a million !The final touch, for the cutting machine (cnc), would be numbers as lines so it can engrave them on the piece.
Oh and also the possibility to add a letter before the number, like A1, A2, .. B1, B2 ...Great plugin. !
I have a [privately written and hopefully paid for] 'Slicer v4' that has such lines added etc for CNC work - watch this space.
Here is a script that will add a prefix for you...
Put into Plugins folder...
Adds a Prefix to selected text or text inside selected group/instance-definitions
To use - select the objects needing prefixes [text OR groups containing text etc]
then in the Ruby Console typeprefixtext
+ <enter>.
A dialog asks for the Prefix Text - enter it and OK - e.g.A
.
All text in the selection is prefixed with the desired prefix e.g.9
becomesA9
etc...
It is for use after running tools like Slicer- where sub-sets of slices might be more useful if they are differently coded.
Errors will stop you if there is no selection or you enter a blank 'prefix'.
It is one step un-doable.
- where sub-sets of slices might be more useful if they are differently coded.
-
Thanks for the prefix.rb
Thought I find it difficult to integrate to the process since each text is a group, in a group.
For now, I use component numbers made of lines.Hum... that v4, is it close to release ?
Need some testing ?I do think it is worth some money.
-
The prefixtext ruby should 'mine down' into any groups selected and add to all text. It undoes in one step anyway...
-
Hi,
I'm interested in using the slicer plugin. I'm using the trial version of Sketchup Pro 7.1, and have downloaded Slicer31.rb. Whenever I try to use the plugin, Sketchup crashes. Any help is appreciated.
Thanks!
Karen
-
@unknownuser said:
I have a [privately written and hopefully paid for] 'Slicer v4' that has such lines added etc for CNC work - watch this space.
hey, are you finally going to make your own and bust that slicemodeler @&&hole
-
@kwalkerman said:
Hi,
I'm interested in using the slicer plugin. I'm using the trial version of Sketchup Pro 7.1, and have downloaded Slicer31.rb. Whenever I try to use the plugin, Sketchup crashes. Any help is appreciated.
Thanks!
KarenFirst try testing it on a simple group and make a modest number of slices - say 10...
When you get the hang of what it does you can then up the 'fineness' of the slicing... BUT be patient...
If you try to make hundreds of slices it will take a while and it sometimes 'whites-out' and appears to stall... BUT it will usually complete if you leave it for a while... -
@xrok1 said:
@unknownuser said:
I have a [privately written and hopefully paid for] 'Slicer v4' that has such lines added etc for CNC work - watch this space.
hey, are you finally going to make your own and bust that slicemodeler @&&hole
I have written a paid commercial version [private] - Slicer_v4 - for someone for CNC use etc... it [or some of its ideas] might leak out to you too...
-
awsome!
-
Thanks for the response. I have tried the slicer on a simple block, and only requested a few slices, but sketckup crashes completely and closes after it asks whether to add numbers to the slices. Anyone else have this issue?
Thanks.
-
A mystery...
Your details please:
Platform & OS
SUp version
Version of Slicer [open file with Notepad and read first section...]
Other plugins loaded [only anything unusual?]
Can you upload a simple skp that you have the problem with and a description of what failed - e.g. Z axis, 12" c/c etc...It usually works painlessly for most users...
-
@tig said:
@xrok1 said:
@unknownuser said:
Slicer_v4 - ... it [or some of its ideas] might leak out to you too...
So as to plan my work, is there a time estimate ?
-
hey I have been looking for this for ages to help my pupils with our laser cutter but i have been trying to down load slicer 3.1rb but i cant work out where to put the text version.
is there a slicer 3.1.rb file that i can just save and load into plugins folder?cheers
-
http://forums.sketchucation.com/viewtopic.php?p=16697#p16697
Save the linked file asSlicer31.rb
into the Plugins folder - done...
If your browser insists on making it another file type you can always use Select All on the page and paste it into a new empty plain text file and rename it with a .rb suffix NOT .txt ...
Advertisement