    

 ## On this page

  

 

 # wrap

 Last update: 20.02.2026 

<a id="ansys.meshing.prime.lucid.Mesh.wrap"></a>

#### Mesh.wrap(min\_size=None, max\_size=None, growth\_rate=1.2, elements\_per\_gap=None, normal\_angle=18.0, input\_parts='\*', input\_labels='\*', keep\_inputs=False, region\_extract=WrapRegion.EXTERNAL, material\_point=None, extract\_features=True, create\_intersection\_loops=False, use\_existing\_features=False, enable\_feature\_octree\_refinement=True, feature\_angle=40.0, contact\_prevention\_size=None, number\_of\_threads=None, remesh\_postwrap=True, recompute\_remesh\_sizes=False, use\_existing\_size\_fields=False, size\_fields=None, wrap\_size\_controls=None, remesh\_size\_controls=None, feature\_recovery\_params=None, contact\_prevention\_params=None, leak\_prevention\_params=None)

Wrap and remesh the input.

The default behavior is to perform an external wrap of all parts in the model using curvature sizing and extracting features. The wrap is then remeshed to provide a surface mesh for the extracted region.

Geodesic sizing is used only if soft and curvature controls are set. If contact prevention size is set and geodesic sizing is available, contact detection is used globally.

If minimum and maximum sizes are provided, variable size mesh is generated between the minimum size and maximum size by applying sizes based on curvature.

If either minimum size or maximum size is provided, constant size mesh is generated with the provided size.

If neither minimum size or maximum size is provided, global minimum and maximum settings are used to generate a variable size mesh based on curvature.

- **Parameters:**
    
    **min\_size**: Minimum edge length of the mesh. The default is `None`.
    
    **max\_size**: Maximum edge length of the mesh. The default is `None`.
    
    **growth\_rate**: Growth rate. The default is `1.2`.
    
    **elements\_per\_gap**: Global proximity size control elements per gap with self proximity. The default is `None`.
    
    **normal\_angle**: Global curvature size control normal angle. The default is `18.0`.
    
    **input\_parts**: Parts to wrap. The default is `"*"`.
    
    **input\_labels**: Labels to wrap. The default is `"*"`.
    
    **keep\_inputs**: Whether to retain inputs. The default is `False`.
    
    **region\_extract**: Region to wrap. The default is `prime.WrapRegion.EXTERNAL`.
    
    **material\_point**: Material point if the region extraction method is set to material point. The default is `None`.
    
    **extract\_features**: Whether to extract feature edges using the feature angle. The default is `True`.
    
    **create\_intersection\_loops**: Whether to create intersection loops between all parts. The default is `False`.
    
    **use\_existing\_features**: Whether to maintain existing features on parts. The default is `False`.
    
    **enable\_feature\_octree\_refinement: bool, optional**: Whether to apply refinement to feature edges during the wrap. The default is `True`.
    
    **feature\_angle**: Angle to use for extracting features. The default is `40.0`.
    
    **contact\_prevention\_size**: Global proximity size controls between all parts. The default is `None`.
    
    **number\_of\_threads**: Number of threads. The default is `None`.
    
    **remesh\_postwrap**: Whether to remesh the wrap. The default is `True`.
    
    **recompute\_remesh\_sizes**: Whether to recompute sizes from global controls using the wrap surface. The default is `False`.
    
    **use\_existing\_size\_fields**: Whether to use precomputed size fields. The default is `False`.
    
    **size\_fields**: List of size fields to use. The default is `None`.
    
    **wrap\_size\_controls**: List of wrap size controls to use. The default is `None`.
    
    **remesh\_size\_controls**: List of remesh size controls to use. The default is `None`.
    
    **feature\_recovery\_params**: List of feature recovery parameters to use. The default is `None`.
    
    **contact\_prevention\_params**: List of contact prevention parameters to use. The default is `None`.
    
    **leak\_prevention\_params**: List of leak prevention parameters to use. The default is `None`.
- **Returns:**
    
    `Wrapped` `part`: Returns Part.

### Examples

```pycon
&gt;&gt;&gt; import ansys.meshing.prime as prime
&gt;&gt;&gt; from ansys.meshing.prime import lucid
&gt;&gt;&gt; prime_client = prime.launch_prime()
&gt;&gt;&gt; model = prime_client.model
&gt;&gt;&gt; mesh = lucid.Mesh(model)
&gt;&gt;&gt; mesh.read("/my_geometry.stl")
&gt;&gt;&gt; mesh.wrap(min_size=1, max_size=20, create_intersection_loops=True)
&gt;&gt;&gt; mesh.write("/mesh_output.pmdat")
&gt;&gt;&gt; prime_client.exit()

```