Posts
-
TextTag
TextTag.rb is a tool that adds a 'flat' 3D text-tag component, that's placed 0.1mm above any face so it remains visible.
You are first prompted for the 'text'...
Note: you type \n for any new-line breaks you require,
e.g. "Text\nTag on\n3 Lines".
You can then choose to change settings, Yes/No: No = skip, the initial def=Yes: it accesses the following settings.
height = of upper-case I in current units: def=100.mm/4".
alignment = Centred, Left, Right: default=Centred.
font = Most TTF Fonts are listed: default=Comic Sans MS
[See 'FONTLIST...' in script to edit list or add your own...
the list is based on most MS Vista TTFs so Mac users might like to add "Helvetica" etc]
[if lists off screen, type start letter, use arrow keys...]
bold = Yes/No: default=No.
italic = Yes/No: default=No.
filled = Yes/No: default=Yes, No=Outline - Edges only.
color = Any Existing/Standard Color: default=Black., using <Default> lets instances be painted other colors.
[if lists off screen, type start letter, use arrow keys...]
layer = Default=TEXT-TAGS, pick another OR make your own.
[if lists off screen, type start letter, use arrow keys...]
face-camera = Yes/No: default=No - best for most uses.
snap = Yes/No: default=Yes - then tag snaps onto picked face - you can always 'unglue' snapped tags later.
These settings are remembered in the model and as attributes in the individual tag definitions.
Each tag has a unique name, e.g. "~TextTag#7", so they will list at the end of the model's components.
Any text-tag is editable by right-click context-menu...
This lets you remake the tag's values as above. except that the tag remains where it was originally placed down.
Tags can be moved and copied, BUT remember that changes to a copy will affect its siblings, if it's not 'made-unique'.
The tag's letters, spacing etc can be edited within the tag instance, BUT remember changes will be lost after tag-editing...Feedback please...
-
RE: Text text text!
@voder vocoder said:
...There's a basic problem with 3D text: since it is rendered as ordinary 3D geometry it has an outline--and a thick one--which is whatever the Profile edge attribute is set to. Unfortunately, scalable fonts are designed to be rendered net; that is, fill but no outline. The result is that SU renders 3D text characters distorted: strokes are too thick; cutouts get filled in; characters bleed together, etc. The effect is less noticeable at large point sizes, where the outlines account for a much smaller percentage of stroke width, but at small sizes, like the size of note text, the characters look fuzzy and ill-proportioned at best and barely legible at worst.
You can hide the edges, but that's a pretty kludgey and time-consuming workaround. The best workaround I've found is to intersect (integrate) the edges with a rectangular face, paint the face with an invisible color, hide the edges of the rectangle, and smooth the edges of the characters. That leaves you with your block of text on an invisible plane, which you can position and orient as you please.
There are still other problems with 3D text, though--most notably, the leading (line spacing) is too tight for most purposes, and there's no kerning. True, you can fiddle with the geometry, but that becomes rather laborious.
Voder VocoderIF you were automating 3D-text as text-tags then it'd be [relatively] easy to hide all edges in the text-tag component and make the faces 'black'... Kerning etc is more painful...
-
RE: Text text text!
- Using 3D text with no depth would give you that ability. I could see a script, that was called say "Text-Tag", that would let you add a text-tag to a model that became a component using 3D text; it would also have an attribute that tells us it's a text-tag and the second part of the text-tag script then lets you [right-click]edit any text-tag so you can renew its text etc and it'll then replace the old text-tag component with the new info...
- It would be [relatively] easy to read the text part from a DXF and then make some SUp text at the same location - complex thinking on how to get the size/font to correspond etc but NOT impossible... DWG files are more complex to read directly...
-
RE: STOP whatever you're doing button!
Maybe something like pressing the Esc-key three-times = Abort! would be a good thing, as the buttons are disabled during processing...
-
RE: New script: Munsell colors maker
Didier
Thanks for the new script... unfortunately it doesn't work straight away - IF the user's current directory isn't the Plugins folder !
You need to add some code to each def's file reading part like this:
file=File.dirname(Sketchup.find_support_file("Munsell.rb","Plugins/"))+"/" in_file=File.open(file+"Munsell_hexa.txt","r")This then makes the thing work as intended...
You could also add a 'help' menu item like:def munsell_help help="file;///"+Sketchup.find_support_file("Munsell Maker User Guide.pdf","Plugins/") UI.messagebox("***ERROR***\n\n.../Plugins/Munsell Maker User Guide.pdf\n\nNOT found.") if not UI.openURL(help) end#def help ###... main_menu.add_separator main_menu.add_item("Help..."){munsell_help} ###... -
RE: Massmaterialimportant.rb woes
This is the entire code [I tweaked it almost two years ago...]
#This script was created by Adam Beazley for public use and may be edited. #http://www.abeazleydesign.com #Directions #Just click in the Import Materials button in the plugins menu and type in the location of all of you image files. #This script will create a material and name it the same name as the image file and then use that file as the texture. #all textures will come in at a standard scale and must be edited later #after all materials and textures have been imported into the model, simply add them to your library #you can then save the library as a .skm library file through sketchup. #have fun!!! # ### v1.1 TIG tweaks 29/12/05 ### #----------------------------------------------------------------------------- require 'sketchup.rb' #----------------------------------------------------------------------------- def materialimporter model= Sketchup.active_model materials= model.materials model.start_operation ("Import Materials") ###undo - see commit at end pwd= Dir.getwd.split("/").join("\\")+"\\" ### fix for SU dry= UI.openpanel "To Pick this Directory; Pick Any Image File + OK...", pwd , "*.???" ### for jpg or png return nil if not dry dry= File.dirname(dry) return nil if not dry cwd= Dir.chdir(dry) images= Dir["*.{jpg,png,tif,bmp,gif,tga,epx}"]### for all supported image file types for image in images imgname= image.split(".")[0..-2].join(".") ### removes .jpg etc from end mat= materials.add imgname mat.texture= image end#for image### model.commit_operation ###undo all if needed end#def### if(not file_loaded?("massmaterialimporter.rb")) menu=UI.menu("Plugins") menu.add_separator menu.add_item("Import Materials") { materialimporter } end #----------------------------------------------------------------------------- file_loaded("massmaterialimporter.rb") #Works fine for me ?
-
RE: Roof.rb v1
Version 2 now out see this thread instead...
-
RE: Roof.rb v1
The good news is... I have had a 'Pauline Moment' [road to Damascus and all that...]. I have seen the light... I am setting off re-writing the gable (and pyramid) tools so that you will only need to select point-one then point-two that will define where the line for where the gable (or pyramid pitch) starts and then point-three which gives the 'depth' of the gable-roof's base (or the pyramid's other side) - the point will be translated to a common 'z' anyway, so its exact location isn't critical, however, best to keep it square to the first two points as it'll return the true perpendicular distance from line pt1-pt2 to pt-3 anyway.
The bad news is... you'll have to live with the deficiencies of v1.3 a bit longer while I fix all of this in "v2.0" with a new help .mht file...
It'll take 'a few days'...
-
RE: Roof.rb v1
@tomot said:
fantastic script TIG!
Please allow me to make the following small observation:
see attachmentThe roof that is created is a 'true' hip with all of the faces at the same angle/slope. If you want a single springing point for all the apse rafters then make the apse-end a semi-circle, OR be prepared to make an uneven pitched roof by hand...
-
RE: Roof.rb v1
@iglesias said:
Hello,
The problem could be solve making one of the wings a block.
You got there ahead of me ! However, we do need a kinder gable-roof rectangle checking routine - I'm on to it...
-
RE: Roof.rb v1
@davekn said:
Tig
The following comments are in the Ruby console
Hipped Roof -
Error: #<NoMethodError: undefined methoddialog_hip' for Roof:Class> (eval):210:inhip'
(eval):2749
(eval):210:in `call'
(eval):210Mansard Roof -
Error: #<NoMethodError: undefined methoddialog_man' for Roof:Class> (eval):802:inmansard'
(eval):2750
(eval):210:in `call'
(eval):210Gable roof -
Error: #<NoMethodError: undefined methoddialog_gable' for Roof:Class> (eval):1514:ingable'
(eval):2751
(eval):802:in `call'
(eval):802Pyramid roof -
I still get the instruction to pick a rectangular face & edge etcDave
Mac must call sub def's differently from PC. I'll look into redoing these sub-def dialogs...
-
RE: Roof.rb v1
@dtrarch said:
TIG
Super and very much needed script but the Gable still is iffy for me and some faces that are created square are refused by the script and will not execute.
DaveThis error seems to be because the face although seemingly a rectangle has 5 sides ? I'm working on a fix for some other gable related problems and will try to fix this then. In the meanwhile draw a line on the gable edge, group it and edit the group and then draw a rectangle over the original, gable roof the lot new face in the group. Explode the group and you should still have the gable roof group. A fix is in progress...
-
RE: Roof.rb v1
@davekn said:
Tig
Still having the same problems with v3 as with the previous versions.
The get slope angle works fine & so the script must be working - but as previously said I don't even get the initial info box when trying to draw any of the roofs.
This must be a Mac thing.Dave
Are you getting any messages in the Ruby Console Window when you try and run it ?
Are there any other Mac users out there trying this ? Successfully or not ? I don't know of any Mac/PC issues that could be causing this... -
RE: Roof.rb v1
@seasdes said:
TIG
V1.3 now offsets a gable roof to the side of the polygon used to define the roof.
Sorry
SeasdesA new one - I haven't managed to reproduce that (yet). As you can see from others comments they aren't getting the problem. Does it always do it, or at certain rotations of the rectangle about the origin? What are the setting you use in the dialog and system are you on ?
Edit: Found out the cause - looking for a fix. IF you have a manually drawn rectangle - 4 sides, drawn clockwise and the face reversed (down) you get your problem; with the same face if you reverse (up) it before running gable-roof tool the two gable-ends swap over but otherwise the roof is in the right place. Must be trappable and fixable - thinking on it...
Looking into it now. It shall be fixed... -
RE: Roof.rb v1
Version v1.3 of Roof.rb is now available.
Click here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=1516
It fixes most of the outstanding bug reports. But keep the feedback coming... -
RE: Roof.rb v1
@didier bur said:
Hi TIG
Very nice work ! V1.2 is working OK here, both on W2000 and XP.
It's a pity that I can't translate it to french (script is crypted)

Regards,Since I've copied your cunning techniques you should be able to crack it easily! ?;^)
Please feel free to make a re-encrypted french version, with a suitable change to the header in which you take the blame for the translation! ?:-| Toit.rb ?
You could also rework RoofHelp.mht into french - as say ToitAide.mht with the end menu bits reworked to suit, before recrypting...Wait for v1.3 to arrive before doing any translating. The fix for v1.2 itself caused a glitch with the materials for some types of gables that I didn't spot before reissuing it yesterday...
-
RE: Roof.rb v1
Here's v1.2. Click here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=1516
There's now a slight tolerance in checking if the face to make a gable or pyramid roof is rectangular. If the sides are out by less than ~0.2mm in 1000mm it'll still work. However, in that case you might get gables not lining perfectly with the block below.I hope this now addresses a few problems. Keep the feedback coming...
-
RE: Roof.rb v1
They do (aaargh) especially when I don't get any errors on XP or Vista set-ups almost exactly like yours ...
BUT it shall be sorted ! -
RE: Roof.rb v1
@davekn said:
Hi Tig
Yes I downloaded v1 & I have tried drawing a rectangle on the floor but with exactly the same results.
I had to rename the the V1 download as I have the problem that all downloads apart from zipped files come in as 'download.php'. The original was okay as it came in a zipped file.
I presume the v1 file is still named roof.rbmany thanks Dave
Try the v1.1 zip to be sure...