⚠️ Important | Libfredo 15.6b introduces important bugfixes for Fredo's Extensions Update
  • Creating a nested component

    4
    0 評價
    4 貼文
    411 瀏覽
    TIGT
    Entering a faces edges/vertices 'in order' to add a clone into another context will determine the normal of the new_face. But it's always possible that the original face has been reversed if you took the edges ? So get the original_face.normal and compare it with the new_face.normal [allowing for the transformation differences!] - then if they don't match you must reverse the new_face...
  • [Code] Progress bar with tasks

    2
    0 評價
    2 貼文
    110 瀏覽
    renderizaR
    This looks very interesting...Thank you both!
  • Edit Watermarks by code?

    3
    0 評價
    3 貼文
    89 瀏覽
    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 評價
    5 貼文
    170 瀏覽
    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 評價
    10 貼文
    311 瀏覽
    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 評價
    3 貼文
    181 瀏覽
    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 評價
    9 貼文
    588 瀏覽
    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 評價
    4 貼文
    1k 瀏覽
    S
    Thank you very much it works just fine
  • Plug In - Copy to Path troubles

    9
    0 評價
    9 貼文
    511 瀏覽
    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 評價
    3 貼文
    133 瀏覽
    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 評價
    4 貼文
    166 瀏覽
    renderizaR
    It worked! Thank you so much!
  • [Code] AnimateSelection Example v1.0.1

    12
    0 評價
    12 貼文
    2k 瀏覽
    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 評價
    7 貼文
    523 瀏覽
    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 評價
    7 貼文
    278 瀏覽
    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 評價
    18 貼文
    562 瀏覽
    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 評價
    2 貼文
    294 瀏覽
    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 評價
    15 貼文
    893 瀏覽
    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 評價
    27 貼文
    3k 瀏覽
    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 評價
    16 貼文
    4k 瀏覽
    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 評價
    12 貼文
    931 瀏覽
    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...

Advertisement