Roblox UtilitiesDevlHub Roblox Documentation

Class

PartOperation

Memory category
Instances
Subclasses
3

An abstract class that all parts based on solid modeling inherit from.

An abstract class that all parts based on solid modeling inherit from.

Properties 4#

RenderFidelityRenderFidelityThe level of detail used to render the solid modeled part.ReadSafe
SmoothingAnglefloatAn angle in degrees which affects the smooth shading of a solid modeled part.ReadSafe
TriangleCountintThe number of polygons in this solid model.Write: RobloxEngineSecurityReadSafe
UsePartColorbooleanSets whether the PartOperation can be recolored using inherited color properties.ReadSafe

RenderFidelity: RenderFidelity#

ReadSafe

This property determines the level of detail that the solid modeled part will be shown in. It can be set to the possible values of the RenderFidelity enum except for Performance.

The default value is Automatic, meaning the part's detail is based on its distance from the camera as outlined in the following table.

Distance From Camera Render Fidelity
Less than 250 studs Highest
250-500 studs Medium
500 or more studs Lowest

SmoothingAngle: float#

ReadSafe

This property represents an angle in degrees for a threshold value between face normals on a solid modeled part. If the normal difference is less than the value, normals will be adjusted to smooth the difference. While a value between 30 and 70 degrees usually produces a good result, values between 90 and 180 are not recommended as they may cause a "shadowing" effect on unions with sharp edges.

Note that smoothing does not affect the normals between different materials or different colors.

TriangleCount: int#

Write: RobloxEngineSecurityReadSafe

The number of polygons in this solid model.

UsePartColor: boolean#

ReadSafe

Sets whether the PartOperation can be recolored using the BasePart.Color or BasePart.BrickColor properties. When true, the entire union will be colored as per Color or BrickColor. When false, the parts in the union will maintain their original colors from before the onion operation was performed.

Methods 1#

SubstituteGeometrySubstitutes the geometry of this PartOperation with the geometry of another PartOperation.

SubstituteGeometry(source: Instance): ()#

Substitutes the geometry of this PartOperation with the geometry of another PartOperation. This makes it easier to utilize the geometry of a solid modeling operation like UnionAsync(), SubtractAsync(), or IntersectAsync() but maintain properties, attributes, tags, and children of the main part such as Attachments, Constraints, ParticleEmitters, light objects, decals, and more. This approach also circumvents the potential "flicker" of completely replacing the original PartOperation with another.

Note that if you're calling this method on a PartOperation with child Attachments or Constraints, you should calculate the affected instances with CalculateConstraintsToPreserve(), then drop those whose recommended parent is nil.

NameTypeDefaultDescription
sourceInstanceThe PartOperation whose geometry will substitute the geometry of this PartOperation.
Returns
  • ()

Inherited members#

Inherited from TriangleMeshPart 4
Inherited from BasePart 106
Inherited from PVInstance 4
Properties (2)

Origin, Pivot Offset

Methods (2)

GetPivot, PivotTo

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed

Subclasses 3#