Skip to main content

NextFEMpy

NextFEM REST API wrapper in pure Python, to be used with NextFEM Designer or NextFEM Server. It is a complete set of REST API call, wrapped in Python functions, distinguishing between mandatory and optional arguments.

If you're looking for NextFEMpy source, look into /nextfempy folder. If you're looking for sample code using nextfempy, look into /samples folder.

Installation instructions

pip install nextfempy

Upgrading instructions

pip install nextfempy --upgrade

Usage

Before using with your local installation of NextFEM Designer, start the plugin REST API Server.

from nextfempy import NextFEMrest
# connect to local copy of NextFEM Designer
nf=NextFEMapiREST.NextFEMrest()

To handle a property:

nf.autoMassInX=False
print(str(nf.autoMassInX))

To call a NextFEM API method:

nf.addOrModifyCustomData("test","Test")
print(nf.getCustomData("test"))

Sample code

A simple 3D frame using REST API. Remember to start the plugin REST API Server in NextFEM Designer.

import os
from nextfempy import NextFEMrest

# current dir, to be used eventually to save model
dir = os.path.dirname(os.path.realpath(__file__))
# connects to the open instance of NextFEM Designer with REST API server plugin running on your machine
nf=NextFEMrest()

# clear model
nf.newModel()
# material and section
mat=nf.addMatFromLib("C25/30"); print("Mat="+str(mat))
cSect=nf.addCircSection(0.2)
bSect=nf.addRectSection(0.2,0.2)
# nodes
n1=nf.addNode(0,0,0); n2=nf.addNode(0,0,3)
n3=nf.addNode(3,0,0); n4=nf.addNode(3,0,3)
n5=nf.addNode(0,3,0); n6=nf.addNode(0,3,3)
n7=nf.addNode(3,3,0); n8=nf.addNode(3,3,3)
# beams
b1=nf.addBeam(n1,n2,cSect,mat); b2=nf.addBeam(n3,n4,cSect,mat)
b3=nf.addBeam(n2,n4,bSect,mat)
b4=nf.addBeam(n5,n6,cSect,mat); b5=nf.addBeam(n7,n8,cSect,mat)
b6=nf.addBeam(n6,n8,bSect,mat)
b7=nf.addBeam(n2,n6,bSect,mat); b8=nf.addBeam(n4,n8,bSect,mat)
# restraints
nf.setBC(n1,True,True,True,True,True,True)
nf.setBC(n3,True,True,True,True,True,True)
nf.setBC(n5,True,True,True,True,True,True)
nf.setBC(n7,True,True,True,True,True,True)
# loading
nf.addLoadCase("sw"); nf.setSelfWeight("sw")
nf.addLoadCase("perm"); nf.addLoadCase("var")
# floorload type
print(nf.setFloorLoad("floor1","perm",-2.5,0,0,1)); print(nf.setFloorLoad("floor1","var",-3,0,0,1))
# floor plane on beams - nodes 2,4,8,6
print("Apply loading plane: " + str(nf.addFloorPlane("floor1",2,n2,n4,n8,n6)))

# analysis: run all loadcases and print outcome
print(nf.RunModel())
nf.refreshDesignerView(0,True)

Metadata

Release files for nextfempy 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nextfempy 0.5.2
File Size Uploaded Provenance Actions
nextfempy-0.5.2.tar.gz 56.6 kB Without provenance Details for nextfempy-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nextfempy 0.5.2
File Interpreter ABI Platform Actions
nextfempy-0.5.2-py3-none-any.whl Python 3 none any Details for nextfempy-0.5.2-py3-none-any.whl

Total release size: 112.8 kB

Release files / nextfempy-0.5.2.tar.gz

Download URL nextfempy-0.5.2.tar.gz
Size 56.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ee4af3758de7aa2ece2b467b20cb262e9d0acff9c9dad3ee8304d926595fc860
BLAKE2b-256 checksum
How to use checksums
7e66be35e98ea006283b0bd56c59074ae78a201fdc48729a157f747b3e450062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / nextfempy-0.5.2-py3-none-any.whl

Download URL nextfempy-0.5.2-py3-none-any.whl
Size 56.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d16c2f787a97bc5c28e3c56613ca545b91cfa3ab51746a56433762af5c8b525
BLAKE2b-256 checksum
How to use checksums
0556408e67ee8978b4f61e06a4a36ce84dabb8f92ebbab38ab87afcc7c93e8e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for nextfempy 0.5.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page