ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
  • Set alpha of a face without material

    7
    0 Votes
    7 Posts
    198 Views
    N
    Oh, okay, this is a nice trick... I think, I will get a lot of problems, when Sketchup crashes... What do you think about this idea: I will create for every face, which has a material != nil a new material => name: face.to_s To show the faces again, I will remove the materials again...
  • API to Open Model Info Dialog?

    5
    0 Votes
    5 Posts
    156 Views
    D
    Thanks Dan, exactly what I needed.
  • Length method returns unexpected value

    9
    0 Votes
    9 Posts
    224 Views
    thomthomT
    On the topic of units in SketchUp: http://www.thomthom.net/thoughts/2012/08/dealing-with-units-in-sketchup/
  • Removing unwanted interior faces from a mesh?

    6
    0 Votes
    6 Posts
    327 Views
    pbacotP
    French fries work for Frank Gehry! [image: DisneyHallOrgan.jpg] I like your array better!
  • Add_edges with a LOT of edges

    11
    0 Votes
    11 Posts
    187 Views
    TIGT
    Yes.... but... Small edges can exist quite happily, it's just using them that is problematical. So if he has completed all changes/processing, then I believe that rescaling the geometry is best, but if further changes are wanted then any [re]scaling needs to be avoided until all processing is done anyway...
  • Using script written in notepad++

    6
    0 Votes
    6 Posts
    209 Views
    TIGT
    Because you haven't given us the slightest clue about how you have structured your script how could we hope to help you There are by now many example scripts around to give you a clue on how to construct one... You speak of 'extension' - have you constructed you tool in two parts ? a loader and a main script in a subfolder? Have you given it a menu.context-menu/toolbar etc... Looks like you have some way to go
  • Installer for Plugins

    14
    0 Votes
    14 Posts
    2k Views
    J
    @dan rathbun said: So this is obsolete for SketchUp ver 8+ ?? No, it still works. I like it better than the built-in installer because it keeps a list of installed files - which lets me see exactly what was installed and where in case I want to delete it. It's here: https://sites.google.com/site/jimfoltz/plugins-lab/installer But I could put it on dvcs, if interested.
  • Intersect ray and circle in 3D?

    14
    0 Votes
    14 Posts
    3k Views
    AdamBA
    The best optimization, is to avoid doing work at all. Work on your algorithm first. (C++ is a superset of C) Here's some numbers I've simply plucked out of thin air: Invoking a C++ method from Ruby costs 500+ instructions. If the work you do in the method is less than this (calc distance = ~10 instructions), the cost of invocation swamps the cost of evaluation. Adam
  • Webdialog on Mac

    2
    0 Votes
    2 Posts
    67 Views
    thomthomT
    It's not modal, no. It makes the window stay on top of the SketchUp windw (which is what Windows does in all cases.) For my CleanUp plugin I worked around it by creating a tool where I hooked up the deactivate event to close the dialog. That also captures the mouse events so users can't click randomly in the model and change it while the tool and dialog is active. On SU8+ I also draw a semi-transparent polygon over the whole viewport to dim it. Source code for the tool wrapper is here: https://bitbucket.org/thomthom/tt-library-2/src/5ec87b0647c953c397b605922f31d5dbe21ad548/TT_Lib2/modal_wrapper.rb?at=Version%202.7.0
  • Force a redraw after a value is entered in the vcb?

    2
    0 Votes
    2 Posts
    227 Views
    TIGT
    A selection-observer to see if it contains DC instance[s] ? A tools-observer to see if Scale in active && @check1 gives you @check2 ?? Now an entities-observer if @check2 looking at the DC[s] looks for any changes, gives check3 ??? If @check3 then call something like: <span class="syntaxdefault">def dc_redraw</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">ent</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> pbar_visible</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">true</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> undo</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">false</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    ldc</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">$dc_observers</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">get_latest_class</span><span class="syntaxkeyword">()<br /></span><span class="syntaxdefault">    if undo<br />        ldc</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">method</span><span class="syntaxkeyword">(;</span><span class="syntaxdefault">redraw_with_undo</span><span class="syntaxkeyword">).</span><span class="syntaxdefault">call</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">ent</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> pbar_visible</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    else<br />        ldc</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">determine_movetool_behaviors</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">ent</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        DCProgressBar</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">clear</span><span class="syntaxkeyword">()<br /></span><span class="syntaxdefault">        ldc</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">method</span><span class="syntaxkeyword">(;</span><span class="syntaxdefault">redraw</span><span class="syntaxkeyword">).</span><span class="syntaxdefault">call</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">ent</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> pbar_visible</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">        DCProgressBar</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">clear</span><span class="syntaxkeyword">()<br /></span><span class="syntaxdefault">        ldc</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">refresh_dialogs</span><span class="syntaxkeyword">()<br /></span><span class="syntaxdefault">    end<br />    </span><span class="syntaxkeyword">@</span><span class="syntaxdefault">view</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">refresh<br />    rescue TypeError </span><span class="syntaxkeyword">=></span><span class="syntaxdefault"> e<br />    </span><span class="syntaxcomment"># suppress nil to float conversion error that happens<br /></span><span class="syntaxdefault">    </span><span class="syntaxcomment"># when redraw is called directly with true 2nd arg ?<br /></span><span class="syntaxdefault">end</span><span class="syntaxcomment">#def<br />### so it&nbsp;is&nbsp;NOT; $dc_observers.get_latest_class.redraw_with_undo(dc)<br />### it's; self.dc_redraw(dc, true, false)&nbsp;</span><span class="syntaxdefault"></span>
  • [JS] Global variables

    3
    0 Votes
    3 Posts
    189 Views
    jolranJ
    Thank you Thomthom. I think you answered all my questions. @unknownuser said: All is restricted to the scope of the HTML page loaded This was my main concern. I don't want to pollute other people's plugins if I create a global var. @unknownuser said: Namespacing is still good when you want to use other libraries, you then want to ensure you do not conflict. Ah, I think I understand now. Like if you create a Jquery plugin for public release, for ex? @unknownuser said: But as of TT_Lib, which is a library I have namespaced it because it's mean to be used in different environments. A, yeah. I forgot for a minute it was a library when I was pooking around. Your library is a very useful resource for me, since you are using Jquery .
  • Rbs weird behaviour on modules

    4
    0 Votes
    4 Posts
    70 Views
    S
    Ok, thanks for the workaround. You should expect that no mather you use rb's or rbs's, they behave the same way...
  • Boolean operations

    20
    0 Votes
    20 Posts
    11k Views
    cottyC
    @gonashvili said: actually no Hey, nobody knows everything, thats why I'm on here Then you are right here...
  • ENV['COMPUTERNAME'] for Mac?

    16
    0 Votes
    16 Posts
    2k Views
    D
    @honkinberry said: Jim is correct! hostname does indeed work. but that returns the same on all 5 macs on my network, so for a Licence management usage it seems a bit pointless? If you only need to know if it's a mac or not there are many simple ways to get that... glad your happy john
  • Questions about realization of tools

    20
    0 Votes
    20 Posts
    370 Views
    D
    is true, on several occasions have been very frustrating these examples [image: Bgt9_computadoragolpes.gif]
  • (Webdialog) Window match clientsize.

    19
    0 Votes
    19 Posts
    418 Views
    D
    @jolran said: Sounds really advanced. Responsive window. it's a prototype that seems to work on my mac, might find an excuse to finish it one day. john
  • Help with transformation

    14
    0 Votes
    14 Posts
    343 Views
    D
    Posted the first vertion of the importer at http://sketchucation.com/forums/viewtopic.php?f=323&t=50067
  • Exporting solids &amp; reversed faces

    5
    0 Votes
    5 Posts
    114 Views
    N
    No, just lines and using methods like Geom::intersect_line_plane and then checking weather the intersection lies withing the face itself. It's complicated and error prone (When lines intersect edges instead of faces) but can be made to work.
  • Empty groups get deleted?!

    19
    0 Votes
    19 Posts
    533 Views
    Chris FullmerC
    @niccah said: The user would like to create a project => so, somewhere I have to save this information about the projects (name, options, etc, ..). And the user could create a project and close Sketchup => so, the information about the new project has to be saved somewhere "for ever". Use an attribute dictionary to attach information to the model. It will stay with it after the model is closed and opened. Single Dictionatires http://www.sketchup.com/intl/en/developer/docs/ourdoc/attributedictionary Collections of multiple dictionaries http://www.sketchup.com/intl/en/developer/docs/ourdoc/attributedictionaries This is a much more stable way to maintain data in the model from session to session. Chris
  • SKP write thumbnail. SIZE?

    7
    0 Votes
    7 Posts
    372 Views
    jolranJ
    Maybe not for this part. I already have a folder with components. But your code might be very useful for a different projekt I have. This code would have to run each time to see if the user has added new components, when launching the webdialog. And add thumbs to the list. I already had it working before with 128 px X 64 px, but it would be nice to be able to set the thumbs proportions. As of now I'm clipping the image in CSS with 2 divs. Never mind how I'm doing it BTW.. The main point is that I may not be able to support IE7 with several imagehacks. BTW a side question: Trying to stay "Sketchup like" with the dialog. Could there be any copyright issues, mimicing Sketchup GUI interface?

Advertisement