sketchucation logo sketchucation
    • Login
    1. Home
    2. Davidfi1
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    D
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 13
    • Posts 79
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: [Plugin] 3D Text Editor

      Hi.
      Thank you for very useful plugin.

      I want to report a small bug in the plugin.
      The bug is in "Camera facing components" (see attached example 3D Text Bug.skp)

      If I try to edit the text inside this component -
      the new text is moved to face the camera - without the component moving.

      You can see very funny mistakes if try to edit while not facing the camera 😄

      P.S I am using Sketchup 2015 15.3.331 64-bit on win 7 & EI 11.

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      @jim said:

      @davidfi1 said:

      What should the next feature be?
      If you have an idea, I will be very happy to try implementing it.

      Animate a model of a cnc machine from the gcode.

      Did you try to import CNC G-Code?
      Can you explain what was the problem?
      Do you have an idea how it should work if it was working correctly?

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      What should the next feature be?
      If you have an idea, I will be very happy to try implementing it.

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      Version 0.0.9
      New in Importer:
      Will put a Attribute with the value of speed from the imported G-Code in the
      "filament" & "MotorMove" components
      Change the Z scale of the "filament" component according to the amount of
      extruded filament in the imported G-Code
      New in Exporter:
      Export to the G-Code the Attribute of speed as was imported by the importer.
      Export the Extruded length according to the Z scale of the "filament" component

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      Version 0.0.8
      Added to the exporter the ability to connect "unconnected" components
      so now if a component is deleted - the exporter will just put a link to the
      first component of the disconnected chain

      posted in Plugins
      D
      Davidfi1
    • RE: Best way to save variabls in an ini

      @tig said:

      If the text is 'fixed', but occasionally editable by the user to customize settings, then a file named 'Gcode.ini' could be kept with the .RB file: the user edits that and your code reads its contents as it loads.

      The text is 'fixed' for a single 3D printer.
      But one user mey have more then one printer.

      @aerilius said:

      but load evals in the top level namespace, so you would have to use constants like DFI1::GCode::File_header to access you plugin's namespace (no local variables, no global variables).

      Well, I put the load File.join(File.dirname(FILE),'Gcode.ini')
      inside the class GcodeExporter - and it works - no need for "::" just use the constants.

      That doesn't mean it is good practice nor that it will work in future versions of sketchup
      but - 1)it works. 2) it is very simple 3) it gets the job done quickly

      posted in Developers' Forum
      D
      Davidfi1
    • RE: Best way to save variabls in an ini

      @aerilius said:

      Ruby reads files independent of the line endings

      Ok - If you go to simple solution of using the ruby mechanisem
      Then - why not just use the ruby "load"?
      to load the ini file...
      load File.join(File.dirname(FILE),'Gcode.ini')

      # Put Heder of the G-Code file here;
      Gcode_Exporter_File_Heder = "
      ;Gcode Exporter File Heder Line 1          
      ;Gcode Exporter File Heder Line 2          
      ;Gcode Exporter File Heder Line 3          
      "  # End of "Gcode_Exporter_File_Heder"
      
      Gcode_Exporter_Layer_Heder = "
      ; Gcode Exporter Layer %s Heder          
      " # End of "Gcode_Exporter_Layer_Heder"
      
      Gcode_Exporter_Layer_Futer = "
      ; Gcode Exporter Layer %s Futer 
      "
      
      Gcode_Exporter_File_Futer  = "
      ;Gcode Exporter File Futer
      "
      
      posted in Developers' Forum
      D
      Davidfi1
    • RE: Best way to save variabls in an ini

      @tig said:

      If you explain better what you'd like to do [rather than how you think you could do it!], then it might help us all get to a sensible solution..

      This is what I want to save:

      @davidfi1 said:

      1. "File header" lines
      2. "File footer" lines
      3. "Layer header" lines
      4. "Layer footer" lines

      1-4 are each a few lines of text that needs to be inserted before and after sections of other text instruction that are generated from the sketchup module.

      In my G-Code exporter http://sketchucation.com/forums/viewtopic.php?f=323&t=50067
      the code outputs a line of G-Code for each component named "filament"
      The lines/components/filament/Gcode are grouped by layers.
      Before and after each layer and the hole file a constant list of lines needs to be added.
      These lines are what I want to save in the file.

      so what I need is:

      @davidfi1 said:

      I want to enable easy editing of the lines in a text editor
      and an easy way to read these variables to ruby.

      posted in Developers' Forum
      D
      Davidfi1
    • RE: Best way to save variabls in an ini
      1. Is it possible to have multi line key ?
      2. Can this code read an ini file made with CR+LF by a notepad on a PC? (since the testRead.ini is only CR )
      posted in Developers' Forum
      D
      Davidfi1
    • Best way to save variabls in an ini

      Hi all.
      What is the best way to save multi line text in the ini file?

      I want to enable easy editing of the lines in a text editor
      and an easy way to read these variables to ruby.

      Gcode.ini will be the file name & for now I would like to save in it :

      1. "File header" lines
      2. "File footer" lines
      3. "Layer header" lines
      4. "Layer footer" lines
      posted in Developers' Forum
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      Version 0.0.7
      Now we have a G-Code Exporter of the previously imported G-Code in the plugin menu.
      So I changed the name to GcodeTools ... (please delete the old one)
      The new exporter is a very simple assuming that in the next versions will be
      adding all the needed features to make it usable

      • so please let me know what need's to be fixed!.
      posted in Plugins
      D
      Davidfi1
    • RE: Finding start and end point of a component

      This
      @tig said:

      (pt1.transform!(tr) and pt2.transform!(tr))

      worked very nicely.

      Thank you.

      posted in Developers' Forum
      D
      Davidfi1
    • Finding start and end point of a component

      I need to find the two points of the top line inside an instance of a component.
      At first it looked like an easy task, but when I tried actually doing it,
      I found out it is not that easy.
      sampleTest
      I need to run a ruby script and get the [x,y,z] of the points that are measured.

      can you help pleas?

      Thank you.

      posted in Developers' Forum
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      @antoninoion said:

      I'm getting the following error in the ruby console every time I start SU and it doesn’t show the G-code file type in the import file types list:

      GcodeImporterVer0.0.6.rb:38: warning: Object#type is deprecated; use Object#class

      I installed the plugin through the "Preferences/Extensions/Install Extension" option. I have SU V8.0.16845 for Mac, any idea on what I should do?

      Thanks
      Antonio

      I found the problem - fixing it soon.
      change line 38 from:
      if @ent.type == Sketchup::Edge
      to:
      if @ent.class == Sketchup::Edge

      But wait for more testing - I will post a fix soon
      Thank you.

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      New Version 0.0.6 posted
      Thank you.

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      @dan rathbun said:

      Line 117:
      Line 135:

      # wait forever
      > while 1==1 do 
      > end # while 1
      > 
      

      That is dangerous! It could lock up SketchUp if an error occurs, causing file handles to remain open.

      will do.
      Thank you.

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      Dan.
      Thank you, you are very helpfull.
      I don't really know what to do with these errors in the G-Code I am getting.
      It is not even correct to say they are errors at all.
      I use the ruby console as a very simple "information console"
      There is nothing to do with these "errors" just know about them...

      If somone don't want to see these messages he could just close the console.

      In the following versions I will not open the ruby console at all.

      Thank you again.
      David.

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      Uploaded vertion 0.0.5.
      Include impruvment to speed and rendering

      Please let me know if you like it 😄

      posted in Plugins
      D
      Davidfi1
    • RE: [PlugIn] 3D Printers G-Code importer/Exporter Ver0.0.9

      OK Guys - Thank you.
      I fixed the code according to your suggestions in the next version
      I added a "last version" load to the loader and updated the version number.
      Waiting for yor remarks befor moving on.

      I am thinking about how to implement a "G-Code exporter"
      I need to figure out a way to keep the unused G-Code lines.
      The adding of these lines will enable the exporter to put these lines
      back to the exported G-Code.

      posted in Plugins
      D
      Davidfi1
    • RE: Help with transformation

      Posted the first vertion of the importer at
      http://sketchucation.com/forums/viewtopic.php?f=323&t=50067

      posted in Developers' Forum
      D
      Davidfi1
    • 1
    • 2
    • 3
    • 4
    • 1 / 4