🚨 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
  • Adding layers to extension

    10
    0 Szavazatok
    10 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    @medeek said: Are there any more gotchas I should be aware of with layers? Yes, SketchUp layers are not really layers at all. They do not "own" geometric collections of entities (like they do in most CAD applications.) In SketchUp, layers are display behavior property sheets, that can be shared with multiple entities. So in SketchUp, each object descended from Sketchup::Drawingelement has a layer property that can be assigned to point at one of these property sheets (that were misnamed "layers" by the developers.) So, in reality you assign a SketchUp object to "use" a layer, not put an object upon a layer. @paul russam said: ... could you please precede your layers with your/your plugin name this way they will remain unique, ... If you did the same with any component and material names your plugin(s) creates it would be very helpful too. This also applies to Attribute Dictionary names. They should be prefixed with the name of your author name and extension name in some way, so there will not be any clashing of dictionary names. (For example, we all cannot have dictionaries named "Properties".) Something like "Medeek_TrussMaker_TrussProperties" or whatever.
  • [Code] Skew Transformation from axes

    21
    0 Szavazatok
    21 Hozzászólások
    5k Megtekintések
    thomthomT
    No sure where it would fit in the docs. Maybe we can add a Wiki section on the GitHub repo that host the new docs. This scenario is so common though that a face.coplanar_with?(other_face) might be a nice addition.
  • Custom Dynamic Component Functions = Ruby links

    30
    0 Szavazatok
    30 Hozzászólások
    14k Megtekintések
    halroachH
    Seems like the site is back up and running! The link about "Adding Functions" seems to have changed to this: http://cfcl.com/twiki/bin/view/Projects/SketchUp/Cookbook/DA_Adding_Functions
  • How to list all Sketchup.send_action?

    9
    0 Szavazatok
    9 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    I can get some command ID numbers from menu items and buttons etc. by using a resource inspector utility. Currently I am using one named "Inspect Object" that comes with Microsoft Windows SDK, that can inspect GUI objects in realtime of all running applications. P.S. - command ID integers only work on the Windows platform.
  • Windows spawn program

    3
    0 Szavazatok
    3 Hozzászólások
    686 Megtekintések
    G
    Of course !! Thanks Tig
  • Kernel.system asynchronous on OSX?

    4
    0 Szavazatok
    4 Hozzászólások
    709 Megtekintések
    Dan RathbunD
    I usually use a timer in this scenario, to check when the file exists, then cancel the timer and call the post processing method. @tid = UI;;start_timer(0.5,true) { if File.exist?(@filepath) UI;;stop_timer(@tid) post_process(@filepath) end } EDIT(Add): Also, I would usually have a counter variable that gets incremented each timer loop, and a max number of trys, if the file never becomes "ready" then I also exit the timer and somehow display a warning or message that things did not work.
  • Setting up camera/scene using Ruby

    4
    0 Szavazatok
    4 Hozzászólások
    927 Megtekintések
    thomthomT
    SU's FOV is by default the vertical (height) axes. Which is something that always tripped me up. Use the camera.fov_is_heigh? to determin if fov is vertical or horizontal: http://ruby.sketchup.com/Sketchup/Camera.html#fov_is_height%3F-instance_method You might have to take into account the aspect ratio of the SU viewport and your target viewport.
  • 2017: webdialog changes

    10
    0 Szavazatok
    10 Hozzászólások
    2k Megtekintések
    K
    @thomthom said: Can you share this example? I can forward it internally for investigation. Sure. I also posted it yesterday on the Trimble forum and a fix was suggested by sage John (add autofocus to the input textbox in html). Haven't had time to test it thoroughly though. See more here: http://forums.sketchup.com/t/html-dialog-speed/33832/7
  • SU 2017 anything new in the Ruby API?

    5
    0 Szavazatok
    5 Hozzászólások
    826 Megtekintések
    placidfuryP
    @driven said: @unknownuser said: ...it groups them together, moves the group, then explodes the group... exploding now deletes all references to the group entities, i.e. they all are 'deleted entities' after the explode... in one of mine I 'now' store the face.bounds.center.z and then after exploding re-find faces using that as a conditional... I believe the former ability to 'hold' the reference was a SU 'hack' and some of these are being 'put right'... john I discovered this in bug testing, can confirm. It kind of sucks, as it was nice to store a selection set in an object array, manipulate, then get your selection set back by selection.add(array) which you can't do now since it views the objects as 'deleted.' Alternately - and this may work well for your case, as even edges/faces/etc get these - each object now has a property called persistent_id, and by referencing back to that you wouldn't have to compare geometry (if I read your post right). My work around for now is to store the persistent_id's in an array, then go the the drawing objects and find the ones that have those id's when I need to reselect them. This is way, WAY slower than just being able to reference back to an array of entities, but I guess it is what it is... unless someone else knows of an easier way to get the selection set back.
  • Clean Dynamic Components

    6
    0 Szavazatok
    6 Hozzászólások
    744 Megtekintések
    TIGT
    Learn to use regular expression matching... Dan has provided many useful links to basic Ruby usage... d.name=~/Steve/ matches 'Steve', 'Some Steve', 'Steve#1' etc BUT not 'steve' etc d.name=~/[Ss]teve/ matches 'Steve', 'steve' etc To limit the match to a start position use d.name=~/^Steve/ matches 'Steve', 'Steve#1' etc BUT not 'Some Steve' etc To limit the match to an and position use d.name=~/Steve$/ matches 'Steve', 'Some Steve' etc BUT not 'Steve#1' etc To limit it to an exact match use d.name=~/^Steve$/ matches 'Steve' only, nothing else note that is actually equivalent to d.name=="Steve"
  • Size of input point?

    2
    0 Szavazatok
    2 Hozzászólások
    396 Megtekintések
    Dan RathbunD
    You might try using a Sketchup::PickHelper class interface instead, and the new (SU2016+) window_pick() method. Otherwise there is no way to change the pick aperture size, and Sketchup::InputPoint would use a "OnEdge" inference anyway.
  • Run auto completion for Sketch up API in RubyMine

    6
    0 Szavazatok
    6 Hozzászólások
    1k Megtekintések
    thomthomT
    RubyMine only need to know/care about the lib folder in that repo. You can tell it to ignore the other folders. As for the auto-complete, I'm having some issues right now myself. Maybe something changed with RubyMine... I'm not sure. Looking into it.
  • ICON MF_ENABLED, MF_CHECKED

    37
    0 Szavazatok
    37 Hozzászólások
    5k Megtekintések
    TNTDAVIDT
    @tig said: Isn't that method used on the currently selected DC instance NOT a definition !? So perhaps it should be something like $dc_observers.get_latest_class.redraw_with_undo(model_def.instances[0]) It is in this kind of situation that your experience is very beneficial, TIG. Congratulation!
  • WIP -- 'Protrude' ruby from Jim Foltz

    49
    0 Szavazatok
    49 Hozzászólások
    26k Megtekintések
    majidM
    What a great plugin for interior design... Thanks a bundle Jim!... I was missing it for a while!
  • What what what? This makes no sense!

    6
    0 Szavazatok
    6 Hozzászólások
    1k Megtekintések
    thomthomT
    hm... I don't recall this thread at all any more. But I tried this in SU2016, and it seem to be doing something odd. In my test a group would be deselected after running this code and making a zoom to update the viewport.
  • The zero point of circles changes with their orientation

    6
    0 Szavazatok
    6 Hozzászólások
    1k Megtekintések
    A
    Hi Dan, Thanks for a pretty amazing exploration of the possibilities. It's both educational and entertaining (for those of us who like this kind of thing). My apologies for dropping the ball on getting back to you. This is one of those projects that I just keep whittling away at because each step seems a little more complex than I had expected or was ready to deal with. You provided quite an array of methods for finding the starting angle of a circle, and I'm sure some of those will be useful as I move forward. As for my current stuck spot, I think what I'm really trying to figure out is how to specify the starting angle of a circle, a polygon, or a curve, relative to the previously placed circle or polygon, as I go around the knot placing circles. When I use the usual tools to create a circle, the starting angle does not seem to be a parameter that is under my control. The image at the top of this thread shows where it defaults to, just using the standard circle-creating functions. I do not need to understand the logic behind those defaults, because that's not going to help me with my actual problem. If I create a polygon, like a circle, I also do not know how to specify a starting angle. I have to wonder, when you draw a circle or a polygon manually in SU, the point you drag out from the center becomes the starting angle. So what's going on under the hood? Is a default circle being generated and then rotated so that it's starting angle is where the cursor is? Lacking that methodology, the only way I can see to create either a circle or a polygon where I get to specify the staring angle is to make a 360 degree curve. That feels unnecessarily limiting, but that's where I've gotten to. My current thinking on my original problem is that I need to figure out how to place the new curve, based on the information I have from the previous circle/curve. I have the normal, which is derived from the current segment of the knot curve. I have the previous circle/curve. And I have the previous circle/curve's starting angle. And, as you suggested, I have to deal with what the starting angle is relative to. I have to figure out what starting angle I want to specify, based on the previous normal, the previous starting angle, and the current normal. I think I'm going to have to nudge the starting angle of the next successive circle by just a little, so that as the sequence progresses around the knot, it does a slow rotation and comes back to the beginning. Does it want to go around only once? Or three times for the three lobes of this knot? Or what? You gave me a great nudge that percolated for a while and now I think I know what I need to figure out for my next step. I hope that's not another year, but who knows? Anyway, thanks for all the tips. August
  • Reload or recharge

    6
    0 Szavazatok
    6 Hozzászólások
    983 Megtekintések
    D
    Here is my solution selectionObjectTemp = Sketchup.active_model.selection.to_a if selectionObjectTemp.length == 0 selectionTemp = nil else selectionTemp = selectionObjectTemp end if @definitions[definitionAImporter] definition = @definitions[definitionAImporter] else composantPath = File.join(@libPath,"#{definitionAImporter}.skp") if File.exist?(composantPath) definition = @definitions.load composantPath else UI.messagebox "le chemin n'existe pas; #{composantPath}" end end if selectionTemp != nil selectionTemp.each{|entitie| if entitie.is_a? Sketchup;;ComponentInstance entitie.definition = definition end } end
  • Sublime connection to sketchup console

    2
    0 Szavazatok
    2 Hozzászólások
    416 Megtekintések
    thomthomT
    Echoing my response here from the other thread: Not sure about the intellisense. Unsure how Sublime handle that. As for the debugger, I think it should work if you can find a package that let you set up remote debugging.
  • Automatically load a component.

    70
    0 Szavazatok
    70 Hozzászólások
    8k Megtekintések
    TIGT
    You have started another thread and I've replied there. I know you do not want to trigger it depending on a selection - I just used that as an example... In the example you show the other buttons are not disabled. When one is active it's shown 'depressed', when another is click that takes the focus and appears depressed. It the other buttons were actually 'disabled', then they would not be clickable and you'd never get out of the first clicked button's state !
  • Debug RUBY Code in SketchUp

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    thomthomT
    If you want an example on how to set up the debugger in RubyMine you can check out this thread: http://forums.sketchup.com/t/please-help-me-to-setup-de-debugger-on-rubymine-for-mac/289/2?u=thomthom

Advertisement