PyPrimeMesh Creating Triangular Faces vs. Workbench Mechanical Creating Quad Faces #953
-
I am looking to create a fully hex mesh for a simple angled plate, which I have attached the spaceclaim geometry file for. When I perform meshing in Workbench Mechanical, the mesher is easily able to create all hex elements, but when I try to use PyPrimeMesh, using the code below, some triangular elements are created on the base surface, which is not desirable. How can I force an all quad surface mesh, that is swept through the volume to create an all hex mesh. I have tried splitting the geometry in multiple smaller sections in hopes that it would be simpler to mesh and have also tried using multizone methods, along with going through the available examples, but have not found a solution yet that works. Please advise on how I should modify the code and thank you in advance! import os pv.global_theme.background = 'white' params = prime.ImportCadParams(model=model, print(model) Set the global sizing parameters after importing the modelmodel.set_global_sizing_params( Access the first part in the modelpart = model.parts[0] for label in part.get_labels(): Instantiate the volume sweepersweeper = prime.VolumeSweeper(model) Define the parameters for stackerstacker_params = prime.MeshStackerParams( Set up the necessary parameters for the generation of the base face.soft_size_control = model.control_data.create_size_control(prime.SizingType.SOFT) Create the base face, appending the the stacker mesh parameters.createbase_results = sweeper.create_base_face( Generate the quad-dominant surface mesh on the base face.mesh_util_controls = mesh_util.surface_mesh_with_size_controls( Use the
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Kevin-Yanik, Meshing the surface with quads for the volume sweeper approach you showed does not currently allow for mapped quad controls. To do this at present you may need to use the beta Multizone API and thin sweep setting. Please be aware that beta API's may change in future releases. For example you can try the following. You will need to modify the controls to be more precise to get exactly what you need but hopefully this can get you started.
|
Beta Was this translation helpful? Give feedback.
Hi @Kevin-Yanik,
Meshing the surface with quads for the volume sweeper approach you showed does not currently allow for mapped quad controls. To do this at present you may need to use the beta Multizone API and thin sweep setting.
Please be aware that beta API's may change in future releases.
For example you can try the following. You will need to modify the controls to be more precise to get exactly what you need but hopefully this can get you started.