sketchucation logo sketchucation
    • Login
    1. Home
    2. gpavlidi
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
    G
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Exploding group removes material from a face

      Thanks slbaumgartner, this is what I thought too.
      Can an admin maybe move this to the 'Report a Bug' subforum?
      Maybe some SU folks out there will notice.

      posted in Developers' Forum
      G
      gpavlidi
    • Exploding group removes material from a face

      Hi all,

      I 've encountered this issue where when I am exploding a group, it causes one of the Faces to lose its material, although it doesnt belong in the group.
      Is that an expected behavior, or is this a bug?

      Btw, the reason I am inserting each face, via a group that I explode, is because some of these faces might have holes, and carving out the holes, and then exploding the group is the most robust way I 've found so far that works.

      Thanks,
      Yanis

      Code snippet:

      inner = [[211.304795230314, 59.3387335473855, 144.121274015103], [198.016313479612, 93.8459200290483, 144.121274015103], [198.016313479612, 93.8459200290483, 209.586476052542], [211.304795230314, 59.3387335473855, 209.586476052542]]
      outer_right = [[123.368393800971, 287.689711452616, 222.214015434512], [124.599206984753, 284.49356753989, 222.214015434512], [124.599206984753, 284.49356753989, 7.04087985299685], [123.368393800971, 287.689711452616, 7.04087985299685]]
      outer_bottom = [[123.368393800971, 287.689711452616, 0.0], [123.368393800971, 287.689711452616, 7.04087985299685], [124.599206984753, 284.49356753989, 7.04087985299685], [278.931403899607, -116.27229864223, 7.04087985299685], [280.16221708339, -119.468442554957, 7.04087985299685], [280.16221708339, -119.468442554957, 0.0]]
      outer_left = [[278.931403899616, -116.272298642254, 222.214015434512], [280.16221708339, -119.468442554957, 222.214015434512], [280.16221708339, -119.468442554957, 7.04087985299685], [278.931403899607, -116.27229864223, 7.04087985299685]]
      outer_top = [[121.306929034951, 293.042869957925, 227.414539710024], [201.765305442185, 84.110634448818, 323.731055308166], [282.223681849419, -124.821601060289, 227.414539710024], [282.223681849419, -124.821601060289, 222.214015434512], [280.16221708339, -119.468442554957, 222.214015434512], [278.931403899616, -116.272298642254, 222.214015434512], [278.931403899616, -116.272298642254, 227.414539710024], [201.765305442185, 84.110634448818, 314.768300386351], [124.599206984753, 284.49356753989, 227.414539710024], [124.599206984753, 284.49356753989, 222.214015434512], [123.368393800971, 287.689711452616, 222.214015434512], [121.306929034951, 293.042869957925, 222.214015434512]]
      
      # place a textured inner face
      temp_group = Sketchup.active_model.entities.add_group
      inner_face = temp_group.entities.add_face inner
      material = Sketchup.active_model.materials.add "Test Material"
      material.color = 'red'
      inner_face.material = material
      temp_group.explode
      
      # place bounding faces
      temp_group = Sketchup.active_model.entities.add_group
      outer_right_face = temp_group.entities.add_face outer_right
      temp_group.explode
      
      temp_group = Sketchup.active_model.entities.add_group
      outer_bottom_face = temp_group.entities.add_face outer_bottom
      temp_group.explode
      
      temp_group = Sketchup.active_model.entities.add_group
      outer_left_face = temp_group.entities.add_face outer_left
      temp_group.explode
      
      temp_group = Sketchup.active_model.entities.add_group
      outer_top_face = temp_group.entities.add_face outer_top
      temp_group.explode
      
      # inner_face has lost it's material
      inner_face.material.nil?
      
      
      posted in Developers' Forum
      G
      gpavlidi
    • 1 / 1