detach_faces
Disconnects the specified faces from the rest of the mesh. The points on the border between these faces and other faces in the mesh are duplicated and the faces are modified to reference the new points. If duplicate_all_border_points is checked, all the border is duplicated, and some points may be left isolated.
For example:
mesh
p0─────p1─────p2
│ │ │
│ f0 │ f1 │
│ │ │
p3─────p4─────p5
`duplicate_all_border_points`
│ │
▼ ▼
out_mesh out_mesh
p0─────p1 p6─────p2 p0─────p1 p6─────p8 p2
│ │ │ │ │ │ │ │
│ f0 │ │ f1 │ │ f0 │ │ f1 │
│ │ │ │ │ │ │ │
p3─────p4 p7─────p5 p3─────p4 p7─────p9 p5If faces is set to f1, then:
- Points p1 and p4 are duplicated and the duplicates are referenced by f1.
- The
detached_pointsare p2, p5, p6, and p7. - The
detached_border_pointsp2, p5, p6, and p7. detached_border_pointswill be different thandetached_pointsif there are faces completely inside the selection.
Inputs
mesh
The mesh to modify.
faces
An array containing the indices of the faces to detach.
properties
The names of geo properties to transfer to the new geometry, such as point_color. Make sure to include all geo properties that you want, including those that target components other than faces (such as points and face-vertices). Properties that are not geo properties are always transferred.
- Separate multiple geo property names with spaces.
- You can use the wildcard
*in expressions, for example,point_user*to transfer all geo properties that begin with the string "point_user". - The default value
*transfers all geo properties. - Use an empty string to prevent any geo properties from being transferred, except for those that are required by the mesh schema (
point_position,face_offset, andface_vertex). - Use a
*followed by a!to exclude a property. For example* !point_user*includes all properties, except ones that begin with the string "point_user"
duplicate_all_border_points
All points on the border are duplicated. See extrude_faces for an example of this usage.
Outputs
out_mesh
A new mesh object with the specified faces detached.
detached_points
The points referenced by the detached faces.
detached_border_points
The points along the detachment border.
