See new thread [Layer List Export and Import]: http://www.sketchucation.com/forums/scf/viewtopic.php?p=15373#p15373
...
See new thread [Layer List Export and Import]: http://www.sketchucation.com/forums/scf/viewtopic.php?p=15373#p15373
...
LayerExIm.rb v1.0
See: http://www.sketchucation.com/forums/scf/viewtopic.php?p=15372#p15372
This lets you quickly export lists of a model's layer names and import them into another model, you can also write a list manually and import that. For more sophisticated options use Didier's LayerManager Tool...
This lets you quickly export lists of a model's layer names and import them into another model, you can also write a list manually and import that. For more sophisticated options use Didier's LayerManager Tool...http://sketchucation.com/resources/pluginstore?pln=LayerExIm
As Edson says, RickW's "PageExim" script [see Smustard]] deals with exporting a model's pages[scenes] and then importing them into another model.
To import layers import the host-model into your model. It should come in as a component. Immediately in the component browser pick over it and delete it. All of its used layers have been brought over and will remain...
I'll knock together a script to make a list of a models layers, export it and then import it a la PageExim...
Didier
If it helps here's my thought process that's not too off yours ??? ...
You'd place the Cutting Compo as usual into the outer face.
The context-menu spots a cutting-component already in a face (via typename, glued_to gives face and other available properties etc). It should also check if there's an inner face to cut - pointless to give the option otherwise - your projection tools come in here ?...
The context-menu item is say 'Cut "[compo'name]" into inner Face'
We can get the intersection edges between the Component and its glued face.
Assuming we have the 'cut' lines' loop we copy them onto the inner face by projecting backwards.
We erase the outer face loop so the window cuts into the face properly once again.
We erase the inner face within its loop.
We make reveals from this out to the outer face (copy inner face materials).
To get the hole/reveals to move with the component we could link those entities with attributes and observers etc so if one of them moves then so does the other one...
See: http://www.sketchucation.com/forums/scf/viewtopic.php?p=15295#p15295
VolumeCalculator2.rb
Rewritten with a much quicker volume calc method thanks to AdamB.
Please try and feedback. It has most of the functions/options of v1.8 and also puts the text-tag on a separate layer...
Note its new name - remove any earlier versions before running or you'll get two Volume items in the context-menu...
VolumeCalculator2.rb
Rewritten with a much quicker volume calc method thanks to AdamB.
Please try and feedback. It has most of the functions/options of v1.8 and also puts the text-tag on a separate layer...
Note its new name - remove any earlier versions before running or you'll get two Volume items in the context-menu...
This is v2.0 - the NEXT post contains v2.1
Does what its name says:
http://www.sketchucation.com/forums/scf/viewtopic.php?p=15273#p15273
It matches the orientation of a face to any connected 'co-edged' faces.
It mimics SketchUp's "Orient Faces" Tool.
It can sometimes produce slightly different results when more than two
connected faces share a common edge. Its results are equally logical,
and who's to say how they should orient anyway ?
Ideas on how to duplicate the built-in tool are welcomed...
You can call it from other scripts thus: face.orient_faces
Feedback please...
Does what its name says:
It matches the orientation of a face to any connected 'co-edged' faces.
It mimics SketchUp's "Orient Faces" Tool.
It can sometimes produce slightly different results when more than two
connected faces share a common edge. Its results are equally logical,
and who's to say how they should orient anyway ?
You can call it from other scripts thus: face.orient_faces
Feedback please...
EDIT:
v1.1 20090808 Algorithms improved - much faster.
v1.2 20120204 Checks of existing method!
orient_faces.rb
A forced upgrade that doesn't even have the correct release notes on the site it directs you to is inexcusable. It means you MUST upgrade if you want to use SketchUp Pro 6 AND be connected to the internet...
I suspect that Google doesn't have any hidden motives in doing this - it's some inept dork must have written some code wrong... BUT 'they' have responsibilty for their products and services. This level of ineptitude is pretty worrying. Google as a company expect us to trust them with our potentially sensitive personal data, BUT they can't get a simple upgrade tool right - when will it come out that something far worse has happened... This has echoes of the UK's Tax Dept losing unencrypted CDs 'in the post' that contained the names, addresses, bank account details etc of almost half the UK's population - including millions of vulnerable children - and they bang on indentity theft, ID-cards to 'protect' us from the terrorists, and about their 'data protection act' laws etc, BUT they can't keep our details safe by using basic common sense !
Google MUST buck up OR loose our confidence completely - it's already dented !
With web based dialogs it's probably 'yes': BUT the basic SUp-ruby dialog has its values fixed as it opens: only the user input changes input-fields/drop-down selections: you need to OK/Cancel to get it to change values - at that point it could change them and reopen itself with the new values displayed ?
Can you give a more concrete example ?
Something I've toyed with over the years BUT you go for it Didier - long over due...
@unknownuser said:
TIG,
Would it also be possible to add the following... ???
...
- If the user had the option to choose either Horizontal or Vertical Volume slices it would make the Volume Calculator more accurate.
Not sure if its possible but would be brilliant.
(See attached file which illustrates the problem).
...- To Calculate Volume on a Selection of Several Groups / Components at once...
eg User selects 12 Groups or Components...
Volume Calculator then loops thru each Group / Component in the selection in turn calculating volumes for each individual group / component that was selected based upon the users settings in the Volume Dialog box eg Layer for Volume Slices / Hide Edges / (Vertical or Horizontal Slices) etc
...
Hope this all makes sense.
Anything you can do hugely appreciated.
...
Regards
Howard LeslieEdit 1 / Ideas Thoughts:
Script could actually make true Vertical Slices (or any angle) or
Temporarily rotate geometry in the background hidden from user and then turn it back again ??? or
Produce both Horizontal & Vertical Slices for each Group / Component and Delete the lowest Value ??? (might be slow)
Edit 2 / Ideas Thoughts:
Vertical slices may be a problem - how would the script know the best orientation to draw them in ???
ie Vertical slices can be drawn to be parallel to either the red or the green axis - how would any script choose the best way to draw them ???
Poss Solution - Draw Volume Slices Parallel to all 3 Axes !!!
Delete lowest Volume that was computed for each Group / Component (Could be VERY slow).
Edit 3 / Ideas Thoughts:
Best Solution may be to forget Vertical slices altogether ???
Working out Individual Volumes in Turn (Looping) for Several selected Groups / Components would be good though.
That way, for any "problem" Groups (eg similar to attached file), the accuracy could be turned up to say 1% - the Script could then be left to run eg over a lunch break or over night if required.
AdamB has just fired a broadside through the current ideas behind Volume Calculator with an ingenious method the calculate volumes from faces...
I wrote my volume calculator based on totting up areas of slices - somewhat like calculus - which was a few years ago after TBD said it couldn't be done... It's taken till now for someone (AdamB) to come up with a method that does it properly 'mathematically' - his '.dot' method was the answer. Adam's way returns a more accurate result very quickly, but the downsides of his method are that it gives no 'solid' artifact of the volume - although it could have a text-tag made with a volume attribute so that csv making was eased: a copy' group of the entities could be made coloured as desired too. Also his gives unexpected answers for volumes with missing faces, whereas mine only fills up to the top level and then overflows so to speak - like a tilted glass; and I not sure how his method copes with having some faces reversed as it uses face normals during the maths - I need to test that...
I intend putting a a new version 'to the vote' and if there's sufficient demand and Adam agrees I'll look at v2.0 using his methods, but adjusted to suit whatever the 'users' want of it - clearly it'd need alternate volume options, csv listing etc...
His method would allow multiple selections and I can contrive it so that you get much of what you do now but more accurately and faster... Watch this space...
It's quite possible to leave bits visible and adjustable by the users BUT its a bit more convoluted so often it's not done...
I think this does what you ask...
http://www.sketchucation.com/forums/scf/viewtopic.php?p=14555#p14555
Volume groups are now named after their volume without a unit suffix - e.g. '4.567' (unlike their text tags).
Also you can now right click on a Volume to get the option to make a csv list of all of them - no need to use ComponentReporter+'s clunkiness...
Copyright 2006-2011 TIG (c)
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: VolumeCalculator.rb
Description: A tool to calculate the volume of a selected Group/Instance
Context Menu: Volume...
Menu Item: See menu-section at end on how to include: Plugins -> Volume
Usage: First select a Group or Component that has faces that form a
volume, then use the right-click Context-Menu and choose 'Volume...'.
If there is the Plugins Menu Item 'Volume' you can also pick that.
(see the end menu section on how to activate that option...)
A dialog asks for the volume units and the accuracy required.
The units can be cu.m, cc, cu.yds, cu.ft, cu.ins, litres, cl, ml,
gallons(UK), gallons(USA), quarts(USA), pints(UK) and pints(USA).
Volumes are given to varying d.p's depending on the units chosen.
IF Sketchup is <v8 you get extra options...
The accuracy can be 0.5, 1, 2, 5 or 10% - the more accurate you
make it the longer it takes to process and the more complex the new
volume-group will become.Small simple forms will report accurately
even with the 10% sampling...
IF Sketchup is <v8 you get a group made with faces.
The text-tag is added just above the the apex of the selection's
bounding-box.
It shows the volume in the required units using the current
text/font settings.
A possible new layer can be used.It is
named VOLS-nnnnnnnn (where nnnnnnnn is based on the date/time).
Alternatively you can choose to use any existing layer OR make
your own 'on the fly'.
IF Sketchup is <v8 it then calculates a series of thin horizontal
slices through the selection's faces to use to calculate the volume
enclosed. If Sketchup >=v8 then this is skipped.
There are now also new Layer, Hide/Show-Edges and Colour Options
in v1.7, see below...***
IF Sketchup is <v8...
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 volume-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 volume-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. If you answer 'Yes'
it exits leaving 'Xray Mode' switched 'on'.
If you don't want the slice to be visible you can edit the
volume's group and either delete all of its geometry, leaving
the text-tag in place, or just select all geometry and hide it.
'Volume' can't be expected to be 100% foolproof !It treats an open
topped object as if it were filled with water, taking volumes 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 vertical array of
thin volumes spaced apart so as to miss the sampling slices - which
because it uses a series of horizontal slices, can produce unexpected
results. Keep volumes simple and build them up in bits for safety...
***New Options(>=v1.7) let you choose any layer OR make a new one,
hide/show volume's edges and give faces any standard colour -
pick popout' type first letter of colour to jump down list -
e.g. W for White takes you to Wheat...:
use up/down arrow keys to move through list...
or pick any model material listed...
If Sketchup >=v8 the text-tag is colored - so avoid colours matching
the background!
If a volume-group OR text-tag is selected then there's a
right-click context-menu item to export ALL volume data into a
CSV file...
Donations:
PayPal.com - info @ revitrev.org
Version:
2.0 20111004 New version with fast v8 calculation.Put into the Plugins folder and restart Sketchup, read and follow the instructions...
"float-tolerance.rb" is by RickW [I think - I hope he doesn't mind me repeating it in its entirety here]
class Float
def =~(num2,tol=10000)
num1=(self*tol).to_i
num2=(num2*tol).to_i
return true if num1==num2
return nil
end
end #class Float
Then you test two floats thus:
float1 =~ float2
It returns false or true
You could adjust the float tol part to suit...
New sloping fascia and/or sloping soffit options are well advanced and are now in beta testing: only the gable version with all of its permutations for two sloping soffits and gables is proving a pain to debug...
Also looking at allowing heights for gable and pyramid roofs in ^5'4" format as well as existing ^5.3333333 or ^64 depending on units etc...
Also looking at 'Set Slope', which is like the 'Get Slope' tool, but it changes a selected roof face to the given slope (degrees or A:B)...
Also looking at an 'Add Detail' tool so you can add gutters, mouldings, ridges etc to a roof's selected edges; you can also customize the profiles by adding your own - watch this space...
Also preparing new help docs to go with all of this....
For further Slicer info see... http://www.sketchucation.com/scf/viewtopic.php?f=9&t=2635
@pixero said:
Thanks for the script. It will come in handy for a current project.
I can't however see any images in the help file. Im on WinXp.
Vista, XP and Mac users all seem to be having problems with different forms of the Help files...
As well as the mht file there's a pdf... see: http://www.sketchucation.com/forums/scf/viewtopic.php?p=6643#p6643