sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Dividing Up a Window Frame

    Scheduled Pinned Locked Moved Plugins
    2 Posts 2 Posters 215 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rossthompson
      last edited by

      Hi,

      I work with a program for building analysis that imports simple SketchUp geometry (e.g buildings drawn with a single face to represent a wall).

      The problem is the export tool struggles with window frames. The window can't be drawn as an island inside the frame or it will cause the export to fail.

      The most effective work around is to add diagonal lines to break up the frame into simple pieces. See attached image.

      The ruby script for the exporter is scrambled so it can't easily be altered. But I was wandering if there was a way to develop a script that creates the diagonal lines automatically.

      I can think of two approaches:

      1. Identify the glass window pane by its material (or manual selection) and move it perpendicular to the frame. This way SketchUp automatically generates the diagonal lines I require. And the pane can then be moved back.

      2. Run a script that cycles through each vertex and checks for another vertex within a certain 'grab distance' (100mm sounds about right for most windows). A line could then be added between all vertices less than a certain distance apart and this should hopefully give the desired results.

      I hope this gives a clear explanation of the problem and any help would be greatly appreciated.

      Ross


      Capture.JPG

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        My SplitDonut with split the ring face at the corners...
        Note too that SplitSausage does the same for 'non-rings' - you need to 'seed' a short edge so the splits proceed as expected.

        To find 'rings' [faces with ONE hole] in a selection use a filter like:

        m=Sketchup.active_model;s=m.selection;f=s.grep(Sketchup;;Face).find_all{|e|e.loops.length==2};s.clear;s.add(f);
        

        You can then use SplitDonut on the selection en mass...
        The command you could add to the end of the above code to automate things is

        m=Sketchup.active_model;s=m.selection;f=s.grep(Sketchup;;Face).find_all{|e|e.loops.length==2};s.clear;s.add(f);TIG.splitdonut();
        

        To divide multi-holed faces you need to add a line to make one-hole 'rings' ...

        TIG

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement