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!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    Offline
    • Profile
    • Following 0
    • Followers 55
    • Topics 173
    • Posts 5,302
    • Groups 3

    Posts

    Recent Best Controversial
    • RE: Aidez moi svp !!!!

      Pour les escaliers en colimaçon, on peut aussi utiliser une technique de cisaillement vertical avec l'outil Move. Bien entendu, il faut fabriquer l'escalier par composant (1 marche en principe).
      Ci-joint un petit tuto qui décrit succinctement les étapes de construction d'un escalier en spirale que j'ai fait il y a quelque temps et qui se trouve sur 3D Warehouse (http://sketchup.google.com/3dwarehouse/details?mid=232f7aad7ff44348e2ef5fcda6dad65f)
      Spiral stairs - Move.jpg Spiral stairs.jpg
      Il faut faire quelques calculs simples auparavant pour avoir l'angle d'ouverture de chaque élément (dans mon cas 360° / 12 = 30°) et la hauteur de décalage (~ hauteur totale / nombre de marches).

      PS: Il est vrai qu'avec les scripts PlaneShear, Joint Push Pull, Offset on Surface, on peut manipuler les surfaces plus facilement. Par exemple JPP et OOS permettent de faire facilement des panneaux incrustés.


      Short Tutos Stairs.skp

      posted in Français
      fredo6F
      fredo6
    • RE: [Obsolete] Offset On Surface (v1.0)

      @baker518 said:

      ...but, I have a question? When I pull the off-set, the edges are contoured, so they don't have a discernible face to each side. Is this correct or am I doing something wrong?

      Let me know and thanks again, this is a gem for sure
      Mike

      Mike,

      I suspect this is related to the question of edge style but I am afraid I would need a picture or a SKP sample to see what is the problem, and if this is a problem that can be solved. Thanks to post it.

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: [Obsolete] Offset On Surface (v1.0)

      Thanks to all for your encouragements. I appreciate.

      I found a number of bugs in the current version which I will try to fix over the next 10 days, if hopefully I can find some time.

      I would also appreciate if you could give some feedback on a few points:

      1) Inference of the Red Point: I had the choice to have the Red point follow the surface or stick to a constant line independent from the surface. Because you cannot move the cursor in Ruby, I needed to manage the 'projection' of the mouse cursor, to the surface, but then, it's not easy to use inference vis-a-vis the rest of the model, except for plane surface. So is inference useful for an Offset operation?

      2) Enter distance AFTER Offset operation: in most Sketchup tools, you can usually modify again some parameters after you perform the operation. In the case of my tool, this is doable, though not extremely easy, as I would have to use the Sketchup Undo, retrieve the original selection (Undo may create new Faces and Edges objects, not restore the same), and then re-launch the Offset operation. As I am not sure Offset On Surface is to be used frequently and also because the 'retry' can be done manually, I don't know if it is worth trying to address this problem

      Finally, I could recycle the work I did for OOS to derive a script 'DrapeOnSurface' that would take a selection of faces and edges on a plane and drape them onto a surface. The SandBox 'Drape' does this, but 'by projection' only. In addition you have to orient the surface more or less in the horizontal plane (as for anything with the Sandbox) and position the component to be draped above. DrapeOnSurface would instead be independent of orientations and positioning, will work by extension, not by projection, allowing to preserve distances and fully drape around for instance a close cylinder. In addition, it can create a group with the generated surface (mould option).

      Thanks to all again

      Fredo

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Joint Push Pull Classic (Old version) - v2.2a - 26 Apr 17

      Dave,

      Strange because this bugs existed only for one hour in the life of this script (see http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=6713&start=15#p43230).
      But the version on Crai Ruby Depot does contain the bug apparently. Thanks for signaling.

      A working version is anyway available on the present forum at http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=6708#p42783

      Didier: When you can, can you please update on your site (and also indicate that it works on Sketchup 5).

      Thanks

      Fredo

      posted in Plugins
      fredo6F
      fredo6
    • RE: [Obsolete] Offset On Surface (v1.0)

      This is a feature actually.
      If you show hidden geometry, I found more useful to keep the behavior of the implicit selection by mouseover rather than to just select an individual face, which you can just do explictly by clicking on the face and launching the OOS tool (or use the native Sketchup Offset).

      posted in Developers' Forum
      fredo6F
      fredo6
    • [Obsolete] Offset On Surface (v1.0)

      [Edit 15 Sep 09] new version 1.5 available with more shapes, Eraser and Contour Edition, see http://forums.sketchucation.com/viewtopic.php?f=323&t=11212&hilit=plugin#p76625.

      [EDIT 12 May 08]
      Offset on Surface is now part of a suite of tools to draw on Surface. See new thread at http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=9637#p60512. So, the version below is now older.

      Here is the first version of this script that has been suggested by members of the forum.

      In short, it tries to mimic the native Sketchup Offset tool, but on surface, not just on a single face. Below is a sample which is self-explanatory.

      OffsetOnSurface Sample.jpg
      Actually, the script was not so easy to design, as there is no real mathematical concept of distance and angle on surfaces and the number of possible topologies is rather huge. So there are many limitations and approximations in this version.

      Installation: Do an 'Extract All' in the Plugins folder, which should copy

      • OffsetOnSurface.rb, the main script

      • LibTraductor.rb, for language translation (same version as for JointPushPull and BezierSpline)

      • A subfolder OFS_Dircontaining the icons and cursors as well as the doc in PDF format
        The script works on a selection of edges and faces. It provides 2 modes of selection:

      • Explicit--> you select first and then start the tool

      • Implicit--> you start the tool with NO selection. Then by mouseover in the model, the script will select a surface
        There are several options, all explained in the doc, and some other details (like the question of inner and outer contours in selections). They are all available in the contextual menu or by toggle function keys (there is no dialog box):

      • F5 --> toggle between Outer, Inner and All contours of a surface

      • F6 --> generate as Group

      • F7 --> Treat surface as isolated from the rest of the model

      • F8 --> generate faces when offset is external

      • F9 --> generate contour as curves

      Finally there are numerous limitations, and surely many bugs. I have a list of things to improve, but I'll be grateful to the first users to give feedback.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Joint Push Pull Classic (Old version) - v2.2a - 26 Apr 17

      You need to simplify the generated contour with a simple method where you take 2 vertices in sequence and check whether the original and generated points of the second vertex are on the same side of the plane determined by the original and generated points of the first vertex (this plane being normal to their common face).
      If this is not the case, then you eliminate the vertex that has the smaller angle (this better preserves the original shape).

      Now to separate the contours as you wish is more complex, asyou need to make the faluty vertex a point of rupture, but then decide on which other point of the contour to connect it. This is certainly not intensive, especially if you have to do it on a surface, but surely possible.

      I am still wondering why the standard Sketchup Offset tool does not do that, as on a plane and with a compiled code, this should be much easier!

      posted in Plugins
      fredo6F
      fredo6
    • RE: Joint Push Pull Classic (Old version) - v2.2a - 26 Apr 17

      @fletch said:

      @ely862me said:

      wooooow, i want that offset tool :-O,it s a very usefull tool,until this i have to do the contour by hand on curved surfaces. U*re the man!!!

      UPDATE After searching i realised that isn t done yet,but i ll wait for it 😒 😄 😆

      ely862me,
      what are you talking about? it's out... avail. and works quite well! download it from the ruby repository 😉

      Well, the Offset on Surface tool will be published soon, I am just writing the doc.
      Not so easy actually as the variety of topologies in Sketchup is immense!
      Here is preview


      OffsetOnSurface Sample.jpg

      posted in Plugins
      fredo6F
      fredo6
    • RE: Joint Push Pull Classic (Old version) - v2.2a - 26 Apr 17

      Unfortunately the log does not seem to tell anything on the Ruby script itself, but only on the way it is called from Sketchup.
      I don't really know what I can do as I don't have your platform at hand.
      At least, you can maybe explore the idea of a conflict with other scripts and see if it improves.
      Can you confirm it crashes the same even with a simple model with one rectangular face that you would would extrude with any of the 3 Push Pull tools?

      Then, I would need help from the Mac Community of Sketchup users!

      posted in Plugins
      fredo6F
      fredo6
    • RE: Joint Push Pull Classic (Old version) - v2.2a - 26 Apr 17

      Thinkbuild,

      I did not test the version on Mac as I have no Mac myself, but I guess there are other users on this platform.
      I did not have reports on crash either since I published the script, but that does not mean nobody had any.
      The best at this stage is to post the model so that we can have a look

      posted in Plugins
      fredo6F
      fredo6
    • Unhide All edges

      Here is the dual of the script posted by Sorgesu (see http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=8568)
      It just unhide all edges of the model or the active group / components if it is opened.
      Menu item is in the Plugin menu

      Of course the same script can be derived to soften, unsoften, etc...


      UnhideAllEdges.rb

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Push/pull to work on 'unopen' groups

      Well! it depends if you want to do it on a plane or a 3D curved surface.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Push/pull to work on 'unopen' groups

      @a4chitect said:

      btw: why did you decide to have JPP work only on selected faces and not the way original PP tool works - first activate the tool and then confirm the on-mouse-over face by clicking on it?

      It's true that it would be more natural. I may actually do it in a next version.
      And this is what I am doing for the Offset on Surface script.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Push/pull to work on 'unopen' groups

      It is indirectly possible with the JPP script.

      In fact, because it would always be difficult to agree on what to do with a group or a component, what I did is to publish an API for the 3 kinds of JointPushPull where you specify the faces you want to act upon. It is documented in the tutorial.

      
      def JointPushPull.Api_call (type="J", selection=nil, distance=0, vector=nil, 
                                  finishing='K', borders='A', group=true, influence=true,
                                  angle=30.0)
      
      

      So all you need to do is to write a surrounding script that select the groups and the faces within the groups and then execute the JPP API.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Problem with input box displaying values

      For those interested in Windows-style dialog boxes (i.e. not Web dialogs), I had written a library Libtraductor.rbthat supports also language translation in dialog boxes and ease the checking of parameters (min, max, string patterns, ...). It also preserves defaults and previous values.

      I use it in Bezierspline and in JointPushPull (and actually in other unpublished scripts).

      Attached is the script, as well as a tutorial for programmers in English.

      Here is a snippet of the interface

      
      dlg = Traductor;;DialogBox.new title
      
      #Declaring fields, either string, numeric or unit-based numeric, or enumeration list;
      dlg.field_string symbol, label, default, validation_pattern
      dlg.field_numeric symbol, label, default, value_min, value_max
      dlg.field_enum symbol, label, default, enum_hash
      
      #Showing the dialog box;
      Hash_results = dlg.show hash_initial_values
      
      

      to drop in Skecthup Plugins folder


      Tutorial for Ruby script programmers

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Queston for Fred06 concerning BezierSpline tools

      This is possible, but remember that there is always an issue with the last segment, which cannot be made equal to the others mathematically, unless you changed the End point.

      Also, if your original curve is a Bezier or Spline curve, there are other ways to 'simplify' the curve, by playing with their Precision parameter.

      Attached is a small script BZ__Segmentor.rb, which draws a polyline with a given number of segments. Just drop if in the BZ_DIR folder. I do not provide an icon for it, but the menus should be fine.


      to drop in BZ_DIR folder

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

      @laxmarsk said:

      I am working on a little script that is moving groups or components based on offset values read from a txt file and saving the files again at the new location.

      Script is working but now I want to get things done without having to manually "select all".

      What I meant is that you do not need to select entities to perform your 'move' operations. Sketchup.active_model.active_entitiescontains all the entities of the model, and you can then apply your transformation to this list.

      For instance, if you want to move all objects of the model by an offset offset_vector (which you'll read from a file), then all you have to write is

      
      all_entities = Sketchup.active_model.active_entities   #all entities of the models
      t = Geom;;Transformation.translation offset_vector
      all_entities.transform_entities t, all_entities
      
      

      Now, if your problem is about the selection, Todd's and Didier's code will make it as a Select All.

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

      I guess you need to perform your loop exploration of entities on

      Sketchup.model.active_entities
      

      instead of

      Sketchup.model.selection
      

      This will be thus independent from the selection

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Unicode, UTF8 and Ruby

      @didier bur said:

      Bonjour Fredo,
      Le problème ne vient pas d'un fichier. J'ai des noms de matériaux à récupérer dans un modèle SketchUp, pour les re-exporter vers une feuille Excel. Quand tu récupère le nom d'un matériau pour une face f, f.material renvoie par exemple une chaîne s "béton". Quand tu écris cette chaîne dans le fichier Excel, par exemple fichier.puts(s) tu n'obtiens pas "béton", mais "béton", parce que les caractères accentués sont codés sur 2 octets au lieu d'un. Et Ruby n'a pas de méthode pour convertir de l'UTF8 en Unicode.

      Then, with the explanation from Todd, I understand why I had problem with the dialog boxes, as Windows does support UTF8.

      posted in Developers' Forum
      fredo6F
      fredo6
    • RE: Unicode, UTF8 and Ruby

      @didier bur said:

      Hi all,
      When I try to retrieve the name of a material (material.display_name) in a script, I have to translate it first with a LanguageHandler object and the materials.strings local file.
      This returns a string, from the prepared $mat_strings I have built with LanguageHandler.
      Of course sometimes french materials names have special characters in them: béton, plâtre, etc.
      When the script sends such strings to an output file, these characters are NOT converted, for instance the string "Matière 1" is output as "Matière 1".

      Didier,

      I am unclear of where are the French strings coming from in your exemple. Is it from a file? or from a constant definition?

      As Gaieus mentioned, in Ruby, it is careful to put a backslashbefore any character which is not straight ASCII, like many accentuated characters.
      So, to define a constant:
      Text = "b\éton"
      and not
      Text = "béton"
      Otherwise you may get an error when loading the script (but not always)

      This also works from and to the Ruby Console
      Now, I don't know what happens when reading and writing from files, as I never tried.
      Could you attach your files so that I try

      Thanks

      Fredo

      PS: The only things I noticed concerns the dialog boxes, where you have a different encoding and decoding of the accentuated characters, which makes the == comparison fail. This seems to be due to the fact that Sketchup uses Windows SDK dialog boxes, which have a different encoding method.

      posted in Developers' Forum
      fredo6F
      fredo6
    • 1 / 1