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

    Face area - DC or ruby ?

    Scheduled Pinned Locked Moved Plugins
    6 Posts 3 Posters 1.2k Views 3 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.
    • V Offline
      vanderlm
      last edited by

      Hello all,
      Thanks for all the great resources they have been very helpful as I start to learn the world of ruby and dynamic components. I was wondering how to best approach a problem - whether through dynamic components or rubyscript...I have seen several examples of face area calculators but have yet to see one that digs into components. End goal: generate a report that summarizes face area according to material in each component (sensitive to scaling). Can this be done in DC? I noticed that the facearea function does not adjust if the component is scaled. Or am I better off trying to loop through components expanding on one of the ruby script snippets posted on this forum? any help would be much appreciated!
      mv

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        Hi Mike,

        Start with plain Ruby. Then you can re-use the code in a custom DC function, if desired.

        Just in case your search did not turn up Adam's solution for finding face area in nested components, while accounting for scale, see this post.

        Hi

        1 Reply Last reply Reply Quote 0
        • fredo6F Offline
          fredo6
          last edited by

          Vanderlm

          I think there exist some plugins that do area computation (among other things).

          Just in case, here is a ruby for computing areas recursively in the selection, by component and by material, with choice of units and CSV generation.
          to drop into the Sketchup plugins directory

          If this is to embed within a plugin of yours, feel free to take inspiration from the code.

          Fredo

          1 Reply Last reply Reply Quote 0
          • V Offline
            vanderlm
            last edited by

            Fredo and Jim -Thanks - very useful info and links! - I will explore and feedback
            mike

            1 Reply Last reply Reply Quote 0
            • V Offline
              vanderlm
              last edited by

              wow - just tried out the rb and it was exactly what I was looking for! I will follow up with any extensions I can incorporate from the suggested post - hugely helpful starting points!

              1 Reply Last reply Reply Quote 0
              • fredo6F Offline
                fredo6
                last edited by

                @vanderlm said:

                wow - just tried out the rb and it was exactly what I was looking for! I will follow up with any extensions I can incorporate from the suggested post - hugely helpful starting points!

                It is also possible to generate a HTML report, via a Web dialog or in a file.

                Fredo

                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