sketchucation logo sketchucation
    • Login
    1. Home
    2. driven
    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 43
    • Posts 2,966
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: [REQ] Delete groups with just groups in them

      you should have mentioned revit, before my computer broke…

      it's possibly quicker as this one was really for working with unknown skp files...

      in the ifc cleanup script I target the wrappers first by type name…

      there's some excerpt's I posted on the SketchUp forum, showing adding materials, moving some to layers and hiding, etc…

      hopefully I can rescue my hard drive as I haven't made a backup for ages…

      john

      posted in Plugins
      D
      driven
    • RE: 3Dconnexion's SpaceMouse, CadMouse & Packed Pixel Combo

      unfortunately, after testing with the new driver successfully in SU, I noticed an overall slowdown of my entire system…

      it continued getting worse, so I tried uninstalling the driver and it locked up my system…

      in fact it wiped it out…

      I can't boot that mac up after 3 hrs with apple trying to help…

      it has all my SU dev work on it, so I hope it's recoverable at a reasonable cost...

      I should of sold the ****** thing…

      john

      posted in Hardware
      D
      driven
    • RE: 3Dconnexion's SpaceMouse, CadMouse & Packed Pixel Combo

      thanks for the info John, the March driver seems to have resolved both the memory leak and the turning off...

      I had by then packed mine back in it's box and was contemplating selling it on...

      it would have been prudent for support to email those who had reported issues and maybe made an announcement on a few forums...

      sorry for the thread hi-jack Mike...

      john

      posted in Hardware
      D
      driven
    • RE: [REQ] Delete groups with just groups in them

      this is stripped out of one of mine and may still have a few 'extras' you don't need...

      it explodes the edgeless groups and removes the coplanar edges from the faces...

          # digs deep into nesting and removes stuff...
            model    = Sketchup.active_model
            defs     = model.definitions
            ents     = model.active_entities
      
            ##########################
            model.start_operation('Clean Import')
            # remove unwanted support geometry
      			ents.grep(Sketchup;;SectionPlane){|sp| sp.erase!}
      			ents.grep(Sketchup;;ConstructionPoint){|cp| cp.erase!}
      			ents.grep(Sketchup;;ConstructionLine){|cl| cl.erase!}
      
            ents.find_all do |e|
              # keep any raw geometry...
              next if e.class == Sketchup;;Edge or e.class == Sketchup;;Face
              # remove previous 'sections cuts' ...
              e.erase! if !e.layer.visible? or e.definition.name.include?('-Section')
              next unless e.valid?
      
              # remove hidden geometry
              ents.erase_entities(e) if e.respond_to?(;hidden?) and e.hidden?
              next unless e.valid?
      
              if  e.class == Sketchup;;ComponentInstance || e.class == Sketchup;;Group
      
      					  # sub-groupings
      						gents = e.entities if e.class == Sketchup;;Group
      						gents = e.definition.entities if e.class == Sketchup;;ComponentInstance
      
      						# remove unwanted nested support geometry
      						gents.grep(Sketchup;;SectionPlane){|sp| sp.erase!}
      						gents.grep(Sketchup;;ConstructionPoint){|cp| cp.erase!}
      						gents.grep(Sketchup;;ConstructionLine){|cl| cl.erase!}
      						# remove coplaner edges...
      						gents.grep(Sketchup;;Edge) do |e|
      							e.erase! if  e.valid? &&
                    e.soft? &&
                    e.faces.length == 2 &&
                    e.faces[0].normal.dot(e.faces[1].normal)>0.9999999999999
      						end
      						next if e.deleted?
      
      			  # grps without edges contain only sub-grps...
                  if gents.grep(Sketchup;;Edge) == []
      						  # exploding non_manifold, allows same context compares, but you loose the hierachy
      						  if !e.manifold?
      						    e.explode
      						  end
      						  next if e.deleted?
      						end
              end # e.class
            end # ents.find_all do
      
            model.commit_operation # 'Clean Import'
      
      

      john

      posted in Plugins
      D
      driven
    • RE: [REQ] Delete groups with just groups in them

      a quick reply

      						# grps without edges contain only sub-grps...
                  if gents.grep(Sketchup;;Edge) == []
      						  # exploding non_manifold, allows same context compares, but you loose the hierachy
      						  if !e.manifold?
      						    e.explode
      						  end
      						  next if e.deleted?
      

      I'll have a look at your skp later...

      john

      posted in Plugins
      D
      driven
    • RE: 3Dconnexion's SpaceMouse, CadMouse & Packed Pixel Combo

      I reported this back on the 5th November 2015...

      [CASE:71137] SketchUp Plugin Error messages... [3DCX-20151102-0018]

      after a couple of emails from tech support, the dialog continued on a another private forum, but without resolve...

      their are a number of other mac users reporting issues on the 'official' forum...

      some refer to the deficiency of in the support for mac with at least one returning product...

      My main concern has always been the inability to turn the product off after installing the software...

      john

      posted in Hardware
      D
      driven
    • RE: 3Dconnexion's SpaceMouse, CadMouse & Packed Pixel Combo

      hi Mike,
      do you ever encounter the massive memory leak that locks up SU when using 3Dconnexion products?

      @John,

      the mac plugin is badly implemented, can't be 'turned off' and only recourse is to remove all it's files...

      my SpaceMouse sit's unused in it's box...

      john

      posted in Hardware
      D
      driven
    • RE: [PLUGIN] Click-Cuisine Kitchen IKEA

      @bilgilib said:

      ...It is not really nice to pay for a next.gen virus 😞

      if you purchase a plugin that needs to go online to check for new components, updates, license or anything, then you need to inform your anti virus software that it's ok...

      'anti' virus software always presumes guilt without actually doing any real 'testing', it simply looks at list's it has from you or people that pay them for whitelisting...

      john

      posted in Plugins
      D
      driven
    • RE: Jaggies On The Web Page

      @ntxdave said:

      ...raster scales better than vector. That is one of the major advantages of raster.

      you have that completely the wrong way round...

      vectors are 'infinitely' scalable, raster has a fixed size [jpg, png, tiff are all raster]...

      jpg should only used for photo's, it can't cope with text or line work on white backgrounds...

      both png and tif offer better quality and can be optimised for the web using free tools like 'optipng' [does many formats]...

      @Joe, export big and hi-rez, optimise but don't change the size, use the web page to scale the image to fit...

      for a forum restricting size is important, but for your own site, with so few images there's little to worry about...

      broadband speeds can cope...

      what you see in your browser, is most likely a separate issue, check your browser setting and/or do one of the online browser graphics performance tests...

      BTW: it looks ok on my mac...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Creating Arcs: Interesting Problem, why?

      does it work if just use ruby?

      john

      posted in Extensions & Applications Discussions
      D
      driven
    • RE: Uploading Renderings

      after 'upload attachment' and 'add file' there's are further options to add a comment and to 'place inline'...

      A lot of people miss this step, but I think it's a better 'User Experience'...

      john

      posted in Newbie Forum
      D
      driven
    • RE: Preventing add_curve curves exploding...

      I'll post the code here, because it's where I searched for a solution first and couldn't find one...

      one down...

      I striped out the colouring but left the selection add, as a progress bar substitute...

      # with Tig's advice from PM ...
      model = Sketchup.active_model
      sel   = model.selection
      ents  =  model.active_entities
      view  = model.active_view
      mats  = model.materials
      
      # cylindrical sine wave pair on a unit radius with 24 sides...
      wave = [[1.0, 0.0, 0.0], [0.9659258262890683, 0.25881904510252074, 0.050799999999999984], [0.8660254037844387, 0.49999999999999994, 0.08798818102449896], [0.7071067811865476, 0.7071067811865475, 0.1016], [0.5000000000000001, 0.8660254037844386, 0.08798818102449898], [0.25881904510252096, 0.9659258262890682, 0.05080000000000003], [6.123233995736766e-17, 1.0, 1.2442411479337108e-17], [-0.25881904510252063, 0.9659258262890683, -0.05079999999999998], [-0.4999999999999998, 0.8660254037844388, -0.08798818102449893], [-0.7071067811865475, 0.7071067811865476, -0.1016], [-0.8660254037844385, 0.5000000000000003, -0.087988181024499], [-0.9659258262890682, 0.258819045102521, -0.050800000000000047], [-1.0, 1.2246467991473532e-16, -2.4884822958674216e-17], [-0.9659258262890684, -0.25881904510252035, 0.05079999999999989], [-0.8660254037844388, -0.4999999999999998, 0.08798818102449892], [-0.7071067811865479, -0.7071067811865471, 0.1016], [-0.5000000000000004, -0.8660254037844384, 0.08798818102449903], [-0.25881904510252146, -0.9659258262890681, 0.05080000000000014], [-1.8369701987210297e-16, -1.0, 3.267705224142925e-17], [0.2588190451025203, -0.9659258262890684, -0.050799999999999915], [0.4999999999999993, -0.866025403784439, -0.08798818102449889], [0.7071067811865475, -0.7071067811865477, -0.1016], [0.8660254037844384, -0.5000000000000004, -0.08798818102449901], [0.9659258262890681, -0.2588190451025215, -0.05080000000000014], [1.0, 0.0, -0.0]]
      
      # waves have an additional point to complete the circle...
      segments = wave.length - 1
      
      # single undo
      model.start_operation('wave')
      
      # Make the empty 'container' group.
      container = ents.add_group()
      cont_ents = container.entities
      
      # add the empty surf_grp() to cont_ents
      surf_grp  = cont_ents.add_group()
      surf_ents = surf_grp.entities
      
      # Add Surface soft edges and faces using offset points...
      i = 0
      segments.times do
        f = surf_ents.add_face(ORIGIN, wave[i], wave[i + 1])
        view.refresh
        f.edges.each{|e|
          e.soft="true"
          e.smooth="true"
          sel.add(e)
        }
        i += 1
        view.refresh
      end
      
      # add the wave to cont_ents...
      cont_ents.add_curve(wave)
      
      # and explode the surface faces...
      surf_grp.explode
      sel.clear
      model.commit_operation
      
      
      

      EDIT: after getting the other working using add_face I made a few adjustment to this code...

      john

      posted in Developers' Forum
      D
      driven
    • Preventing add_curve curves exploding...

      or repairing...

      I posted this on the 'official' site but know quite a few only visit here...

      @unknownuser said:

      Using entities.add_curve(points_array) will return a continuous selectable curve...

      If you add this curve to a surface it remains a continuous selectable curve...

      if you add a 'surface' to the curve it becomes a series of disconnected edges, but each edge still reports as being a curve...

      this occurs for surfaces formed from the curve to a centre point or between two curves...

      the gif shows a demo from the script attached...

      I have tried many ways of grouping, moving, exploding in different sequences, but they all result exactly the same as this one...

      I looked at many welding scripts, but they either fail to work, are buggy or spend a lot of effort 'looking' for an edge array...

      As already have original point arrays, is there a way to remedy this splitting of the curses highlighted in the gif...

      surface between two curves...

      # script to aid in disscussion of welding surface edges...
      model = Sketchup.active_model
      sel   = model.selection
      ents  =  model.active_entities
      view  = model.active_view
      mats  = model.materials
      
      # cylindrical sine wave pair on a unit radius with 24 sides...
      wave = [[1.0, 0.0, 0.0], [0.9659258262890683, 0.25881904510252074, 0.050799999999999984], [0.8660254037844387, 0.49999999999999994, 0.08798818102449896], [0.7071067811865476, 0.7071067811865475, 0.1016], [0.5000000000000001, 0.8660254037844386, 0.08798818102449898], [0.25881904510252096, 0.9659258262890682, 0.05080000000000003], [6.123233995736766e-17, 1.0, 1.2442411479337108e-17], [-0.25881904510252063, 0.9659258262890683, -0.05079999999999998], [-0.4999999999999998, 0.8660254037844388, -0.08798818102449893], [-0.7071067811865475, 0.7071067811865476, -0.1016], [-0.8660254037844385, 0.5000000000000003, -0.087988181024499], [-0.9659258262890682, 0.258819045102521, -0.050800000000000047], [-1.0, 1.2246467991473532e-16, -2.4884822958674216e-17], [-0.9659258262890684, -0.25881904510252035, 0.05079999999999989], [-0.8660254037844388, -0.4999999999999998, 0.08798818102449892], [-0.7071067811865479, -0.7071067811865471, 0.1016], [-0.5000000000000004, -0.8660254037844384, 0.08798818102449903], [-0.25881904510252146, -0.9659258262890681, 0.05080000000000014], [-1.8369701987210297e-16, -1.0, 3.267705224142925e-17], [0.2588190451025203, -0.9659258262890684, -0.050799999999999915], [0.4999999999999993, -0.866025403784439, -0.08798818102449889], [0.7071067811865475, -0.7071067811865477, -0.1016], [0.8660254037844384, -0.5000000000000004, -0.08798818102449901], [0.9659258262890681, -0.2588190451025215, -0.05080000000000014], [1.0, 0.0, -0.0]]
      rev_wave = wave.reverse
      #
      outer_wave = []
      rev_wave.each{|pt| outer_wave << [pt[0], pt[1], pt[2] + 0.1]}
      #
      inner_wave = []
      outer_wave.each{|pt| inner_wave << [pt[0] * 0.5, pt[1] * 0.5, pt[2]]}
      
      # single undo
      model.start_operation('Wave', false, false, false)
      
      # add colors to watch the order of construction...
      mat_names = []
      mats.each{|n| mat_names << n.name}
      	mats.add('inner').color   = 'skyblue'    unless mat_names.include?('inner')
      	mats.add('outer').color   = 'seashell' unless  mat_names.include?('outer')
      
      # Make the empty 'wave' group.
      wave_grp = ents.add_group()
      
      # Make array to hold entities...
      wave_ents = wave_grp.entities
      
      # Add outer points to inner points for the radial pairs...
      radial = outer_wave.zip(inner_wave)
      radial_edges = radial.each {|pr|
        e = wave_ents.add_edges(pr)
        e[0].soft="true"
        e[0].smooth="true"
      	# for watching only
        sel.add(e)
      	view.refresh
      }
      sel.clear
      
      # Add  outer points to offset inner points for the diagonal pairs...
      diagonal = outer_wave.zip(inner_wave[0..-2].unshift(inner_wave[-1]))
      diagonal_edges = diagonal.each {|pr|
        e = wave_ents.add_edges(pr)
        e[0].soft="true"
        e[0].smooth="true"
        e[0].casts_shadows = false
      	# for watching only
        sel.add(e)
      	view.refresh
      }
      sel.clear
      
      # Add the inner 'curve' and face created between curve, radial and diagonal edges...
      inner_edges = wave_ents.add_curve(inner_wave)
      i = 0
      inner_edges.each {|e|
      	e.find_faces
      	f = e.faces[0]
      	i += 1
      	# for watching only
      	f.material = 'inner'
        sel.add(f)
      	view.refresh
      }
      sel.clear
      #
      outer_edges = wave_ents.add_curve(outer_wave)
      	i = 0
      	outer_edges.each {|e|
      	e.find_faces
      	f = e.faces[0]
      	i += 1
      	# for watching only
      	f.material = 'outer'
        sel.add(f)
      	view.refresh
      }
      sel.clear
      
      sel.add(inner_edges, outer_edges)
      
      model.commit_operation
      

      another gif...

      surface from centre point to curve...

      If I run Curvisard or Reweld on the selected 'curves' after making them, they are repaired almost instantly...

      However, they spend time looking for the 'edges' and I already have those...

      I tried one version where I called Reweld::recurve_curve but it's quite buggy and adds geometry in a very odd fashion that can bugsplat...

      I couldn't fathom how to link into Curvisard which is much more common and very reliable...

      I would prefer to do it directly in the code, but can't find a way to achieve this...

      john

      posted in Developers' Forum
      D
      driven
    • RE: Uploading Renderings

      Upload attachment?

      are you having issues with that feature?

      john

      posted in Newbie Forum
      D
      driven
    • RE: Let's Talk About Export Graphics: PNG, JPG, TIFF...

      @blackdogsketch said:

      ... It doesn't seem that YOU are doing it to reduce image export time.

      if it was too me...

      overall, you reduce the export time mainly by splitting out the shadows from the textures and any raster line work...

      here's a realtime export of a simple model...

      ignore the fact it's crammed so small for the gif, the shadows were 4000px wide, line work 2000 and 3000 texture 2000

      ignore the plugin resizing the window, I just added my code in it to save some time coding...

      I also used a vivid background because I was doing all the post in code and it made it easier...

      but the principle is the same for manually making these...

      have x number of style and one scene per view...

      for each scene export an image, sized depending on the style... i.e. shadow style was biggest because I wanted the most control over it...

      you may need to cmodel by DaveR

      john

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Let's Talk About Export Graphics: PNG, JPG, TIFF...

      for my two pence, on raster exports, I would always use .tiff as first choice, .png second and never jpg...

      tiff is native and highly optimised on 99.9% of all computers as it's a standardized format for 'fax machines' and scanners... [so they've had a long time to get it right]

      although the files are bigger, they are often faster to process...

      For exporting to post production, I would always export image sets to combine in post...

      shadows, edges, texture, etc.. can each be at different scales to improve quality of some and speed up others...

      there are many post on this concept and a few plugins that can help...

      if you can supply a sample model it would be easier to advise...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Missing faces after save

      does it vanish with an 'save as' or with export, it's a bit tricky if we can't see what's vanishing...

      what Layer was it on? was it in walls?

      more ?'s than answers a.t.m, sorry...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Missing faces after save

      I can't easily find anything hidden, but suspect you are drawing on layers other than Layer0...

      if it's drawn on a layer and grouped to another layer, it will disappear when either the drawing 'layer'
      or the 'groups layer are toggled off...

      it is easy to loose things that way, there are hundreds of threads about it...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Missing faces after save

      the best idea is to upload the skp file...

      john

      posted in SketchUp Discussions
      D
      driven
    • RE: Problem to draw a cone at rectangular base

      standard tools...

      move and scale...

      john

      posted in Newbie Forum
      D
      driven
    • 1 / 1