4. Free Bodies#
"""Generating free bodies with NaxToPy"""
import NaxToPy as n2p
model = n2p.load_model(r"C:\Data\models\subcase\subcase_17500.op2")
# First, the n2pelements and n2pnodes are selected
node_list = [40210000, 40210600, 40210500, 40210400, 40210300, 40210200, 40210100, 40210700, 40220000]
n2pnodes = model.get_nodes(node_list)
element_list = [39900020, 39900022, 39900024, 39900026, 39900028, 39900029, 39900031, 39900018]
n2pelements = model.get_elements(element_list)
# the method needs for mandatory arguments: name, loadcase, nodes amd elements.
fb1 = model.create_free_body("FB-1", model.get_load_case(17500), nodes=n2pnodes, elements=n2pelements)
# it also have 3 optional arguments: increment, outpoint, coordsysout.
incr = model.get_load_case(17500).ActiveN2PIncrement
coord = model.new_coordinate_system("new_coord", (0,0,0), v1=(1,1,0), v2=(0, -1, 0))
fb2 = model.create_free_body("FB-2", model.get_load_case(17500), increment=incr, nodes=n2pnodes, elements=n2pelements,
outpoint=(1, 1, 1), coordsysout=coord)
pass
© 2025 Idaero Solutions S.L.
All rights reserved. This document is licensed under the terms of the LICENSE of the NaxToPy package.