Where's this gem, Rick ? I don't see it at smustard 
Posts
-
RE: Vector.angle_between() -- Direction?
-
RE: Vector.angle_between() -- Direction?
The angle_between method returns a value between 0 and PI, so 270Β° is the same for it than PI/2

This is really a weird way of returning angle IMHO 8O
Nobody knows (at least not me) why 'they' coded this that way.
I'm afraid you'll have to test the two vectors to know in which trigonometric quadrant (0Β°->90Β°,90Β°->180Β°,180Β°->270Β°,270Β°->360Β°) they are, to get the "real" angle between them.
But perhaps you could also use this:
your_component_instance.transformation.yaxis = your_angle
Hope this helps
-
RE: New script or know of a script like this???
Hi,
@unknownuser said:
if i can re-pay you some how let me know
Simple: please send a credit transfer of Euros 100.000 and we'll be good friends.

-
RE: New script or know of a script like this???
Hi,
Never tried it with V6
, but the script exists for v5.
Download ADO.zip at my site, Files-Converters-Misc section.
Regards -
RE: REQUEST (perhaps needs another subsection?)
Done (see depository). I hope it's the right script.

-
RE: New Ruby Scripts Depository forum
Hi Alex,
My site (see sig) is also a good place to find all free scripts that have been published since 2004.
No advertising and such
-
RE: Housebuilder ruby script
Ok Juju,
It's a matter of hours or days...
Tomorrow maybe, if I can get it to work OK with these fu***g
PNG icons that sometimes don't display correctly on some machines (still don't know why, maybe I'll provide Gif's instead).
Regards, -
RE: Housebuilder ruby script
Juju,
Last version at my site, because I made the metric version myself.
If you want another sections, you would have to give them to me and I will implement them because they are "hard-coded" in some way.
Cheers, -
RE: [Plugin] Align 2d
Hi TIG,
I see that you're online now and I've got a small problem:Rotating groups/components work with this attached version EXCEPT with Y match, and I don' know why. Can you have a look at it ?
Thanks in advance.
-
RE: [Plugin] Align 2d
Here is an update with some fixes, thanks to TIG for pointing out.
All alignments are now done regardless of altitudes of selected groups/components.
It also checks for impossible alignments, for instance aligning vertically along a line which is parallel to Y axis is not allowed.
-
RE: [Plugin] Align 2d
Bug found: it happens when either the 2 points that define the alignment line or the origin of groups/components are not on the same plane.
I'm considering to provide an additionnal option to align groups/components axis with the alignment line. Does it make sense or do you think this will be useful ?
Regards,
-
RE: [Plugin] Align 2d
Thanks for the bug report TIG
I'll check that soon (and the selection issue as well)
-
RE: [Plugin] Align 2d
Oops, where's the rb ??? I've attached it and nothing shows up ?

Coen, I just retried and it tells me that rb extension isn't allowed. 8O
Any fix for this ? -
[Plugin] Align 2d
Hi all,
Here is the beta of my new Align 2D script (the Align 3D script has been released yesterday, available at the old SU Ruby forum and at my site).How it works ?
- Make a selection (other objects than groups or components are ignored)
- Select "Align 2D" in the context menu or in the Tools menu
- Click 2 points that define a line for the alignement.
- A construction line is temporarily drawn and a dialog box is displayed
- Choose your options:
- horizontally align all groups/components along X axis at the intersection with the cline
- vertically align all groups/components along Y axis at the intersection with the cline
- perpendicularly align all groups/components along a perpendicular virtual line at the intersection with the cline.
- Other options self-explanatory
Experiment by yourself and have fun !
Regards,Please get the latest version from the PluginStore
http://sketchucation.com/pluginstore?pln=align_2D -
RE: Scripy sticks?
Hi CadFather,
is it possible to create a scipt that saves the toolbar workspace (you know what i mean) or at least opens all the toolbars in one go so that i can then place them.. please tell me yesI tell you YES.

Opening all toolbars will be quite simple, restore the workspace may be less simple, as the location of toolbars are saved in the registry AFAIK. But why not ? Pure Ruby makes them "readable/writable", so...
It's on my list... -
I'm the first
Cool to be the first one.
Welcome all and thanks Coen for providing this forum ! -
RE: Working with selection - ungrouped or within a group
Yes it is doable.
For instance:
def editing_group?
if Sketchup.active_model.active_entities.parent.class == Sketchup::ComponentDefinition and Sketchup.active_model.active_entities.parent.group?
return true
else return false
endWill return a boolean to tell the script if the user is currently editing a group. BUT using methods of the selection class is independant of that.
Even if the user is editing a group, Sketchup.active_model.entities can be accessed the usual way, and Sketchup.active_model.active_entities will return a collection of entities of the active group/component.If you have to check wether selection is a group or not, use this test:
Sketchup.active_model.active_entities.parent.class == Sketchup::ComponentDefinition
(because group are stored as if they are components !)
and if you have to check wether a particular selected object is part of a group or not, use this test:if editing_group? and Sketchup.active_model.active_entities.include?( object_id ) ...
Hope this helps, -
RE: Working with selection - ungrouped or within a group
No.
You cannot have a selection of entities in and out a group/component at the same time.Shetchup.active_model.active_entities returns the whole model if you aren't editing a group/component, and returns the collection of entities of the group/component if you are editing a group/component.
Shetchup.active_model.selection is completely different from that.
Hope this helps,

