ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Download files with a SketchUp plugin

    47
    0 Votes
    47 Posts
    7k Views
    R
    Is there a Windows build in sight?
  • Map texture onto non-planar "quad"

    10
    0 Votes
    10 Posts
    383 Views
    Chris FullmerC
    @adamb said: Also tried Chris Fullmer's shape blender but it ignores UVs Yeah, sorry Adam. I don't actually do a lot of rendering or texturing, so I'm not really a UV person yet. In theory I'll be re-writing shapebender someday to account for UV's. I'm sure you guys are excited thinking about that headache - everyday 20 new noob questions from me about textures
  • .SKP File Structure

    3
    0 Votes
    3 Posts
    736 Views
    tbdT
    which is not support that much anymore. and needs MS COM mumbo jumbo to work
  • UI.start_timer() is the new while

    3
    0 Votes
    3 Posts
    268 Views
    J
    I've experimented with using start_timer, and changing the time and/or partition size on the fly. It just gets far too slow to be worthwhile. http://forums.sketchucation.com/viewtopic.php?f=180&t=27092&p=234026#p234026 Using an Animation class instead of a timer may be easier to code, but I'd guess the result would be similar.
  • Componant axes

    7
    0 Votes
    7 Posts
    278 Views
    C
    Thanks a lot for your answer, Mayby i'm wrong, but i believe, you misunderstand me. so i show you what i've programmed: ` driller= Sketchup.active_model.definitions.load("\driller.skp") pos_driller = Geom::Point3d.new 47,32,25 set_driller= Geom::Transformation.new pos_driller instance1 = entities.add_instance driller, set_driller cuboid_wood = Sketchup.active_model.definitions.load("\Cuboid_wood.skp") pos_cuboid = Geom::Point3d.new 0,0,0 set_cuboid = Geom::Transformation.new pos_cuboid instance2 = entities.add_instance cuboid_wood, set_cuboid` but this is hardcoded and i want that the computer places the objects correctly together automatically,by calculating the best position, but i can't calculate the size of these objects, because i don't know how. (i would have to measure the size with the measure-tool in SU with the mouse, but it should retrieve the values with a method) I have the task to do that with many components, that's why i wouldn't say the detailed coordinates for every components, which i load. the programm should be able to load componentes, put it together correctly and dynamically, take some photos in different perspectives, save these pictures, clear it all and start at the beginning with other components ... everthing is quite clear to me, with the exception of the hardcoded coordinates of these objects P.S. i have wrote this problem in a new topic too
  • Add_faces_from_mesh returns what ?

    3
    0 Votes
    3 Posts
    239 Views
    Didier BurD
    Thanks ThomThom, Here is what I planned to do: nEntsBefore=Sketchup.active_model.entities.length Sketchup.active_model.entities.add_faces_from_mesh(m) nEntsAfter=Sketchup.active_model.entities.length arrayOfNewFaces=[] nEntsBefore.upto(nEntsAfter-1) { |i| next if ent=Sketchup.active_model.entities[i]; arrayOfNewFaces.push(ent) } Your code is mush more simple than mine
  • Bad character in texture file name

    7
    0 Votes
    7 Posts
    191 Views
    TIGT
    Just trap for any non-standard characters and replace them with _ It's done all of the time in things like OBJ exporters...
  • Select all in layer

    4
    0 Votes
    4 Posts
    610 Views
    thomthomT
    @tig said: comparing strings is probably slower It is. Much slower! At all times avoid string comparisons if possible.
  • Merging two co-linear edges

    6
    0 Votes
    6 Posts
    1k Views
    thomthomT
    Yea, erasing the zero length edge would make a gap between adjacent edges. ...I think... might need to verify that again.
  • TypeError: can't convert into Array

    15
    0 Votes
    15 Posts
    364 Views
    Dan RathbunD
    @thomthom said: So it appears what happens is not that f.to_a is called, but instead Array.new( f ) - and Array.new uses .to_ary . Actually (if you use the CHM Ruby refdoc,) the source shows that the #| method explicitly calls: %(#0000BF)[arg2 = to_ary(arg2);] ie, it makes a copy of the second arg to use locally (within its body.)
  • Localhost in webdialog - bridge to everywhere?

    8
    0 Votes
    8 Posts
    768 Views
    chrisglasierC
    Now I have got to the stage where I can pop my freestanding php file into a web dialog but so I can run Sketchup either via my localhost or website I need to have a ruby version of this php: class IP{ public function Iptrue() { if ($_SERVER['REMOTE_ADDR'] == "127.0.0.1"){ echo true; } } } Can this be done with Sketchup ruby API? Thanks Thanks
  • Snapto or glueto with 2 faces

    10
    0 Votes
    10 Posts
    296 Views
    TIGT
    Robin Please reread my post you have to set the definition's is2d= AND its snapto=... and then the instance's glue_to= ... If you are loading a premade component ten why not give that the correct behaviors so you needed worry about reinventing them each time? and then you just need to place the component onto the face and tell it to glue_to it! You should add the instance with a transformation, OR Geom::Transformation.new() and then later transform it so that it's located on the face to which you want to glue it - it's z-axis needs to be parallel to the face.normal and it's origin somewhere on the face... It will not magically 'jump' onto the face - you need to code that. There after it will stick onto the face's plane like any other glued component, and move with the face too...
  • Ruby slowdown

    7
    0 Votes
    7 Posts
    393 Views
    thomthomT
    @tig said: Printing to the console will slow things greatly... That's a good pointer - if you use the Ruby Console to debug then the more you output the more it slows down. I use a small snippet that uses the Win32 API to clear the content of the console in order to keep it responsive. I also use Win32 to output data to DebugView.
  • Adding more plugins to submenu?

    8
    0 Votes
    8 Posts
    326 Views
    S
    Dan, Thanks I finally got it to work using the code you provided. Derek
  • Merge groups

    3
    0 Votes
    3 Posts
    375 Views
    C
    TIG thank you very much.
  • Make Layer0 Plugin

    4
    0 Votes
    4 Posts
    165 Views
    C
    This is awesome and exactly what i was looking for, thanks a lot!
  • [Request]is there have a plugin can do like this?

    7
    0 Votes
    7 Posts
    235 Views
    TIGT
    It's 'newer' NOT 'new'! It's been around for a while... Look for it in the 'Plugins Index' lists... 'LatticeMaker' works on premade meshes - it has a sibling in the Extrusion Tools tool 'EEbyRailsToLattice' that takes curves and makes the 'mesh-grid', and if option is selected it also frames/panes it...
  • Show webdialog quicker?

    24
    0 Votes
    24 Posts
    460 Views
    thomthomT
    @chris fullmer said: Interesting, I would have just put it as modal for both. Modal just means it stays on top of all windows? No - in the Windows world it means that the child window blocks any interaction in the parent window while it is open. It also means that .show_modal doesn't return until the webdialog is closed. (Like UI.inputbox - where you continue with the code after you prompted the user.) But it's under OSX where the scheme suddenly change. Not use if it's a platform quick, or just an SU OSX quirk, but suddenly the window does not stay on top when using .show and .show_modal means "stay on top of parent" instead of actually being modal. It's an annoying difference as the behaviour displayed under OSX does not correspond to what the method name implies. http://en.wikipedia.org/wiki/Modal_window
  • Disable_ui

    6
    0 Votes
    6 Posts
    226 Views
    thomthomT
    In SU6 you will not find any way to disable the UI from updating that gives any performance boost that is worth the optimisation effort. If you want to cut down the time, look at the Ruby code itself - find ways to make it faster. (See if there are places where a Hash can be used instead of an Array if you are doing lots of lookups, when manipulation selection and entities - use bulk methods that modifies many instead of single elements.)
  • Question about palettes

    22
    0 Votes
    22 Posts
    2k Views
    CadFatherC
    yes, maybe i'm better at it after a few guinness... meantime here's the result - i don't have a mac so do not know whether it works there. only thing is that upon reopening, the windows always dock at the bottom of the stack.. Cheers

Advertisement