⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • [Code] Progress bar with tasks

    2
    0 Votes
    2 Posts
    107 Views
    renderizaR
    This looks very interesting...Thank you both!
  • Edit Watermarks by code?

    3
    0 Votes
    3 Posts
    83 Views
    renderizaR
    I was hopping there was more functions regarding watermarks with the API, maybe in SketchUp 9 who knows. For creating water drops on screen I guess I can still make it work by animating the Scene Manager to desired style. Thanks
  • Trouble understanding how Dynamic Components are created

    5
    0 Votes
    5 Posts
    167 Views
    F
    Hi Chris, @chris fullmer said: Well then, the bigger question is does you component need to be compatible with the built in dynamic component webdialog, like for others to interact with it. I didn't think of that since I assumed the way of doing this was through Dynamic Components. So I'm not sure what being compatible with implies the DC webdialog implies either way. @unknownuser said: There is no need to actually make a "dynamic component" to do what you are asking. There is a lot that goes on behind the scenes of dynamic components. If all you want to do is manipulate components using your own webdialog, I'd recommend not using the term dynamic component a that confuses the question with the actual dynamic components. Gotcha, knowing that now, yes that's exactly what I'd like to do is being able to manipulate the created components. eg: height, width, depth... along with other variables I have. And being able to do so to all the components or just selected ones. @unknownuser said: The way I see it is that you have 2 main issues to tackle here. 1 - You need to learn how to work with components, and scale them or manipulate their geometry. You can learn this without the trouble of a webdiloag first. I have a pretty good handle on creating components already but manipulating tham after they've been created is another story which is what my original question should of been. @unknownuser said: 2 - You need to master is how to converse freely back and forth from ruby and your web dialog. Once you get them talking, and you know what you need to do to your components, then its easier to understand how to put your webdialog together so it can reach into the model and make changes. I've got the initial communication between WD and ruby working just fine. Actually My plugin is built with WD and also works great, well it needs a few 'fixes' but I'm able to get all that done, as best as I can for a newbie at lest. But getting my WD to then modify or manipulate as you say the components I create is a whole other story! I fugured integrating DCs was the way to go but seems like there are other ways of doing so. That being said, from your reply maybe I should look into scaling my components? Or resending new values and some how applying them to existing components and redrawing? Am I even close in my assumptions? Thanks, Frank
  • [API] curve.move_vertices

    10
    0 Votes
    10 Posts
    289 Views
    thomthomT
    @mptak said: If I apply a transformation to the separate vertices in an circle or arc it acts differently than if I have exploded the curve. Any insights? When the vertices are a part of a circle the circle seems to dilate about the center even if the transformation is defined as tran=Geom::Transformation.new([0,0,10]) If the curve is exploded the transformation does the expected shift of 10 in the "z" direction. Thanks for any immediate insights. In Vertex Tools I had to explode all curves for the vertices I wanted to move. Weird things happen when you move vertices connected to a Curve. I have never tried Curve.move_vertices though...
  • Intersect_with group with model

    3
    0 Votes
    3 Posts
    176 Views
    S
    Thanks TIG! The problem was indeed the last argument, I put an entities object in there. working with an array instead did the job
  • What is the right and wrong way to sell your plugins?

    9
    0 Votes
    9 Posts
    578 Views
    renderizaR
    Hi, I was testing the process of screen capturing the animation with Active Presenter and I am not so happy. The resolution setting had to be very low because if not the resulting video would have lagged very bad even though inside SketchUp there was no lag at all. http://www.youtube.com/watch?v=6RGFwNHLfpo Renderiza
  • Web Dialog: Trouble passing string from ruby to javascript

    4
    0 Votes
    4 Posts
    1k Views
    S
    Thank you very much it works just fine
  • Plug In - Copy to Path troubles

    9
    0 Votes
    9 Posts
    506 Views
    nikusknxN
    Ok I get the good position with a translate: definition.instances.each do |instance| originBefore = instance.transformation.origin instance.transform! inv tr = instance.transformation vectorTranslate = originBefore - instance.transformation.origin translate = Geom::Transformation.translation(vectorTranslate) instance.transform!(translate) end but when the axes changes (y axes become z axis for exemple) the scale are not good and switch... I try to get the model.edit_transform , manualy I can get it but with the API it's always the same problem : I can't do the right click Component edit... Any Idea to get the local axes?
  • Retrieve import file name?

    3
    0 Votes
    3 Posts
    123 Views
    Dan RathbunD
    @lestercavey said: Also, Sketchup.send_action(21112) does not work for me. Even though send_action returns true, no Import Window appears. Because the API Dictionary is way out of date, and that list of integers is erroneous. The proper integer (PC only,) to invoke the "File > &Import..." is 21933 I do not know if there is a cross-platform string arg.
  • Go to specified page by name using code

    4
    0 Votes
    4 Posts
    157 Views
    renderizaR
    It worked! Thank you so much!
  • [Code] AnimateSelection Example v1.0.1

    12
    0 Votes
    12 Posts
    2k Views
    T
    I understood it was an example, but the logic of the code told me it accepted primitives, and primitives didn't work like they should have, nor did the duration work as expected. As an example, for its intent, it's fine and I would not bother (other than adding comments for the learner) with any additional enhancements. Todd
  • Make Unique Texture

    7
    0 Votes
    7 Posts
    519 Views
    TIGT
    For the avoidance of doubt --- here's a base-class free version... Please implement something like this... <span class="syntaxdefault"></span><span class="syntaxcomment">### pass a 'face' as the first argument<br />### and a second optional argument to convert the image texture into a PNG format<br />### it returns the new material, or 'nil' if the face is incorrect<br />### or if there's no face.material.texture...<br /></span><span class="syntaxdefault">def material_make_unique</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">face</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">nil</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> png</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">false</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    return nil unless face<br />    return nil unless face</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">is_a</span><span class="syntaxkeyword">?(</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">;;</span><span class="syntaxdefault">Face</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    return nil unless mat</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">face</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">material<br />    return nil unless txt</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">mat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">texture<br />    iwi</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">txt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">width<br />    ihi</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">txt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">height<br />    </span><span class="syntaxcomment">### later we use ### texture.size=[w, h]<br /></span><span class="syntaxdefault">    tads</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">txt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">attribute_dictionaries<br />    </span><span class="syntaxcomment">###<br /></span><span class="syntaxdefault">    nam</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">mat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">display_name<br />    alp</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">mat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">alpha<br />    col</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">mat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">color<br />    mads</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">mat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">attribute_dictionaries<br />    </span><span class="syntaxcomment">###<br /></span><span class="syntaxdefault">    mats</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">active_model</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">materials<br />    namp</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">nam</span><span class="syntaxkeyword">+</span><span class="syntaxstring">"1"<br /></span><span class="syntaxdefault">    namp</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">next</span><span class="syntaxkeyword">!</span><span class="syntaxdefault"> while mats</span><span class="syntaxkeyword">[</span><span class="syntaxdefault">namp</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">    num</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">namp</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">gsub</span><span class="syntaxkeyword">(/^</span><span class="syntaxcomment">#{nam}/,"")<br /></span><span class="syntaxdefault">    nmat</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">mats</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">add</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">namp</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    </span><span class="syntaxcomment">###<br /></span><span class="syntaxdefault">    tw</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">Sketchup</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">create_texture_writer<br />    tmp</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">ENV</span><span class="syntaxkeyword">[</span><span class="syntaxstring">"TEMP"</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> </span><span class="syntaxcomment">### it's a PC == 'TEMP' or 'TMP'<br /></span><span class="syntaxdefault">    tmp</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">ENV</span><span class="syntaxkeyword">[</span><span class="syntaxstring">"TMPDIR"</span><span class="syntaxkeyword">]</span><span class="syntaxdefault"> unless tmp </span><span class="syntaxcomment">### it's a MAC<br /></span><span class="syntaxdefault">    tna</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">basename</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">txt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">filename</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">".*"</span><span class="syntaxkeyword">)+</span><span class="syntaxdefault">num</span><span class="syntaxkeyword">+</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">extname</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">txt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">filename</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    tna</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">basename</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">tna</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> </span><span class="syntaxstring">".*"</span><span class="syntaxkeyword">)+</span><span class="syntaxstring">".png"</span><span class="syntaxdefault"> if png<br />    pth</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">File</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">join</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">tmp</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> tna</span><span class="syntaxkeyword">).</span><span class="syntaxdefault">tr</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"\\"</span><span class="syntaxkeyword">,</span><span class="syntaxstring">"/"</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    tw</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">load</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">face</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> true</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    tw</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">write</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">face</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> true</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> pth</span><span class="syntaxkeyword">)<br /></span><span class="syntaxdefault">    </span><span class="syntaxcomment">###<br /></span><span class="syntaxdefault">    nmat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">alpha</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">alp<br />    nmat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">color</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">col<br />    mads</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each</span><span class="syntaxkeyword">{|</span><span class="syntaxdefault">d</span><span class="syntaxkeyword">|</span><span class="syntaxdefault"> d</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each_pair</span><span class="syntaxkeyword">{|</span><span class="syntaxdefault">k</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">v</span><span class="syntaxkeyword">|</span><span class="syntaxdefault"> nmat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">set_attribute</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">d</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">name</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> k</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> v</span><span class="syntaxkeyword">)}}</span><span class="syntaxdefault"> if mads<br />    nmat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">texture</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">pth<br />    ntxt</span><span class="syntaxkeyword">=</span><span class="syntaxdefault">nmat</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">texture<br />    ntxt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">size</span><span class="syntaxkeyword">=[</span><span class="syntaxdefault">iwi</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> ihi</span><span class="syntaxkeyword">]<br /></span><span class="syntaxdefault">    tads</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each</span><span class="syntaxkeyword">{|</span><span class="syntaxdefault">d</span><span class="syntaxkeyword">|</span><span class="syntaxdefault"> d</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">each_pair</span><span class="syntaxkeyword">{|</span><span class="syntaxdefault">k</span><span class="syntaxkeyword">,</span><span class="syntaxdefault">v</span><span class="syntaxkeyword">|</span><span class="syntaxdefault"> ntxt</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">set_attribute</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">d</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">name</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> k</span><span class="syntaxkeyword">,</span><span class="syntaxdefault"> v</span><span class="syntaxkeyword">)}}</span><span class="syntaxdefault"> if tads<br />    return nmat<br />end<br /></span>
  • Custom selection tool

    7
    0 Votes
    7 Posts
    277 Views
    A
    @sdmitch said: Using the BoundingBox certainly works as long as the selection box is not rotated which will cause BoundingBox to be much larger than the selection box. I see no reason why the selection process should be any slower on a curved surface. It should only matter how many total entities there are in the model. Yea. That is the same thing I'm confused about as well. Unless SU has a way of selecting the cylindrical surface as one unit or a collection rather than add each face of the curved surface one after the other(which is what my code does). Also, all my conditionals could be slowing things down as well. The selection box is axis aligned, so the they bounding box and the selection box should pretty much be the same size.
  • Texture overlay on selection

    18
    0 Votes
    18 Posts
    520 Views
    A
    @dan rathbun said: What platform is this for? PC or Mac ? This is for the PC.
  • Using Netbeans as IDE for SketchUp

    2
    0 Votes
    2 Posts
    294 Views
    J
    @gwd said: At Basecamp the people of 3skeng showed a way to connect netbeans to sketchup for using it as full working IDE for SU.Does somebody knows how to do it? Hi Guy, 3skeng could have their own internal solution, you would need to ask them. There is a possible way using TBD's "bridge" plugin. You would need to configure netbeans to execute the buffer using the sub.exe file in bridge. This is a Windows plugin and I see your profile says Mac so you may be out of luck. http://labs.plugins.ro/
  • Get the Click-Style via the Ruby API?

    15
    0 Votes
    15 Posts
    856 Views
    L
    @dan rathbun said: And BTW shell commands are done with Kernel.` (backquote character) see http://phrogz.net/ProgrammingRuby/ref_m_kernel.html#Kernel._bq still a cmd window... ex:ipconfig /all
  • Making a SketchUp game named &quot;Resballiza&quot;

    27
    0 Votes
    27 Posts
    3k Views
    renderizaR
    @chris fullmer said: Hey, great job! It looks great! Chris Chris thank you very much! Video Update #3 http://www.youtube.com/watch?v=RTuhPfFGl9Y&feature=plcp To download the latest SketchUp game version go here; https://www.dropbox.com/sh/w9m7du0fnhkgwv0/bIqndmMs1S Thanks
  • [Code] position of texture pins

    16
    0 Votes
    16 Posts
    4k Views
    renderizaR
    I am so frustrated that I don’t possess the knowledge yet to understand most of this discussion. Correct me if I am wrong but could this code make animating textures possible? If so I am very interested in trying to figure how I can do this myself.
  • Intersecting Hollow Objects using intersect_with

    12
    0 Votes
    12 Posts
    902 Views
    TIGT
    There's BoolTools http://www.Smustard.com, for just $10... There's also Oscarlok's Boolean ODCoolean toolset, in the Plugins Index, which is free... http://sketchucation.com/forums/viewtopic.php?p=112055#p112055 These both replicate several of the solid tools in Free that are available only in Pro...
  • Duplicate Faces?

    10
    0 Votes
    10 Posts
    756 Views
    J
    @thomthom said: @jasef said: Awesome gents, make_unique solved it. What about ComponentInstances? I hope you're not making them uniqe - as I doubt the user will be expecting that - or be happy to see that happening... No, just Groups.

Advertisement