sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Count faces by material?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 125 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.
    • D Offline
      draftomatic
      last edited by

      Hello everyone.

      Just wanted to ask if there's already a routine out there to count the faces in a model by material or material name. I can write it myself but I thought I'd ask if there's already a plugin that can do it since I just need it to debug a model.

      Thanks!

      EDIT: Let me clarify that it should get all entities, including those inside components (i.e. should look at every face in the entire model), and should also search upward for parent materials for faces that are nested in groups (i.e. if a face has the default material but its parent has the material in question, it should be counted). So it's a little tricky but still seems like something someone out there must have done before.

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        This post has code:

        • New Material Methods! (With bugs 😞 )Do not forget to check the back_material

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • D Offline
          draftomatic
          last edited by

          Thanks Dan.

          I'd be willing to bet that save_delete_material method doesn't actually search all the faces, only those in the top-level definitions. I had thomthom help me a long time ago to write a recursive function to iterate ALL the faces, so I think I'll piece this together from that...

          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