sketchucation logo sketchucation
    • Login
    1. Home
    2. wackywally
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    W
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    wackywally

    @wackywally

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    wackywally Unfollow Follow
    registered-users

    Latest posts made by wackywally

    • RE: Create arbitrary shape from list of points

      @tig said:

      Look at http://www.sketchup.com/intl/en/developer/docs/ourdoc/entities#add_faces_from_mesh

      Thanks for that TIG. I had a look at that and with my simple cube example, it did not quite give me the result i was hoping for. DO i need to manually join the other edges?

      http://i.imgur.com/FxA4R7em.png

      @dan rathbun said:

      Also look at how the SketchUp Team makes shapes in the Shapes plugin example:
      http://extensions.sketchup.com/en/content/shapes

      Thanks Dan. I have had a look at that and it seems to describe how to do basic shapes, however what I am looking at is a bit more complex (despite my example) and shaped more like a balloon, or a very irregular shape.

      posted in Developers' Forum
      W
      wackywally
    • Create arbitrary shape from list of points

      Hello all,

      I have an un-ordered lists of points that represent a shape in 3d, both on the edge and inside the shape. I am trying to use the API to draw that shape, filled in, and ignoring the points on the inside.

      I realise that this is no small task, but was hoping that you may be able to give me some pointers on where to start so i don't re-write parts of the API.

      I have been playing with polygon mesh and seeing if i could get it to just draw a cube, but i'm not getting the result i hoped for...no faces, just lines joining the 8 points.

      Thanks!

      test = Geom;;PolygonMesh.new
      	test.add_point([0,0,0])
      	test.add_point([0,0,1])
      	test.add_point([0,1,0])
      	test.add_point([0,1,1])
      	test.add_point([1,0,0])
      	test.add_point([1,0,1])
      	test.add_point([1,1,0])
      	test.add_point([1,1,1])
      	test.add_polygon(1,2,3,4,5,6,7,8)
      	test_gp = Sketchup.active_model.entities.add_group
      	test_gp.entities.add_face([0,0,0])
      
      posted in Developers' Forum
      W
      wackywally