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

    Topics

    • liquid98L

      Draw cpoint on face

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      275 Views
      liquid98L
      TIG, Thanx for your answer, it completely elucidates my question.
    • liquid98L

      No tabs possible in text?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      7
      0 Votes
      7 Posts
      125 Views
      liquid98L
      Thanks guys. It seems this is a PC only bug. So far no reason to buy a mac..
    • liquid98L

      How to save dxf file with embedded thumbnail image?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      9
      0 Votes
      9 Posts
      3k Views
      Dan RathbunD
      Could be a job for ImageMajik ?? Embedding encoded thumbnails INTO the file, will bloat the filesize.
    • liquid98L

      [plugin/code] get global coordinates, the brute force way

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      4
      0 Votes
      4 Posts
      1k Views
      A
      Here's a piece of code I've written for the new project to get stuff from groups/components. Maybe you'll find it useful: # ------------------------------------------------------------------------------ # # Anton Synytsia # anton.synytsia@gmail.com # # ------------------------------------------------------------------------------ module MSPhysics module Group # @!visibility private VALID_TYPES = [Sketchup;;Group, Sketchup;;ComponentInstance].freeze # @!visibility private INVALID_TYPE = 'The specified entity is not a group or a component!'.freeze module_function # Get entities of a group/component/definition. # @param [Sketchup;;Group, Sketchup;;ComponentInstance, Sketchup;;ComponentDefinition] ent # @return [Sketchup;;Entities, NilClass] # @since 1.0.0 def get_entities(ent) case ent when Sketchup;;Group, Sketchup;;ComponentDefinition ent.entities when Sketchup;;ComponentInstance ent.definition.entities else nil end end # Get all edges of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Array<Geom;;Point3d>>] An array of edges. Each edge # represents an array of two points. # @since 1.0.0 def get_edges(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end edges = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) edges.push *get_edges(e, true, true) next end next unless e.is_a?(Sketchup;;Edge) edge = [] e.vertices.each { |v| edge.push v.position } edges.push edge } if transform == true edges.each { |edge| edge.each { |pt| pt.transform!(ent.transformation) } } end edges end # Get vertices from all edges of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Geom;;Point3d>] An array of points. # @since 1.0.0 def get_vertices_from_edges(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end pts = [] verts = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) pts.push *get_vertices_from_edges(e, true, true) next end next unless e.is_a?(Sketchup;;Edge) e.vertices.each { |v| verts.push(v) unless verts.include?(v) } } verts.each { |v| pts.push v.position } if transform == true pts.each { |pt| pt.transform!(ent.transformation) } end pts end # Get all faces of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Array<Geom;;Point3d>>] An array of faces. Each face # represents an array of points. # @since 1.0.0 def get_faces(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end faces = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) faces.push *get_faces(e, true, true) next end next unless e.is_a?(Sketchup;;Face) face = [] e.vertices.each { |v| face.push v.position } faces.push face } if transform == true faces.each { |face| face.each { |pt| pt.transform!(ent.transformation) } } end faces end # Get vertices from all faces of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Geom;;Point3d>] An array of points. # @since 1.0.0 def get_vertices_from_faces(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end pts = [] verts = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) pts.push *get_vertices_from_faces(e, true, true) next end next unless e.is_a?(Sketchup;;Face) e.vertices.each { |v| verts.push(v) unless verts.include?(v) } } verts.each { |v| pts.push v.position } if transform == true pts.each { |pt| pt.transform!(ent.transformation) } end pts end # Get all construction points and lines of a group/component. # @param [Sketchup;;Group, Sketchup;;ComponentInstance] ent # @param [Boolean] recursive Whether to include all the child groups and # components. # @param [Boolean] transform Whether to give points in global coordinates. # @return [Array<Geom;;Point3d>] An array of points. # @since 1.0.0 def get_construction(ent, recursive = true, transform = true) unless VALID_TYPES.include?(ent.class) raise INVALID_TYPE end pts = [] get_entities(ent).each { |e| if VALID_TYPES.include?(e.class) and (recursive == true) pts.push *get_construction(e, true, true) next end if e.is_a?(Sketchup;;ConstructionPoint) pts.push e.position elsif e.is_a?(Sketchup;;ConstructionLine) pts.push(e.start) unless e.start.nil? pts.push(e.end) unless e.end.nil? end } if transform == true pts.each { |pt| pt.transform!(ent.transformation) } end pts end end # module Group end # module MSPhysics
    • liquid98L

      Best way to iterate all nested entities

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      29
      0 Votes
      29 Posts
      6k Views
      dkendigD
      yes, generally this tends to do the trick, but we found that it was a tad faster to have your own lookup table that keeps track of definition relevance. The only downside, is that you are at the mercy of the observer system in that case, but the observers these days seem fairly stable, so that isn't currently an issue.
    • liquid98L

      Namespace question on noob level

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      16
      0 Votes
      16 Posts
      371 Views
      liquid98L
      Off topic: @unknownuser said: (1) The word useful has only 1 "L", by the way. thanx for your correction, the English language is not my mother language as you might have noticed.. /Off topic All code is safe now and my code works like a charm, so thanx for your help. And yes I SHALL read the book before I come here and ask questions like this..
    • liquid98L

      [Plugin] Debug tool: run lastloaded ruby

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      1
      0 Votes
      1 Posts
      3k Views
      No one has replied
    • liquid98L

      Boolean: how do I 'outershell' multiple groups/components?

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      12
      0 Votes
      12 Posts
      947 Views
      Dan RathbunD
      @liquid98 said: good guess! that's the plan indeed. I did not guess ... I can read your mind (scary music: [Oooo ooOOooo ooooo]) No actually, I read your sample code in the post of 17 MAR ... the first two lines you are opening a skp file, within the code. In that post, you wrote: @liquid98 said: But the script I'm writing is for internal use. Is this to be used within a commercial setting (for commercial work.) ??
    • liquid98L

      Component definition --&gt; save insertion_point

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      4
      0 Votes
      4 Posts
      243 Views
      liquid98L
      TIG,
    • liquid98L

      Small question about rescaling components

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      10
      0 Votes
      10 Posts
      546 Views
      sdmitchS
      @guntis.rat said: did this ever got resolved? Apparently not, at least as far as the free version of Sketchup is concerned. The Reset Scale option is available in the context menu if only one component is selected. You are welcome to try my plugin, Scale Reset, which seems to have been the solution for the problem liquid98 had.
    • liquid98L

      Plugin to create all possible lines between points

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      6
      0 Votes
      6 Posts
      316 Views
      liquid98L
      Sam, Well, I'm supposed to know the use of the ; but i forgot.. Again thanx for your help. The Math part was easier than the constructionpointarraycreation.
    • liquid98L

      Screw thread tutorial

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Tutorials sketchup
      9
      0 Votes
      9 Posts
      13k Views
      J
      Hi there, I'm trying to fight myself through this tutorial but I get stuck where the bolt is joined with the thread. When I create a bolt with a radius that matches exactly the distance between origin and the left edge of the thread profile I loose a lot of faces when doing a union of bolt and thread using the boolean tools (ocscoolean doens't work for me in make 2015 edition) How is this supposed to be done? Thanks for your help. Jens AutoSave_screw try 9.skp
    • liquid98L

      Tutorial needed?

      Watching Ignoring Scheduled Pinned Locked Moved SketchUp Tutorials sketchup
      12
      0 Votes
      12 Posts
      2k Views
      irwanwrI
      @dave r said: Not "threats", threads. I do something different for machine threads as compared to those for woodcrews.
    • liquid98L

      Save user data on a per file basis

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      6
      0 Votes
      6 Posts
      267 Views
      liquid98L
      Thnx for the luck, mitcorb !
    • liquid98L

      User feedback: looking for alternative to screen notes

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      3
      0 Votes
      3 Posts
      228 Views
      liquid98L
      Hi Chris, Thanx for your help ! Indeed, the problem arises when there is no geometry. The plugin I'm writing gives feedback on the scale-factor that an object is scaled with. When you press the scale-up button the object is scaled up with a factor. Then the scale-factor is presented to the user as a screen-note. The user can scale up as much as he wants to, and the screen-note will refresh accordingly. Then, when the 'scale-down at once button' is pressed, the object is scaled down to its original proportions and the screen-note gets deleted. But there arises a problem with a scaled up object and the corresponding screennote. In case the object is deleted ,so there is no geometry, the screen-note is still active. And I can find no way to correct this. Thnx, Liquid
    • liquid98L

      Question about code on SU-forum

      Watching Ignoring Scheduled Pinned Locked Moved Newbie Forum sketchup
      4
      0 Votes
      4 Posts
      195 Views
      GaieusG
      This one? http://gaieus.hu/ hehe. Thanks. Nice but first of all, simple! Does not need too much maintenance. Maybe a gallery would spice it up though... ?)
    • liquid98L

      [Plugin] Boolean helper update 08122011

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      77
      0 Votes
      77 Posts
      38k Views
      B
      Hi, I don't know if this plugin is still being worked on but I'm unable to scale down a model after saving it. The message I get is "Scale up your model first, and then use the 'Scale down at once' button" Using SU2016 if that makes a difference.
    • liquid98L

      Good way to test a script

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      8
      0 Votes
      8 Posts
      552 Views
      liquid98L
      @pixero said: Here's a topic I started with some good info about debugging scripts: http://forums.sketchucation.com/viewtopic.php?f=180&t=34052 That's a really useful thread indeed, thnx
    • liquid98L

      Change location of the plugins folder in SU8

      Watching Ignoring Scheduled Pinned Locked Moved Plugins
      17
      0 Votes
      17 Posts
      4k Views
      gtalaricoG
      I am almost regretting doing this... I wish the SU team would add way to load an "external" plugin library. I really want to have my plugins in my Dropbox so I have them all sync in all computers that I use for sketchuping. Most plugins seem to work, but I have noticed a few that don't. Every time I open Sketchup I get all these errors! PS: I still haven't replaced the "find_support_file". Error Loading File I:/_Library/SketchUp/_Plugins/Artisan/artisan_load.rb (eval):3641:in join': can't convert nil into StringError Loading File I:/_Library/SketchUp/_Plugins/artisan_loader.rb (eval):3641:in join': can't convert nil into StringError Loading File I:/_Library/SketchUp/_Plugins/c-midpoint.rb I:/_Library/SketchUp/_Plugins/c-midpoint.rb:196: syntax error, unexpected kEND, expecting $endError Loading File I:/_Library/SketchUp/_Plugins/camera-cameraslidecontrols.rb no such file to load -- smustard-app-observer.rbError Loading File I:/_Library/SketchUp/_Plugins/CameraKeyMaker/camera_key_maker.rb no such file to load -- bezier.rbError Loading File I:/_Library/SketchUp/_Plugins/cameraKeyMaker.rb no such file to load -- bezier.rbError Loading File I:/_Library/SketchUp/_Plugins/q-parking.rb I:/_Library/SketchUp/_Plugins/q-parking.rb:137: syntax error, unexpected tCONSTANT, expecting '{' BEGIN CHANGES BY organizerEdit.rb ^ I:/_Library/SketchUp/_Plugins/q-parking.rb:149: syntax error, unexpected tCONSTANT, expecting '{' END CHANGES BY organizerEdit.rb ^Error Loading File I:/_Library/SketchUp/_Plugins/zzz-SU_Podium_Browser_loader.rb (eval):361:in `small_icon=': can't convert nil into String
    • liquid98L

      Replace components

      Watching Ignoring Scheduled Pinned Locked Moved Developers' Forum
      5
      0 Votes
      5 Posts
      578 Views
      liquid98L
      Hi Tig, Thanks I'll do some more study until I get what you suggested and come back here
    • 1
    • 2
    • 1 / 2