sketchucation logo sketchucation
    • Login
    1. Home
    2. fredo6
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download
    Offline
    • Profile
    • Following 0
    • Followers 59
    • Topics 174
    • Posts 5,348
    • Groups 3

    Posts

    Recent Best Controversial
    • RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24

      This will come, but not before end of Sep (actually, it should do more than double, and on any contour). I did not spend a lot of time recently on Rubys, but should try to resume soon, with some work on Web dialogs as well.
      I also solved the question of generating faces when drawing lines on surfaces.

      Fredo

      posted in Plugins
      fredo6F
      fredo6
    • RE: Forme bizarre - Besoin d'aide

      @unknownuser said:

      Je n'ai pas rĂŠussi avec le plugin Joint Push-Pull. Je l'avais dĂŠjĂ . je n'ai pas du m'y prendre comme il fallait.

      Gwendal,

      JPP ne t'aidera au mieux qu'a donner une epaisseur a la forme geometrique, une fois que tu l'auras fabriquee. Le plugin ne t'aidera pas a creer la forme elle-meme.

      Fredo

      posted in Français
      fredo6F
      fredo6
    • RE: Common face of two edges

      @plha said:

      Fredo:
      I like that approach, as it happens, I might use this code in some other place of my silly program, it just does not solve my initial problem - to be able to select one particular face. I am trying to avoid drawing one more edge (on one of the unmarked edges of shaded face in my picture) - so I wil have unambiguos common face - but that lacks elegance a lot.

      You have to figure out an additional criterion then to say which face you like to have. For instance, the fact that the normals to each edge crosses within the surface, or any other condition.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Common face of two edges

      I came into the problem.
      The best is to find the intersection of the faces of each edge, so that you get all of them.

      
      list_common_faces = edge1.faces & edge2.faces
      
      

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Problème Sketchup sur Linux

      @yolepro said:

      Mais le problème, c'est que je ne peux plus rentrer dans le soft maintenant (il plante au dÊmarrage car il tombe sur ce fameu instructeur).
      C'est pour ca que je voulais savoir si on pouvait modifier un fichier type .ini pour enlever l'instructeur au lancement.

      A tout hasard, tu peux essayer d'ouvrir le fichier intro.skp qui doit se trouver dans C:\Program Files\Google\Google SketchUp 6\Tools\HelpContent_en\SelfPacedTutorials.

      Normalement cela ouvre Sketchup, mais sans l'instructeur. Apres il faudra effectivement desactier l'option.

      Sinon, si tu as installe un plugin, essaye simplement de le supprimer du repertoire de Plugins de Sketchup.

      posted in Français
      fredo6F
      fredo6
    • RE: 3D-Bezier tool?

      @plot-paris said:

      my only problem is, that I would like to have the camera rise up into the air at a certain point. but I can only create a bezier-curve on a plane and am not able to move control points in the third dimension.

      therefore I wanted to ask:

      is there such a thing as a 3D-Bezier tool?

      Bezierspline is 3D. However, by default, it tries to draw the curve on the plane defined by the first 3 points (cursor is an black square). Just press Ctrl alone, and you'll get an empty square, allowing you to draw freely.
      Also, when you edit the curve, you have an axis lock to move a control point vertically or along any axis (use Arrow keys).

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: [Plugin][$] Tools On Surface - v2.6a - 01 Apr 24

      By chance, can you check in the menu View>Toolbar if you have a toolbar named "Surface Operations" and if it is checked.

      Fredo

      posted in Plugins
      fredo6F
      fredo6
    • RE: Multiple offset.

      @remus said:

      Itd be really useful if the offset tool could handle multiple faces at once. i.e. you select 2 faces then SU offsets both as if you had done each one separately.

      Interesting ideas, in particular the multiple offset option (like the rings I use for Shape On Surface). Unfortunately, the OffsetOnSurface does it only on faces that are not connected (if they are, it will consider them as part of the same surface). However JPP, using the option Normal Push Pull does it on multiple face selection, whether connected or not.

      Of course, very easy to do in Ruby, especially if this is only for individual faces.

      Fredo

      posted in SketchUp Feature Requests
      fredo6F
      fredo6
    • RE: [Plugin] Face Flattener 0.19

      @cerevellum said:

      Hi Ray and Bob,

      This is something I've noticed while working on my flattening script, and I still haven't figured out why it happens. The simplest way of reproducing this is to draw a box, add a rectangle to the top surface and connect it with a line to the outer edge loop. When erasing one of the edges of the rectangle that was added, both faces disappear.

      What you can try to possibly avoid this problem is to calculate all coplanar segments, not delete them, but instead put them in a list (or in the selection). Then, just delete the entities in the list (or in the selection):

      
      model.entities.erase_entities list_edges
      #or
      model.entities.erase_entities model.selection
      
      

      It seems to work fine on your example, and on some more complex configurations, but I did not try in the general case.

      Note: manually in Sketchup, what I would use is to select all coplanar segments, put them in a group and then just delete the group. It leaves all faces intact. Unfortunately, there is no method in Ruby to make a group or a component out of existing elements!

      posted in Plugins
      fredo6F
      fredo6
    • RE: [Solved] Translate along a plane, or from Plane to Plane

      @scienthsine said:

      Another example: I want the user to be able to select a face, and then with ruby, I want to be able to have a script draw another set of faces that have the same normal as the selected one. Like, the user selects a square that is somewhere out in modeling space, and the script generates some circles, squares, and other shapes, that are on the same plane.

      Interesting, because I precisely included this functionality in my Tools On Surface (for all Shapes, but not yet for the Line tool). This is explained in the documentation, pages 11-12, in a section about drawing 'without a surface'.

      Here is an exerpt of how it works

      %(#4000FF)[As you can guess, when there is no surface, you need to figure out one. Sketchup has the same problem and usually uses the horizontal plane. For the Shape tool, this is the default, but you have the option to specify your plane direction:

      1) By typing an Arrow key, corresponding to the normal to the plane, so:

      • UP: for horizontal plane
      • LEFT: for vertical plane defined by Green and Blue axis)
      • RIGHT: for vertical plane defined by Red and Blue axis)
      • DOWN: custom plane (see below)
        2) By selecting an existing face of the model and use it as the plane for
        drawing
        . For this, just mouse over the face, without clicking and hit Shift. The face will briefly highlight in blue. Then the shape will be drawn in the plane defined by your origin point and the plane of this highlighted face.
        Guiding plane.jpg

      Important: The above applies to the ‘default’ plane when there is NO surface. When drawing on a surface, the surface geometry will of course have precedence.]

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: [Plugin] Custom Toolbars Plugin

      @cadfather said:

      well not precisely Fredo.. for example not all plugins have the entry in the extensions - what i'd like is a way for me to assign the loading af a script to a button. call it a customised quick loader - the idea can of course evolve further.

      It's easy to do (I could do it for ToolsOnSurface for instance), but then once loaded, you'll be faced again to the question of toolbar button proliferation (I mean, just TOS would come with 10 buttons!), and the only way to unload the scripts is to restart Sketchup.

      Another possibility is that I include a button to hide or show all others. But then, you have the issue with the messy placement of toolbars in Sketchup 6.

      Finally, you can also have only one button, which would then pop up a Web dialog which would contain all others (and the parameters of the one currently used), pretty much like the native entity info, Bucket paint windows. Probably better, but, you sacrifice a part of the workspace in most situations.

      I agree with the requirement, but I don't see a 'universal' solution (yet).

      Fredo

      posted in Plugins
      fredo6F
      fredo6
    • RE: [Plugin] Custom Toolbars Plugin

      @cadfather said:

      Hi Jim, i do use the ruby toolbar to load the scripts.. but there are so many! i'm thinking of a way to load a script without browsing for it (click to open/load the tools)

      say there is a way to link a specific script to a button, eg. i make it load subdivide and smooth whenever it's clicked.

      say to another button i assign fredo's TOS. (ideally you can re-assign your favourite/s for different purposes)

      not loading all the plugins at startup would make opening SU a faster and simpler situation - knowing that by clicking an icon i open only the specific set of tools i actually need..

      the ruby masters could include their loader button with their plugin... 👍 or 👎 ?

      Isn'it precisely what the Sketchup extension manager does?

      posted in Plugins
      fredo6F
      fredo6
    • RE: PLEASE HELP

      @silver_shadow said:

      guys you know what would be super awesome... like those set of surface tools... but maybe for say move. You make a box and you want to put it on a curved surface. So activating this tool you move the box to the surface and it snaps BAM, the base of the box sits on the surface, now if you move it ANYWHERE on that surface.. it still snape to it untill you click again to release it. Im drooling over my dreams here hee hee ☀

      A small issue is how you fit the planarbase face of your box on a curvedsurface. Would it be an 'intersection', or would it go 'through' the surface?

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Possible new drawing tool >> Fred06

      @ampa said:

      Link Preview Image
      Spiro

      favicon

      (libspiro.sourceforge.net)

      LibSpiro is an Open Source implimentation of the Spiro algorithm. It should be possible to see how it all works from the example / source code.

      Also... http://www.levien.com/spiro/ is the site of the inventor.

      I had a quick look, but it is very complex to understand, and I guess to reproduce. And the theory underneath is quite abstruse, based on clothoids (curves to make highway junctions), holonomic curves, and other nice mathematical theory, which however were all set out by mathematians from the 18th century (bernouilli, Euler, Fresnel, and others).

      So if someone wants to give it a try....and then publish it as an extension of BezierSpline!!

      As a consolation, I just realize that the Courbette allows to draw an arc of circle between 2 points which also includes a 3rd point.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Select all geometry

      Which error do you get?

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Select all geometry

      Then, this is the source of your error.
      You must have a Component, not a Group for your Ruby code to work.
      In Sketchup, use the command Make Component(shortcut 'G') instead of Make Group

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Select all geometry

      When you call it from the console, use "stein" not comp_name, which is the name of the variable. So:

      Sketchup.active_model.definitions["stein"]
      
      

      Your code looks correct. Here it is with the test on existence of the component

      
      def select_comp_by_name(comp_name)
         model = Sketchup.active_model
         sel = model.selection
         sel.clear
         compdef = model.definitions[comp_name]
         if compdef  #There is a component
            sel.clear
            sel.add compdef.instances
         else
            UI.beep
         end
      end
      
      

      Are you sure you have a component called "stein" in your model? Check with the Windows>Components. By the way, I wonder what you call "an Object named "stein"", as in Sketchup, you only give a name to Components or Groups, but there is nothing like an 'object'.

      Note also that Sketchup is not case sensitive with the name of components.

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Possible new drawing tool >> Fred06

      Thanks for the thanks.
      It might be useful for iron works, because it typically draws the kind of spirals you usually find in defense grids.
      spirale.jpg
      But it is much less appropriate to follow a defined contour, due to the high sensitivity created by the constraint to have portions made of circle arcs (just watch what happen by slightly changing one control point).
      EditCourbette.jpg
      In addition, it is not symetrical, that is, when you edit a control point, it will change the whole shape following that control point, but not on the portion before.

      Conclusion: The Spiro feature of Inkscape is based on something much smarter.

      If someone has an idea around Spiro, thanks

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Possible new drawing tool >> Fred06

      John,

      I have already seen a similar request from Matt666, but he mentioned the feature was present in Autocad, based on just chaining arc of circles.
      See http://escargot-archi.eu/forum/viewtopic.php?t=2661 (it is in French, but there are self-explanatory pictures)

      The Spiro function of Inkscape seems more sophisticated however.

      Attached are two files implementing the Arc of Circle method, adpated to 3D. I called it Courbette.
      courbette.jpg
      Just drop the icon and the scriptlet in the BZ_Dir folder and restart Sketchup.

      Note that the 'Precision' parameteris a number of segments for a fullcircle (not the arc), which usually is 24 (default value). I just performed a quick correction to avoid having too many or too less intermediate points, based on the pixel precision on screen (so if you zoom, you get more arc points). As a standard function of BezierSpline, you can of course edit the curve or convert a Polyline into a Courbette (via the contextual menu).

      Finally, on the picture, I compared the results of CubicBezier and Courbette, and I must say that (at least on the example), CubicBezier makes it smoother. But there might be other situations where Courbette is more appropriate (I guess for spirals).

      Fredo

      [Edit, 27 Jan 08 - 18:10]There was a minor issue with the default precision (set to 0), which was preventing to optionally close the Courbette via a Bezier curve. Fixed in current version.


      to drop in the BZ_Dir folder


      to drop in the BZ_Dir folder

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Select all geometry

      First, I would make a test on the return value of Sketchup.active_model.definitions[comp_name], because if there is no such component definition*<comp_name>*, it will return <nil>, and applying the method instanceswill provoke an error.

      Otherwise, your code seems correct to me.

      The issue is maybe that there is no such component "Stein" in your model. You should check with the Component window.

      posted in Developers' Forum
      fredo6F
      fredo6
    • 1 / 1