🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Mesh individual elements one at a time with different triangle edge length

User: "Sasha1296"
Altair Community Member
Updated by Sasha1296

Hello 

One thing I couldn't find in the manual is how to mesh different objects with different triangle edge lengths? 

What I am trying to do is mesh different objects differently because I have some large cubes that don't need a very fine mesh 

but I also have some cubes that are very small that need a much smaller mesh size

 

What I am trying to do is something like this based on a previous post: 

  

-- for loop that will create many cubes here base on index i

 

  temp_cube = project.Geometry:AddCuboid(cf.Point(x_pos_list, y_pos_list, 0), length_, length_, length_)

  MeshSettings = project.Mesher.Settings
  properties_m = MeshSettings:GetProperties()
  properties_m.MeshSizeOption = cf.Enums.MeshSizeOptionEnum.Custom
  properties_m.TriangleEdgeLength = SOME_STRING_BASED_ON_CUBE_SIZE  -- ex: '0.1' or '0.2', etc 
  MeshSettings:SetProperties(properties_m) 
  project.Mesher:Mesh(temp_cube)

 

-- end of for loop 

 

where the last command  project.Mesher:Mesh(temp_cube) only meshes the temp_cube in question and doesn't mesh any other objects

also I have access to the cube number in this loop in case that is useful

 

 

Find more posts tagged with