🚨 Skimp | 25% Off until March 30 Buy Now

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
  • Cleanup Old Plugin Versions?

    10
    0 Szavazatok
    10 Hozzászólások
    963 Megtekintések
    TIGT
    If you read the code it never said that. It said: self.delete_folder(File.join(File.dirname(File.dirname(__FILE__)), 'K2WS'))Assuming that the rb doing the deletion is in the K2WS_Comp2LayerScene_ext subfolder. The path finds the dirname of its folder and then the dirname of that folder's folder - which should typically be Plugins...
  • WebDialog vs. Win7/IE10 problem

    9
    0 Szavazatok
    9 Hozzászólások
    696 Megtekintések
    thomthomT
    Yes, modal webdialogs under Windows are working as modal windows should. For some odd reason it's not working as a modal window under OSX.
  • Game running half the speed in SU 2013 vs SU 8

    27
    0 Szavazatok
    27 Hozzászólások
    1k Megtekintések
    A
    @renderiza said: SketchUp 8 runs little bit faster still but not by much...I will study ways of optimizing code to make it faster but as is right now it is playable. Sounds great, I will be the tester @chris fullmer said: Awesome, glad its improved! Thanks for working that into his code Anton, great! It was interesting, I never actually knew that setting the second parameter of model.start_operation to true would actually improve the performance. That is an important parameter to know, especially when your dealing with geometry plugins.
  • Find Group name

    6
    0 Szavazatok
    6 Hozzászólások
    473 Megtekintések
    H
    I find a way. # {Ecken von ausgewaehlten Elementen ermitteln() # def ecken_ermitteln model = Sketchup.active_model entities = model.active_entities auswahl = model.selection context = auswahl.first MoMo;;g_name = context.name MoMo;;teile = entities.add_group auswahl model.selection.add(MoMo;;teile) auswahl = model.selection e = auswahl.at(0) bounds_a = e.bounds MoMo;;x_mass = bounds_a.width MoMo;;y_mass = bounds_a.height MoMo;;z_mass = bounds_a.depth MoMo;;i_li = bounds_a.corner(2)[0] if MoMo;;tuer_c_o_li == 0 MoMo;;i_re = bounds_a.corner(3)[0] if MoMo;;tuer_c_o_re == 0 # corner(n) = # 0 = [0, 0, 0] (left front bottom) # 1 = [1, 0, 0] (right front bottom) # 2 = [0, 1, 0] (left back bottom) # 3 = [1, 1, 0] (right back bottom) # 4 = [0, 0, 1] (left front top) # 5 = [1, 0, 1] (right front top) # 6 = [0, 1, 1] (left back top) # 7 = [1, 1, 1] (right back top) end # {S-Tuer oeffnen/schliessen() # def schiebetuer_open_close_li_gen model = Sketchup.active_model entities = model.active_entities status = ecken_ermitteln # siehe oben if MoMo;;g_name == 'Schiebetuer_li' x2 = MoMo;;x_mass / 3 * 2 x1 = x2 if MoMo;;tuer_c_o_li == 0 x1 = -x2 if MoMo;;tuer_c_o_li == 1 a1 = 0 if MoMo;;tuer_c_o_li == 0 a2 = 1 if MoMo;;tuer_c_o_li == 1 t1 = Geom;;Transformation.translation [x1,0,0] entities.transform_entities t1, MoMo;;teile MoMo;;tuer_c_o_li = 1 if a1 == 0 MoMo;;tuer_c_o_li = 0 if a2 == 1 else UI.messagebox 'Es wurde eine falsche Tuer ausgewaehlt.' end status = MoMo;;teile.explode end def schiebetuer_open_close_re_gen model = Sketchup.active_model entities = model.active_entities status = ecken_ermitteln # siehe oben if MoMo;;g_name == 'Schiebetuer_re' x2 = MoMo;;x_mass / 3 * 2 x1 = -x2 if MoMo;;tuer_c_o_re == 0 x1 = x2 if MoMo;;tuer_c_o_re == 1 a1 = 0 if MoMo;;tuer_c_o_re == 0 a2 = 1 if MoMo;;tuer_c_o_re == 1 t1 = Geom;;Transformation.translation [x1,0,0] entities.transform_entities t1, MoMo;;teile MoMo;;tuer_c_o_re = 1 if a1 == 0 MoMo;;tuer_c_o_re = 0 if a2 == 1 else UI.messagebox 'Es wurde eine falsche Tuer ausgewaehlt.' end status = MoMo;;teile.explode end
  • Sound Effecs in SketchUp (HELP)

    31
    0 Szavazatok
    31 Hozzászólások
    7k Megtekintések
    renderizaR
    Hi, Its been long time since I talked about this but I want to share some new information regarding sound. My initial goal was to trigger same sound simultaneously and have the ability to overlap sounds without any cutoffs or lag. Just recently I learned how to make use of HTML5 by adding a the following line on web-dialog <meta http-equiv="X-UA-Compatible" content="IE=10"> and this has opened a lot of possibilities with sound. Here is a technique that will enable multiple sounds... On HTML <audio src="sound.mp3" id="snd_test1" preload> On Javascript document.getElementById("snd_test1").cloneNode(true).play() Note: The above line of code is used every time you want to trigger sound. Also for me the only type of sound extension that is working is mp3...I have tested .swf and .wav so far. If anyone has any new info about sound and SketchUp please post it here...Cheers!
  • How to check syntax without executing

    8
    0 Szavazatok
    8 Hozzászólások
    645 Megtekintések
    thomthomT
    catch was supposed to be rescue in my snippet. I was language confused. :s
  • The Naming of Groups (API issues)

    11
    0 Szavazatok
    11 Hozzászólások
    1k Megtekintések
    fredo6F
    @richmorin said: @jolran said: Hope this can help you (although it's related to modifying geometry in groups): http://sketchucation.com/forums/viewtopic.php?f=180&t=52014&view=unread#p470425 Yes, that was very interesting. Thanks for the pointer (though it didn't make me feel any better about the situation): "It's worse than that — he's dead, Jim!" Sigh. -r Groups should be unique and not treated as components with multiple instances when freshly copied. This is causing so much trouble for scripts! and probably the source of numerous crashes. Regarding group names, I think the SU implementation is that the name is just an attribute. The identification is done internally based on Ids of the underlying definitions. If we wanted that all groups are created with a unique name, then I am afraid that this is a request for the SU team to modify the core. Of course, a script that will make all name unique can be written, but you would have to run it every time you create a new group. Fredo
  • Possible or Impossible? (or post your favourite jQuery..)

    20
    0 Szavazatok
    20 Hozzászólások
    987 Megtekintések
    thomthomT
    best_picked - or best_face if you want to avoid getting an edge or group or whatnot. Yea, I've spent a lot of time testing things. The API docs are much better now then in 2007 when I started, but it's still lacking details.
  • Browser called from SU and html code

    11
    0 Szavazatok
    11 Hozzászólások
    715 Megtekintések
    jiminy-billy-bobJ
    But remember : @thomthom said: It will work on all systems that have IE10 or newer installed.
  • Ruby loaded file vs eval

    5
    0 Szavazatok
    5 Hozzászólások
    1k Megtekintések
    thomthomT
    Sure, but if the results are that close then it's insignificant. Large differences - the ones that matter you'll see quickly.
  • How to draw parallel lines

    2
    0 Szavazatok
    2 Hozzászólások
    4k Megtekintések
    TIGT
    Smustard.com's offset.rb adds an ' .offset' methods faces/edges/arcs/curves etc. That should give you some ideas at least... My ExtrudeEdgesByOffset tool also has some similar code that you could think about - however the easy way to offset edges is if they belong to a face, and are therefore definitely coplanar... Instead of entities.add_edges(array) you might be better using entities.add_curve(array) to make the offsetting easier, if you want separate edges later you can always explode the curves in code...
  • Transformation.rotation multiple copy

    8
    0 Szavazatok
    8 Hozzászólások
    386 Megtekintések
    C
    Yes I think it is a simpler way to draw the profile and pushpull, but once I started along the path of rotation I was getting some unusual things happening and I wanted to know what was going on. I'm on a learning curve with transformations so I will be looking into all the points highlighted here. I want to be able to define the number of teeth on each wheel and the diameter of the wheel. There will be eight wheels in all- I am modelling the back sprocket of a bicycle wheel and would like the script to ask how many wheels on the sprocket? What are their diameters? and what is the separation between each wheel. If I were to go along the route suggested by Dan I would have eight separate pushpulls of the axial profiles but this still would probably less error prone and much simpler.
  • Instance transformations not remembered

    6
    0 Szavazatok
    6 Hozzászólások
    674 Megtekintések
    A
    Thanks a million. That has cracked it. I used the offset method Best wishes Andrew
  • Ruby array to hash

    7
    0 Szavazatok
    7 Hozzászólások
    1k Megtekintések
    K
    Thanks TIG it is a good point
  • Help needed in traversing the Model

    15
    0 Szavazatok
    15 Hozzászólások
    812 Megtekintések
    thomthomT
    Yes, it'd be trivial to collect hidden entities or collect stats. But the point being is that the code is compact and easy when you traverse like that instead of walking model.definitions which would require backtracing.
  • Trying to sort scenes by alphabetical order..Need Help!

    14
    0 Szavazatok
    14 Hozzászólások
    865 Megtekintések
    renderizaR
    Hi, I updated [Re]Scene to include the feature to reorganize all scenes by alphabetical order. Thanks for all the help! New Web-Dialog: [image: dlg_1.jpg] Plugin Page: http://sketchucation.com/forums/viewtopic.php?f=323&t=52203 Cheers!
  • Inputbox change values.

    2
    0 Szavazatok
    2 Hozzászólások
    206 Megtekintések
    Dan RathbunD
    Either use 3 successive inputboxes... OR use UI::WebDialog
  • New to Ruby - I want to write a script to...

    26
    0 Szavazatok
    26 Hozzászólások
    2k Megtekintések
    K
    Hi John, The ear sounds painful! I hope you are recuperating well. Thanks for the workflow. I have got it to work, with SU loading a script automatically (which defines a function to set the current model behavior as I want it) and I call that function in console. It runs slowly compared to the all-Ruby solution - but at least it processes without crash. So I can send lots of files and leave it to run over lunch, or night! Many thanks again, Keith
  • Webdialog connect to PHP

    13
    0 Szavazatok
    13 Hozzászólások
    2k Megtekintések
    jiminy-billy-bobJ
    @krisjaniszakis said: Does some one know how big(length) array ("v") I can send through ? http://stackoverflow.com/a/7725515 But big data like this you should go with POST instead of GET
  • Creation of folder from Ruby on Mac

    31
    0 Szavazatok
    31 Hozzászólások
    2k Megtekintések
    D
    @tig said: You normally won't need to know why it failed I was thinking more for a standalone debug script to try and find why these edge cases are failing. john

Advertisement