@structuralengineering/core
v0.0.4
Published
Open-source structural engineering primitives: schema, design checks, solver client
Downloads
33
Maintainers
Readme
@structuralengineering/core (TypeScript)
Open-source structural engineering primitives: Protocol Buffers schema, design-check implementations, validation layer, Connect solver client.
Part of the structuralengineering monorepo.
See the monorepo README for the full project overview.
Install
# From npm
npm install @structuralengineering/core
# Or from the internal GitLab Package Registry (same artefacts):
npm install --registry https://gitlab.superstructur.es/api/v4/projects/<ID>/packages/npm/ \
@structuralengineering/coreQuick start
import { checkTensionMember } from "@structuralengineering/core/checks/ec3/tensionMember";
import { CheckStatus } from "@structuralengineering/core/proto/structuralengineering/checks/v1/check_status_pb";
const response = checkTensionMember({
area: 5.38e-3, // m^2
fY: 235e6, // Pa
nEd: 1.0e6, // N
gammaM0: 1.0,
});
console.log(response.result?.status === CheckStatus.PASS); // true
console.log(response.nTRd); // 1.2643e6 (N)
console.log(response.result?.utilisation); // 0.7909Development
# From the monorepo root:
pwsh scripts/bootstrap.ps1 # Windows
./scripts/bootstrap.sh # bash / WSL
# Or manually from this directory:
npm ci
npm run gen # buf generate
npm run build # tsc -p tsconfig.build.json
npm test # vitest run
npm run lint # biome checkLicence
Apache License 2.0. See ../../LICENSE and
../../NOTICE.
