Sketchucation Tools 5.0.7 | Licensing improvements and bug fixes Learn More

Subcategories

  • No decscription available

    20 Topics
    462 Posts
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Ruby script of bezier curves need edit

    5
    0 Votes
    5 Posts
    2k Views
    piratebrianP
    I'll post some cut tests shortly, but here is the lovely curve: [image: RnQR_bezier160.JPG]
  • Question about Normal vector

    9
    0 Votes
    9 Posts
    1k Views
    Dan RathbunD
    this: normal_vector = normal_vector + face.normal will not work as expected, if you set normal_vector to reference the integer object 0, because the integer +() method will get called, and it is not likely that it would know how to handle an argument that references a Geom::Vector3d object. Smarter to create either a unit vector object to start with, or a zero length vector: normal_vector = Geom::Vector3d.new(0,0,0) THEN, when you call the +() method using: normal_vector = normal_vector + face.normal the special vector addition API method will get called. In other words your statement is evaluated as if it were written: normal_vector.=( normal_vector.+( face.normal ) ) This is one of the important things about Ruby... = and + (etc,) are not really operators, they are instance method names.
  • Cleaning up after intersect_with

    9
    0 Votes
    9 Posts
    564 Views
    sdmitchS
    This seems to work with or without using intersect_with model = Sketchup.active_model entities = model.entities entities.clear! #Create a group to collect all entities for base cube basegroup=entities.add_group basegroupentities=basegroup.entities base_trans=basegroup.transformation p1 = Geom;;Point3d.new(0, 0, 0) p2 = Geom;;Point3d.new(9, 0, 0) p3 = Geom;;Point3d.new(9, 4, 0) p4 = Geom;;Point3d.new(0, 4, 0) points = [p1,p2,p3,p4] base = basegroupentities.add_face points base.reverse! if base.normal.z < 0 base.pushpull 1 cutgroup = entities.add_group() cut_trans = cutgroup.transformation cutgroup.entities.add_3d_text('Bob', TextAlignCenter, "Arial", true, false, 3.0, 0.0, 0.0, true, 1) transform = Geom;;Transformation.new(Geom;;Point3d.new(0.5,0.5,0)) cutgroup.transform! transform #intersections = cutgroup.entities.intersect_with true, cut_trans, basegroup.entities, base_trans , true, basegroup basegroup.explode dmp=cutgroup.explode;#erase the top and bottom of the letters dmp.each{|f| f.erase! if f.is_a?(Sketchup;;Face) && f.normal.z.abs>0.5} #add faces to 'holes' in the letters dmp.each{|e| e.find_faces if e.is_a?(Sketchup;;Edge) && e.faces.length==1} model.active_view.zoom_extents
  • Get_element_value issue (on Mac)

    14
    0 Votes
    14 Posts
    3k Views
    thomthomT
    Surely an instance variable will work just as well? Avoiding the risk to collision of global variables - especially with a common variable name such as args.
  • [WIP]SCF Plugin Repo/Auto Installer

    26
    0 Votes
    26 Posts
    2k Views
    mitcorbM
    This is an excellent concept, Rich. Video well done and narrated.
  • Need testers for my Ruby Code Editor

    19
    0 Votes
    19 Posts
    1k Views
    alexschreyerA
    @trogluddite said: ...when it comes to testing and de-bugging, this is the bee's knees. Thanks for your comments! Glad to hear you like the editor. I'll look into your suggestions but - as you said - the display just naturally becomes slower with 100's of lines of code simply because it renders everything in JavaScript. Not sure if #3 is already implemented in CodeMirror somehow... have to look. Cheers, Alex
  • Sketchup send action for paste..

    6
    0 Votes
    6 Posts
    1k Views
    TIGT
    BUT since there is no ability to change the active-context through the API then paste-in-place is pointless... If you Cut or Copy then Paste with send_action it's sine because the original selected object and the newly copied/cut then-pasted one are in the same context, and the user gets the copy on their cursor to place manually. But let's assume there were a seemingly usable Paste_In_Place send_action available through the API, how would it be of any use ? Say you are in the the model and want to Cut an object, open a Group and then do a Paste_In_Place on the object inside the Group. In the API you can Cut it. BUT you are now stuck as you can't open the Groups context. Paste_In_Paste will simple place the object back where it was, in the current context !!! There IS a way to replicate all of this 'in code'... BUT your Ruby_Cut and Ruby_Paste_In_Place into another 'container' custom code needs to make a group of the selected objects, then find that group's definition and then use container.entities.add_instance(defn, trans) on the other container's entities context, applying the container's transformation onto it [with a .inverse ? I write this 'off-the-cuff'], so that it's kept 'in_place'. Once that is done you explode that newly added group inside the container, then finally you erase the original group so the selection appears to have been cut and pasted_in_place into the other container... If you mimic a Ruby_Copy and Ruby_Paste_In_Place it's similar... except on completion you also explode the original group rather than erasing it, and in that way the selection appears to have been copied and pasted_in_place into the other container...
  • WebDialog on Mac (call to Google SU engineers)

    25
    0 Votes
    25 Posts
    10k Views
    jolranJ
    Ahh, missed this addition to this rather old topic. Interesting reading. Might be relative to Didier's recent topic. http://sketchucation.com/forums/viewtopic.php?f=180&t=51350 I wonder if I could get some clarification about this: For ex, let say you have a dozen buttons that each is hooked up to it's own callback to Ruby with "window.location.href" for the callback. Even if the Ruby script is permitted to "finish" it's doing before pushing the next buttons, will there be a sync problem ? I'm having a hard time understanding how this issue behave since I don't have a Mac for testing it out myself. It seams like Arielius has a clever solution, but what if for ex one has a slider performing realtime transformation or such ?
  • Import CSV to extract values

    7
    0 Votes
    7 Posts
    2k Views
    K
    @tig said: Ken... I've given you an example in the 'parallel thread' that you started. Yep, got that TIG. Thanks..and sorry for repeating the post.
  • Compile PPC comaptible C Extension on OSX10.8?

    5
    0 Votes
    5 Posts
    371 Views
    thomthomT
    Don't have the specs at hand - but I think it's one of the late 2009 Intel Mac Minis.
  • [concept] plugin launcher

    39
    0 Votes
    39 Posts
    7k Views
    A
    If your were interested in LaunchUp, don't miss that it is no an official plugin: β†’ LaunchUp – A Quick Launcher for SketchUp
  • SketchUp Ruby API Suggestions

    5
    0 Votes
    5 Posts
    338 Views
    A
    Great! Especially since so many issues are scattered over the forums (or burried miles deep under newer bug reports). I sometimes feel by reporting bugs we create the most awesomest bug collection, but the goal shouldn't stay purely contemplative, shouldn't it also be about realizing solutions? This way we can collaborately work on it and "prototype" API fixes and suggest extensions. Also there are so many subtle small issues/infos/experiences that would best be placed directly in the code or at the corresponding method in the API documentation (which we can't edit) – or in this github project.
  • I need a help

    3
    0 Votes
    3 Posts
    299 Views
    D
    Hail Jolran Thank you your help. I will read this lots of informations what was linked by you. I start make my plugin. Now i can make input box and i can give the width, lenght and soo on. And after this plugin draw for me. But i don't know yet, how can i save in a storage my "woods", and after i put in the screen only one click? faanyagjo.rb
  • Load Newton.dylib file via Ruby

    2
    0 Votes
    2 Posts
    220 Views
    thomthomT
    I moved that post to the Developers forum, and I'm closing this one to keep the conversation collected in one thread.
  • Removing unused commands and shortening toolbars

    8
    0 Votes
    8 Posts
    587 Views
    U
    Thanks TIG for the heads up on how to do that - so far I've only needed that small cmd set, and yes I've since realised it's Didiers' plugin not ThomThoms'.
  • Query Tool Toolbar Button

    6
    0 Votes
    6 Posts
    1k Views
    A
    That error does not come from this download, but from "utilities/utilitiestools.rb" that comes with SketchUp. Probably it can't find some resources. You should have a file "…/Google SketchUp 8/resources/en-US/utilities.strings" (or different language code), does this file exist?
  • To detect if a component contains a component

    5
    0 Votes
    5 Posts
    408 Views
    G
    @dan rathbun said: Here's another edition (wrapped in method,) that only works upon the active editing context (to help prevent BugSplats!,) tests first for any definitions and lastly filters out images and groups. thank you for the code i tried it, but it doesn't work, at least on my computer
  • Model Time of Day - Does Anybody Know of a Script or Plugin?

    3
    0 Votes
    3 Posts
    253 Views
    Dan RathbunD
    IF you can, access the ShadowInfo hash directly rather than changing EVERYONE's DynamicComponent class. See: ShadowInfo P.S.: It would be nice if possible, to append a custom DC function, in a singleton manner, to ONLY the specific DC instance in question, rather than modify EVRYONE's set of DC functions. (But I'm not sure it can be done, the way the DCs are currently coded.)
  • New order for toolbars

    2
    0 Votes
    2 Posts
    190 Views
    Dan RathbunD
    You can access toolbars by their name, if you load them into a hash. See: [ Code ] User::ToolbarSet collection
  • Creating SketchUp scene from saved files using Ruby script

    11
    0 Votes
    11 Posts
    2k Views
    M
    Thank you all for your help.

Advertisement