Skip to content

Implement ability to compute moments of inertia - Ixx, Iyy, Izz #1453

Open
@nomad-vagabond

Description

@nomad-vagabond

In order to evaluate the physical properties of models, it is crucial to be able to compute the moments of inertia of the model and its sections - Ixx, Iyy, Izz. As of now, it is possible to get this information from OCC layer.

from OCP.GProp import GProp_GProps
from OCP.BRepGProp import BRepGProp

box_section_occ = cq.Workplane().box(1,1,1).faces("<Z").toOCC()

properties = GProp_GProps()
BRepGProp.SurfaceProperties_s(box_section_occ, properties)
matrix_of_inertia = properties.MatrixOfInertia()
        
Ixx, Iyy, Izz = matrix_of_inertia.Value(1,1), matrix_of_inertia.Value(2,2), matrix_of_inertia.Value(3,3)

Possible implementation - corresponding methods of the Sketch and Workplane.

Links to OCCT documentation:

Metadata

Metadata

Assignees

No one assigned

    Labels

    OCC featureRequires coding at OCC implementation levelenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions