Mac User? | Join the Rayscaper Beta for Mac 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
  • Load Newton.dylib file via Ruby

    2
    0 Votes
    2 Posts
    261 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
    730 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
    488 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
    337 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
    243 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
    3k Views
    M
    Thank you all for your help.
  • Online model generation using ruby

    2
    0 Votes
    2 Posts
    238 Views
    J
    You wouldn't need the Pro version - free would work. The SketchUp/Ruby side of this won't be too hard. You could simply poll for changes in a file, read in the instructions, draw things, and export an image file from a SU plugin. As far as the server goes, if you do not have one setup you could try installing like wamp on your local machine for testing.
  • Transform by vectors and Hash.

    12
    0 Votes
    12 Posts
    926 Views
    jolranJ
    @unknownuser said: NO not now, because the vertice positions are part of the definition, and not part of the individual instance(s). Thanks for answering Dan. It could be an useful addition to the API, IMO. What confuses me is that we are moving the vertices when scaling the instance(s) using Sketchup normal scaling behavior. So why would it be different if doing a tapering ? I know the calculations for tapering is much more complex, but... Maybe there is need for some symmetry calculation I havent thought about.
  • Add_polygon seems very slow

    11
    0 Votes
    11 Posts
    776 Views
    D
    thank you very much for the replies dan and Thomthom, I'll take a look at the code Thomthom experimental, to see if I can use some of this code (google translator)
  • [Tutorial] PickHelper - Visual Guide

    34
    0 Votes
    34 Posts
    5k Views
    H
    @unknownuser said: That doesn't produce visual flickering? Nope, at least none that I notice on my Macbook Pro. Even if there was a little, it would be acceptable for the rock solid performance. --J
  • Group.make_unique VS group.name = name

    14
    0 Votes
    14 Posts
    1k Views
    jolranJ
    That would be better for me. I'll try to clean out the rubbish from the script first. BTW, thanks a lot. You are very helpful back soon..
  • Add_arc etc.

    26
    0 Votes
    26 Posts
    4k Views
    thomthomT
    Probably be good to make a wrapper for the add_arc method.
  • Adding groups to an existing group

    3
    0 Votes
    3 Posts
    356 Views
    sdmitchS
    Thanks TIG. I sure there is a logical explination as to why you have to add an instance to the container group and delete the original but seems strange to me. Anyway, using your suggestions, this is the modified code and it works just like I wanted. mod = Sketchup.active_model ent = mod.active_entities sel = mod.selection grpA = ent.add_group; grpA.name="container" tr=Geom;;Transformation.new() for f in ent.grep(Sketchup;;Face) grpB=ent.add_group f; tr=grpB.transformation grpB.name="#{f.bounds.width} X #{f.bounds.height}" grpC=grpA.entities.add_instance(grpB.entities.parent,tr) grpC.name=grpB.name grpB.erase! end puts "grpA contains #{grpA.entities.length} entities"
  • Mouse move handling when dropping

    2
    0 Votes
    2 Posts
    269 Views
    Dan RathbunD
    @algorytmus said: ... except when something is dragged from another application but when moving the mouse (preview drop) over a model (sketchup view) none of those mouse events are fired for me in the Tool implementing class. What is something ??? a SKP file ?? an Image file ?? (1) The application drag-and-drop handler is not directly exposed via the SketchUp API. Instead, native SketchUp tools are activated when VALID objects are dropped: Images: The ScaleTool is activated after the image is inserted, and selected.* SKP file: The MoveTool is activated after the skp is added to the DefintionList, and an instance is inserted and selected. So in both cases, dropping those valid objects, SHOULD cause your tool's deactivate() callback to fire, just prior to the native tool becoming active.
  • Webdialog and input box

    5
    0 Votes
    5 Posts
    500 Views
    A
    You have confirmed my fear that a simple issue compromises what I can do. Unless there is a way to put an image into an input box it looks as if I will have to put the input which has about a dozen data items into the webdialog.I will have to master pushing data back to Ruby from the Webdialog. Thanks
  • [Ruby] Help - Sometimes a group, sometimes not.

    11
    0 Votes
    11 Posts
    946 Views
    T
    Thanks Dan, I'll go check that out.
  • Use of start/commit_operation

    10
    0 Votes
    10 Posts
    746 Views
    J
    Dan and thomthom, thanks for your time and answer.
  • Get list of faces with associated corners

    8
    0 Votes
    8 Posts
    470 Views
    thomthomT
    Another thing to beware of: SketchUp stores ALL units in inches - internal. Always. It is only right when a unit is displayed in the UI that it is converted into the model units. So all coordinate data you get from SketchUp is in the Length class - which is a subclass of Float with extra methods to convert into model units for presentation. Something to beware of when you output the data. More info on units in SketchUp: http://www.thomthom.net/thoughts/2012/08/dealing-with-units-in-sketchup/
  • Set group parent - How to?

    7
    0 Votes
    7 Posts
    604 Views
    T
    Sorry, i was away for a few days. No, i don't have the time at the moment to post code, but i basically goes like this. I'll use Floor 0/ Wall 1/ Window/ Left Window Frame as an example. I have no idea how many volumes will be added to Left Window Frame until i have completed reading the file. This is important because entities.fill_from_mesh erases everything in the entity it is called from. So i create two "parallel" tree structures, one containing the groups (EG:Floor 0/ Wall 1/ Window/ Left Window Frame &Floor 0/ Wall 1/ Window/ Right Window Frame) and another containing the mesh, texture data for each face, other stuff and a "pointer" to the group this is supposed to go in to. When i finished reading all the data i start using it and create and fill each group.entities with the mesh, then i apply the information to the textures. The most timeconsuming in this is, by far, entities.add_group, taking up to a full 0.5 seconds when the number of groups jumps past 1500. I was hoping i could create an empty project with ~2000 empty groups, which i could just juggle around to create the exact tree stucture i need. There is no "stardard" tree structure for any of our projects, a wall might contain none or dozens of windows. I also understood that the c++ sketchup sdk is no longer supported, so we didn't take the risk to invest time in that.

Advertisement