Urasik Extensions | Lots of new extensions to check out Learn More

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
  • Application Development Exploding Component Instances

    16
    0 Szavazatok
    16 Hozzászólások
    5k Megtekintések
    TNTDAVIDT
    The loading time decreased from 2 minutes to 4 seconds. Thanks Driven
  • Knowing the ComponentInstance a DimensionLinear is attached

    5
    0 Szavazatok
    5 Hozzászólások
    2k Megtekintések
    TIGT
    Until it's fixed how about a clunky and convoluted workaround ? If the pa=dim.start[0].parent is a component-definition then you need to see if there is pa.instances[1] if not then the one instance is the answer. If there are more than one instance you need to iterate those, and assemble a list of their transformation.origin positions [ensuring the transformation steps back to match the dim's parent's and of course takes into account any instance scaling etc...] - let's call that 'pvs'. The pt=dim.start[0] gives you a point inside the definition. You have ps=dim.start[1] as the point of the dim in 3d space. Transform the 'pvs' inversely and compare that point with ps, if they match then you could have a hit. Of course two or more instances where some are rotated or flipped so that vertex is coincident in 3d returns two or more 'hit' points, so it'd not be possible to determine the attachment that way... So, it's better if it worked like it should !!!
  • Indigo Renderer + Sketchup plugin developer

    7
    0 Szavazatok
    7 Hozzászólások
    4k Megtekintések
    I
    Hi all, we're still looking for a SketchUp developer to work on our plugin! Please get in touch with us at contact@indigorenderer.com if you're interested. Kind regards, The Indigo team
  • Weird DimensionLinear behavior

    5
    0 Szavazatok
    5 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @ittayd said: Thanks, I'm asking about ways to interact with the text: getting, setting. No this is not what you asked! Such a simple thing (as what method's a class has) can be easily found by looking at the API dictionary. http://ruby.sketchup.com/Sketchup/DimensionLinear.html ... which is a subclass of (and therefore inherits methods from http://ruby.sketchup.com/Sketchup/Dimension.html ... which is a subclass of (and therefore inherits methods from http://ruby.sketchup.com/Sketchup/Drawingelement.html ... which is a subclass of (and therefore inherits methods from http://ruby.sketchup.com/Sketchup/Entity.html ... which is a subclass of (and therefore inherits methods from http://ruby-doc.org/core-2.2.4/Object.html You asked about dims nested inside transformed instances. I am not sure if the .text getter will return transformed lengths or not. Also not sure what happens when the context is open and not. So test. The means I showed above avoids the conversion of text ( String) into a numeric ( Length) object, and just gets the length.
  • Bounds change depending on active context?

    5
    0 Szavazatok
    5 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    @ittayd said: And, I wouldn't mind the coordinates changing if contains? would have acted sanely, always returning true to a point that is inside the group BoundingBoxes are always aligned with the model's axes. This means if you rotate a cuboid instance, it's bounding box will increase. The second thing you need to realize is that bounding boxes have an untransformed state (ie, the definition's entities bounds,) and each of their instances transformed bounds. The transformed bounds are not just translational, they can also be affected by the rotation and scaling of the instance. @ittayd said: I would expect the coordinates to never change no matter what entity is opened. As a coder, most of time when generating geometry, you are just working in the definition's local coordinates with the IDENTITY transform, (ie, everything is 1:1 and you're specifying geometry oriented in relation to the definition's local origin and axes.) But when the user double-clicks into an instance, that might be rotated or scaled (transparently they are actually editing the definition,) but perhaps not at the 1:1 scale. Imagine an instance that has been scaled 2x. The user would be drawing edges that are twice as long on the screen. So their needs to be some transforming back to the definition's scale and coordinates. Julia wrote a really good explanation of this recently (ie past few months.) Need to find this and give you the link.
  • Mass material importer

    14
    0 Szavazatok
    14 Hozzászólások
    11k Megtekintések
    C
    Thanks a lot guys for the tips ! the script work fine. But really no one have any idea how to batch-adjust the tiling of the material ? Other ways it will take me days to manually adjust each one of them (I have like 500 skm tu adjust)
  • Ruby Group Copy - Regardless of Context?

    6
    0 Szavazatok
    6 Hozzászólások
    2k Megtekintések
    H
    Thank you Dan!
  • Flags parameter in a tool's onKeyDown/Up

    12
    0 Szavazatok
    12 Hozzászólások
    4k Megtekintések
    Dan RathbunD
    Ah okay, 3 years and two months ago, Fredo was noticing these same issues in the following topic thread: onKeyDown: getting the charcater value from key In that thread, post # 9, I noted several other related topic threads, and the one that I just remembered by Jim Foltz, which was back in 2009. flags on onKeyDown? (Note that at this time Chris Fullmer was not yet a member of the SketchUp Team, and had not yet learned much programming.) See other related threads: My Apple Keyboard VK_KEYS very difficult key codes! keycodes intelmac Jim's KeyTool.rb is also posted in this topic thread, but not sure if it is the latest version ? Key sequence in ruby Now, @Anton_S posted a Windows only method that calls Windows API C functions, in this post: http://sketchucation.com/forums/viewtopic.php?f=180%26amp;t=57450%26amp;p=522915%26amp;hilit=keytest#p522915
  • Get mac address in ruby

    8
    0 Szavazatok
    8 Hozzászólások
    2k Megtekintések
    B
    Thanks that works
  • Axes question

    8
    0 Szavazatok
    8 Hozzászólások
    2k Megtekintések
    PixeroP
    Thanks for the info.
  • Handling advanced selection in a tool

    4
    0 Szavazatok
    4 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    @ittayd said: Is there a way to utilize sketchup's own selection tool? The only way is to attach a SelectionObserver, activate SketchUp's native SelectTool Sketchup.active_model.select_tool(nil), collect the object references, detach the observer, and activate your tool. But trying to leverage native tools via code has been problematic in the past. So, this is why they finally added (SU2016) the two window pick methods to the PickHelper class. ThomThom wrote a tutorial and created a graphic helper chart for using this class. http://www.thomthom.net/thoughts/2013/01/pickhelper-a-visual-guide/ Other than that, you best learn by reading the example extension by the SketchUp Team (EW) or others like ThomThom's plugins.
  • Rotate a component before place it with a key imput

    2
    0 Szavazatok
    2 Hozzászólások
    1k Megtekintések
    Dan RathbunD
    @boom02 said: Do you guys think this is the right way? NO. The spacebar is pre-coded to activate the native SelectionTool. Many users are used to it this way, and do not want to change it. Those that have changed it, have done so for their own choice of command. Secondly, you cannot affect how the built-in place_component works as it is a native tool, most especially not when using the repeat mode. (Ie, there really is no way to trap the spacebar and prevent it from bubbling-up to SketchUp's shortcut handler.) The way it is designed, when not in repeat mode, is that once placed, the normal MoveTool is active, and it's hover rotate mode can be used. Just hover the MoveTool cursor over a the side of a component's bounding box, and 4 rotate handles will appear. Move to one of the handles and you'll see the cursor change to a protractor. I myself, also kinda miss the ACAD spin before place feature. @boom02 said: ... how can I get the key press from the user? The best way is inside a custom tool class written in Ruby. http://ruby.sketchup.com/Sketchup/Tool.html And you'd need to create a menu item pointing at a method object that rotates the selected object. Then that menu command can be assigned any shortcut, by users according to their own desires.
  • Trouble adding entity to component definition

    6
    0 Szavazatok
    6 Hozzászólások
    2k Megtekintések
    Dan RathbunD
    A workaround we employ is to stick a temporary cpoint into the entities (at it's origin,) and then delete it later after we've loaded it up with geometry. The temp cpoint stops SketchUp's garbage collector from deleting the object.
  • Importing Bulk Attribute Values from CSV

    11
    0 Szavazatok
    11 Hozzászólások
    2k Megtekintések
    H
    BTW, the answer to the original question was that input = UI.inputbox(@prompts, @defaults, @list, "Select Attribute Target") returns an array of values because typically the inputbox would present more than 1 option. In my case there was only one input or prompt so when I put input into set_result = Sketchup.active_model.set_attribute("dynamic_attributes", input, att_string.to_s ) I was actually sending in an array and thus setting a new key in the format ["whatever user put into inputbox"]. Even .to_s did not seem to help... set_result = Sketchup.active_model.set_attribute("dynamic_attributes", input.to_s, att_string.to_s ) The answer was to get the first item in the array like so: set_result = Sketchup.active_model.set_attribute("dynamic_attributes", input[0], att_string.to_s )
  • Observers WhishList

    59
    0 Szavazatok
    59 Hozzászólások
    120k Megtekintések
    G
    @thomthom said: Would that be at the event of copying? Or when pasting? Can you describe the scenario you'd use it in? when copying i am trying to find a way to control the difusion of dynamic components if such an observer would be available, it would be easy to prevent unauthorized copies selection observer can be used, but it is less direct, and probably less efficient than an observer on copying more dynamic components would be created if there was a way to crypt them, just as ruby plugins
  • Uninitialized class variable

    5
    0 Szavazatok
    5 Hozzászólások
    1k Megtekintések
    PixeroP
    Thanks, that worked.
  • Cleaning up memory in script

    3
    0 Szavazatok
    3 Hozzászólások
    1k Megtekintések
    PixeroP
    Thanks.
  • Replace Several Textures?

    32
    0 Szavazatok
    32 Hozzászólások
    6k Megtekintések
    sdmitchS
    I have PM'd you a possible solution to #7
  • How to create a selection window in a tool?

    2
    0 Szavazatok
    2 Hozzászólások
    933 Megtekintések
    sdmitchS
    @ittayd said: I want to create a tool that allows to select several entities by either picking them or a selection window. But how do I draw the selection window? The "Select by Polygon" plugin you can find on my blog is an example of drawing the selection window then selecting the entities within it.
  • [Req] Dedicated SU onscreen keyboard.

    4
    0 Szavazatok
    4 Hozzászólások
    1k Megtekintések
    J
    Maybe using something like autohotkey, I already use it to map some mouse functions to keyboard, here is a example of a full keyboard: https://autohotkey.com/board/topic/16891-ahkosk-onscreen-keyboard/

Advertisement