• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Creating a Solid with a set of points

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 3 Posters 623 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.
  • M Offline
    medeek
    last edited by 8 Dec 2015, 04:40

    I'm sure someone has asked this question before but my ignorance with SketchUp has me asking anyways. I normally create a solid in my plugin by specifying a face and the using the pushpull feature to make it 3D. However for more complex geometry it would be easier to just specify a set of 3D points that are the vertices of the intended solid and have SketchUp generate it that way. Is such a thing possible?

    Nathaniel P. Wilkerson PE
    Medeek Engineering Inc
    design.medeek.com

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 8 Dec 2015, 11:57

      Yes. ☀
      For example see my Extrude tools or Fredo's CurviLoft...
      BUT, your code needs to break down the face creation into bite-sized chunks.
      Because All the points defining one face will need to be coplanar.
      Three points always are coplanar.
      Making all the edges and then adding faces to them is likely to create unexpected 'internal' facets etc, so you need a clear plan of attack before starting...
      Also to bear in mind is making faces with holes in them can become complex [e.g. perhaps make the face in the hole then the donut then delete the hole]

      TIG

      1 Reply Last reply Reply Quote 0
      • S Offline
        slbaumgartner
        last edited by 8 Dec 2015, 12:32

        Since this is in the developers' forum, also have a look at the PolygonMesh class in the Ruby API.

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 8 Dec 2015, 16:18

          If you make the timber parts as extrusions that are pushpulled square-ended objects, then you can always 'miter' the splayed ends after that.
          You can determine a suitable length vector to offset some vertices along the main plane of the truss's booms.
          Use this for spaying one end at a time:
          entities.transform_entities(translation_transformation, vertices_array)
          or collect all of the needed vectors [if they differ] and their matching vertices, and do it in one go:
          entities.transform_by_vectors(vertices_array, vectors_array)

          Alternatively... consider adding a temporary canted face [or 3d block], inside a group [positioned and angled to intersect the end of the boom etc] and use "intersect_with" that with the boom. With some code you can see that part of that boon lies 'behind' the face and erase those edges, thus trimming the end off etc, as if using the solid-tools themselves...

          TIG

          1 Reply Last reply Reply Quote 0
          • M Offline
            medeek
            last edited by 8 Dec 2015, 16:18

            Specifically I am working on my Truss Plugin so that I can create hip rafters. Common rafters are easy since I just draw the profile and then pushpull it to create the 3D geometry. Hip rafters are slightly more of a challenge because of the beveled cuts at the intersection with the ridge and the fascia. I've thought about using the solid editing features of SketchUp but that would limit my plugin to only those users of the PRO version of the software so that is a no-go.

            A typical hip rafter at the fascia would look something like this:

            http://design.medeek.com/images/misc/HIP_RAFTER1.jpg

            Manually I can create this geometry by drawing lines on the appropriate faces, then deleting the new faces and lines created and then finally closing the solid. However this process does not lend itself so easily to something I can code.

            I appreciate any suggestions on the matter. For now I'm somewhat stumped.

            Nathaniel P. Wilkerson PE
            Medeek Engineering Inc
            design.medeek.com

            1 Reply Last reply Reply Quote 0
            • M Offline
              medeek
              last edited by 8 Dec 2015, 16:27

              Wow, I need to come here more often. I'm going to look into the "intersect_with" method further and see if this might not be the key to overcoming this hurdle.

              Nathaniel P. Wilkerson PE
              Medeek Engineering Inc
              design.medeek.com

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

              Advertisement