sketchucation logo sketchucation
    • Login
    1. Home
    2. Pixero
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 1
    • Topics 291
    • Posts 2,394
    • Groups 4

    Posts

    Recent Best Controversial
    • RE: Keycode with onKeyUp question

      Thanks! I'll try that.

      posted in Developers' Forum
      PixeroP
      Pixero
    • Keycode with onKeyUp question

      I'm trying to use the arrowkeys to move an object in a ruby script.
      I've found the onKeyUp info in the docs but my initial question is what keycode the arrow keys have?
      While googling IΒ΄ve found both: 103, 105, 106, 108 and 200, 203, 205, 208. Which is it?
      Or can I use up, left, right, down or uparrow, leftarrow, rightarrow, downarrow?
      Thanks in advance!

      posted in Developers' Forum
      PixeroP
      Pixero
    • RE: Align points

      Thanks Azuby, I didnt know that. But I am a noob on Ruby. πŸ˜‰
      I've never seen it in the ruby docs though. Since I've seen both @ and $ used, I assumed you could use either.
      In my noobiness I though the @ came from @-atlast. 😳

      Rick W, thanks I tried it but it still doesnt work. Could you please take a look at my script to see where I go wrong?
      Maybe try my script with a rectangle and set Align to custom and some custom value.


      jsAlign.zip

      posted in Developers' Forum
      PixeroP
      Pixero
    • Align points

      Hi all!
      I'm trying to make a align script for points. I think it could be useful to correct none planar lines and more...
      It works fine for lines but with faces it makes them triangulated (by autofold) since it moves each point individually.
      Since I'm a noob to ruby I now need help figuring out how to auto delete all the edges created by autofold.

      Here's what I've tried. But doesn't work:

      class AutofoldWatch < Sketchup;;EntitiesObserver
      	def onElementAdded(element)
      		autofoldEdges = []; ### Gather all new edges in an array
      		if element.typename == "Edge" and element.valid?
      			autofoldEdges.push(element)
      		end#if
      		return autofoldEdges;
      	end#def
      end
      

      And just before the action happens:

      Sketchup.active_model.entities.add_observer(AutofoldWatch.new) ###Observer added
      
      

      And last in the script I'm trying to remove the new edges in the "autofoldEdges" array:

      autofoldEdges.erase! ###Erase edges created by autofold
      Sketchup.active_model.entities.remove_observer AutofoldWatch ###Observer removed
      
      posted in Developers' Forum
      PixeroP
      Pixero
    • RE: Working with selection - ungrouped or within a group

      I'll try to explain what I'm after.
      Is it possible to make a script work with either the edges/faces in a selected group or the ungrouped edges/faces if there is no group?
      I don't mean at the same time, but to recoginize if the selection is a group or not and be able to work either way.

      If not, I guess I'll have to make two scripts, one for groups and one without.

      posted in Developers' Forum
      PixeroP
      Pixero
    • Working with selection - ungrouped or within a group

      (Posted this at the SketchUp forum but since its dissapearing I'd thought I'd post it here also)

      If I want a script to work with a selection of either ungrouped objects or within a group.
      Could something like this work?

      if selection.typename == "Group" { entities=group.entities }
      else { entities=model.active_entities }

      posted in Developers' Forum
      PixeroP
      Pixero
    • RE: Adding Interactive SketchUp Models to PowerPoint Presention

      I have tried it repeatedly but it keeps loading the applet forever...? πŸ˜•

      posted in SketchUp Discussions
      PixeroP
      Pixero
    • RE: So what do you think about the SCF?

      Coen, I like it better with the avatar and personal info to the left.
      We read from left to right and I believe its better to see who has posted before reading the post. IMHO.

      posted in SketchUp Discussions
      PixeroP
      Pixero
    • RE: My ruby's

      Two more scripts added.

      JS Shadow Threshold
      Set the threshold for when a transparent object will cast shadows.
      Works on either entire model or a selection.

      JS Shadow Control
      Set if a selection should cast or receive shadows.

      Get them at my site: http://www.pixero.com

      Enjoy! πŸ˜„

      Jan

      posted in Plugins
      PixeroP
      Pixero
    • RE: My ruby's

      Just a thought... are you extruding in a direction that is possible?
      (I mean not in 90 degrees from the surface normal.)
      And of cause you'll have to click ok.
      Other than that I dont know. Are you on Mac or Windows?

      And Coen, I want people to come to my site to download.

      posted in Plugins
      PixeroP
      Pixero
    • RE: My ruby's

      I've updated JS Align so it works with groups/components as well.
      If using custom value with groups, also use the Align groups: Max, Min or Center.

      Enjoy! πŸ˜„

      posted in Plugins
      PixeroP
      Pixero
    • My ruby's

      Here are three ruby scripts that I've written. Thanks to those who have helped me learn.

      JS MoveTool

      Description: Moves a selection with the arrow keys.
      Usage:

      1. Select a object or group of objects.
      2. Select the JS MoveTool and enter a distance in the VCB. Press Return/Enter.
      3. Now move with arrow keys.
      4. Use Alt + Up/Down to move in Z axis.
      5. You can enter a new distance at any time.

      Hopefully it will work on both Windows and OSX.
      Assign it to a shortcut hot key. For example Alt+M.

      JS Extrude (based on the Push Pull Z script by Didier Bur)

      Description : Extrudes a face/faces along either X, Y or Z axis or the normal direction.
      Usage : Select a face, select JS Extrude from the Plugins menu, choose direction, enter distance and here you go.

      JS Align

      Description: Use for aligning/flattening edges.
      Issues:

      1. If used on faces they will be triagulated.
        Since the script moves each vertice at a time,
        SketchUp's autofold feature will trangulate all non planar faces.
        I've tried to find a way of auto erasing all edges created by autofold but havens succeded.
        If you know how to fix it please let me know.
      2. The script doesnt work well with faces inside groups/components.

      Get them at my site: http://www.pixero.com

      Enjoy! πŸ˜„

      posted in Plugins
      PixeroP
      Pixero
    • RE: [Plugin] zoom_selection.rb

      I made a zoom selection a while ago. Even simpler.
      You can find it under downloads at my site.
      http://www.pixero.com

      posted in Plugins
      PixeroP
      Pixero
    • RE: Send a message to Google: Hire CraigD now!

      Done.

      Pixero

      posted in SketchUp Discussions
      PixeroP
      Pixero
    • 1 / 1