⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

Alkategóriák

  • No decscription available

    20 Témakörök
    462 Hozzászólások
    HornOxxH
    @pilou said: More appetizing in chocolate! Eggs are good as well - but only very fragile when falling down in SketchyPhysics
  • Add_edges with a LOT of edges

    11
    0 Szavazatok
    11 Hozzászólások
    682 Megtekintések
    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 Szavazatok
    6 Hozzászólások
    450 Megtekintések
    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 Szavazatok
    14 Hozzászólások
    2k Megtekintések
    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 Szavazatok
    14 Hozzászólások
    3k Megtekintések
    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 Szavazatok
    2 Hozzászólások
    179 Megtekintések
    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 Szavazatok
    2 Hozzászólások
    365 Megtekintések
    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 Szavazatok
    3 Hozzászólások
    329 Megtekintések
    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 Szavazatok
    4 Hozzászólások
    300 Megtekintések
    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 Szavazatok
    20 Hozzászólások
    12k Megtekintések
    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 Szavazatok
    16 Hozzászólások
    3k Megtekintések
    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 Szavazatok
    20 Hozzászólások
    1k Megtekintések
    D
    is true, on several occasions have been very frustrating these examples [image: error]
  • (Webdialog) Window match clientsize.

    19
    0 Szavazatok
    19 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    14 Hozzászólások
    1k Megtekintések
    D
    Posted the first vertion of the importer at http://sketchucation.com/forums/viewtopic.php?f=323&t=50067
  • Exporting solids & reversed faces

    5
    0 Szavazatok
    5 Hozzászólások
    396 Megtekintések
    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 Szavazatok
    19 Hozzászólások
    1k Megtekintések
    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 Szavazatok
    7 Hozzászólások
    708 Megtekintések
    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?
  • ( [ 0,0,0 ].vector_to( [ 0,0,0 ] ) ).length.mm < 0.01.mm

    6
    0 Szavazatok
    6 Hozzászólások
    350 Megtekintések
    D
    Very informative site in did. Thank you. I am a hardware engineer by training - so I know this problem from the other side and still it is a little strange
  • Rounding numbers

    7
    0 Szavazatok
    7 Hozzászólások
    706 Megtekintések
    thomthomT
    @genma saotome said: Seems like updating the version of ruby used for Sketchup would he most helpful. Any reason for Trimble to do that as a routine step or is this one of those don't fix it if it ain't broke situations? They've tried earlier, but it was troublesome. However, from the talks at Basecamp it did appear they are again looking to update the Ruby core.
  • My first script

    3
    0 Szavazatok
    3 Hozzászólások
    509 Megtekintések
    thomthomT
    To get input data from the mouse you got either InputPoint class or PickHelper. It depends what you are looking for. InputPoint gives you inferences is is similar to what for instance the Line tool uses. PickHelper is more for being abel to select Entities. Either way, You want to oolk into the Tool class. As for units which jolran mentioned, I got an overview of how to deal with units in SU here: http://www.thomthom.net/thoughts/2012/08/dealing-with-units-in-sketchup/ You basically should not do so much work with it. Keep everything in inches, the internal units, preferable in the Length class and let SU do the work of converting back and forth between internal units and model units.
  • Add items to submenu later on

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    The two main problems we have: (1) Menu object references on the C++ side are garbage collected quite quickly, and the references on the Ruby-side become invalid. We can live with having to recall UI.menu() to get new valid references to the 9 top level menus, but ... (2) the menu#add_submenu method should return a new valid reference to the submenu IF IT ALREADY EXISTS, or create the submenu if it does not. Currently it just creates a duplicate submenu. I am sure that this issue has already been logged. I so much hope that SketchUp v2013 will fix this (if no more updates to v8 will be released.) So.. for now... once the startup cycle is complete, we cannot add items to ANY of the previously created submenus.

Advertisement