ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Fit_plane_to_points problem

    9
    0 Votes
    9 Posts
    438 Views
    D
    I did not understand point.offset, with this example I understand a little more, thank you very much Thom, very interesting this
  • Query: Edge transparency

    8
    0 Votes
    8 Posts
    262 Views
    thomthomT
    Not is you want to use the native Select tool. But if you want to avoid observers and gain more control over your plugin's environment you could make your own tool.
  • Calculations on its own thread

    9
    0 Votes
    9 Posts
    562 Views
    T
    Everything I have tried in attempting to use Thread in SketchUp has failed miserably. This works for me: timer = UI.start_timer(1.0,true) { start = Time now loop do break if Time.now-start > 0.8 ... long computation involving many loops ... end } ... call stop_timer(timer) when appropriate, perhaps from within the loop My computation is copying a file to a WebDialog; the file is output from another process, and can grow over time to be quite large. This code updates the WebDialog once per second, and permits the "Kill" button (in another WebDialog) to work. Each loop reads 1024 bytes from the file and uses WebDialog#execute_script to append it to a textarea (escape \n and " to keep the JavaScript valid); it handles multiple reads at EOF as the file can grow.
  • Forcing a Screen Update during a Ruby script

    11
    0 Votes
    11 Posts
    1k Views
    thomthomT
    This is the reason the Animation class is there for: http://www.sketchup.com/intl/en/developer/docs/ourdoc/animation.php
  • Virtually Test the Fit of Bolt and Screw Hole

    2
    0 Votes
    2 Posts
    253 Views
    gillesG
    Make the bolt a group or better a component, edit it and use tape tool to scale it to fit. http://support.google.com/sketchup/bin/answer.py?hl=en&answer=116447&topic=2458211&ctx=topic [image: vy36_bolt.jpg]
  • SU 2013 not allowing SU 8 to run plugins!

    10
    0 Votes
    10 Posts
    493 Views
    Chris FullmerC
    Great, thanks for the update!
  • Draw cpoint on face

    5
    0 Votes
    5 Posts
    275 Views
    liquid98L
    TIG, Thanx for your answer, it completely elucidates my question.
  • Non-symmetric camera frustum?

    2
    0 Votes
    2 Posts
    549 Views
    TIGT
    As far as I know the FOV frustrum is always symmetrical. Good luck in you endeavors...
  • Navigation Buttons on Mac

    3
    0 Votes
    3 Posts
    168 Views
    H
    so as a consequence, there is no chance to set a own adress for the home-button? To create it as a part of html isnt possible in my case .. its a portal which references to a lot of differet homepages and i can't change them .. and a test with own buttons and an iframe destroyed the possibility to get information from the website to sketchup...
  • RBZ and Components library

    5
    0 Votes
    5 Posts
    335 Views
    danielbowringD
    @driven said: for a mac you can create a symbolic link the will show the skps in the 'Components Browser' lnk_skps = %x(ln -s "#{Sketchup.find_support_file("Plugins") << "/your_folder/your_skps"}" "#{Sketchup.find_support_file('Components')}" 2>&1) is there not a windows equivalent? john For Vista and higher: mklink /D LinkName TargetPath XP "supports" a similar feature called junction points, but I don't think it's available by default. For XP: links LinkName TargetPath For Vista and higher: mklink \J LinkName TargetPath
  • Newbie question

    3
    0 Votes
    3 Posts
    175 Views
    TIGT
    Because SketchUp's circles are in reality finely faceted polygons the real-intersection of two arcs' circumferences is unlikely to be exactly on those arcs' edges, unless by coincidence it turns out to be at one of the arc's edge's vertices. Conversely the actual-intersection of those arcs' edges is unlikely to fall exactly on the arcs' circumferences, unless by coincidence it's at a vertex of those arcs' edges... My TrueTangent tools contain a number of algorithms to find circles/arcs' true tangents, true intersection points etc... Perhaps these will help you find what you need...
  • Sine Law?

    9
    0 Votes
    9 Posts
    630 Views
    T
    @tig said: So ac=**63.0** and then in the equation ad = Math.asin(db * Math.sin(ac**.degrees**) / dc).radians Now 'ad' is in degrees again, so when you Math equation processes it uses ad.degrees I was not confused between degrees and radians. Its the same way angles are treated in many languages, I'm quite familiar having written AutoLisp routines years ago, which also uses degrees and radians. Its more about me learning how to write the same code in Ruby .........I finally see in your example how .degrees gets added, its really simple once I saw your example.
  • Need a SU Tap &amp; Die plugin

    12
    0 Votes
    12 Posts
    508 Views
    M
    http://sketchup.google.com/3dwarehouse/details?mid=db27537086288b21706627b112998eff This is a small model built with some code to make it usable for sketchy physics (and perhaps 3d printing). Does anyone know how this would print on a makerbot? http://youtu.be/dqyyQF9gZeM or by just modeling with some pretty bizarre music http://youtu.be/MKrWDNDd62c
  • Concatenate a string and an integer?

    4
    0 Votes
    4 Posts
    564 Views
    thomthomT
    @aerilius said: There are many ways to create strings: string concatenation: 90.to_s + " degrees" # slow because it creates a new third string object string appending: 90.to_s << " degrees" # faster because it adds the second string into the first string interpolation: "#{90} degrees" Note that string interpolation is the fastest. (And reads easier IMO)
  • Visibility in Group/Component editing

    7
    0 Votes
    7 Posts
    381 Views
    thomthomT
    Ah, ok now I understand. Yes, then Model.active_path is what you need. And checking if Hide Rest of Model or Hide Similar Components is enabled.
  • Why is 2013 breaking this plugin?

    4
    0 Votes
    4 Posts
    328 Views
    thomthomT
    What is breaking? What is expected behaviour?
  • Want to learn &quot;view.draw2d&quot;...is there any basic examples?

    10
    0 Votes
    10 Posts
    432 Views
    thomthomT
    @renderiza said: Want to learn using "view.draw2d" and was wondering if there is a very basic example code I can use for learning. It has to be used within a Tool. You invalidate the viewport when something needs to be drawn. And the method then simply accept a set of 2d points (defined by Geom::Point3d)
  • Ruby plugin to standalone application

    6
    0 Votes
    6 Posts
    401 Views
    thomthomT
    @prototype said: I thought that I had to put it in the Sketchup shortcut target field "C:\Program Files\SketchUp\SketchUp 2013\SketchUp.exe" http://www.thomthom.net/thoughts/2013/04/sketchup-command-arguments/
  • Drawing a ray or line from a vector

    3
    0 Votes
    3 Posts
    418 Views
    TIGT
    A vector defines a 'direction', which essentially is not determined in its location in space. To define an 'edge' you need a start point - let's call it 'point1'... Then set your vector's length using: vector.length=length and find 'point2' for the end point: point2=point1.offset(vector) Now you have two points representing the start/end-points of a potential new edge. Use Sketchup.active_model.active_entities.add_line(point1, point2) or Sketchup.active_model.active_entities.add_edges([point1, point2]) Don't confuse edge & line - confusing the API does when adding one edge it calls it a 'line'! Actually a 'line' is a special geometrical construct of [point, vector], which us infinitely long passing through the point, along the vector. Lines can intersect etc...
  • Displaying the Normal of a Polygon

    4
    0 Votes
    4 Posts
    153 Views
    J
    Thanks guys thats what I needed.

Advertisement