New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@parametricos/bcf-js

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@parametricos/bcf-js

BCF.js is a BIM Collaboration Format (BCF) reader & parser.

  • 0.2.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
88
increased by131.58%
Maintainers
2
Weekly downloads
 
Created
Source

BCF-js

Bcf-js is a BIM Collaboration Format (BCF) reader & parser.

This fork was made to read and write both BCF 2.1 and 3.0 versions.

Find it on npmjs.com https://www.npmjs.com/package/@parametricos/bcf-js

Getting Started

To install the library use: npm install @parametricos/bcf-js or yarn add @parametricos/bcf-js

Using the library

For BCF-XML 3.0:

import { BcfReader, BcfWriter } from '@parametricos/bcf-js';

For BCF-XML 2.1:

import { BcfReader, BcfWriter } from '@parametricos/bcf-js/2.1';

Reading a file:

  const file = "some_bcf_file.bcf"

  const reader = new BcfReader();
  
  await reader.read(file);

  const project = reader.project
  
  project.markups.forEach((markup) => {
    console.log(markup.topic);
  })

  // See ./test/BasicReadExample.js for more examples

Writing a project:

  const bcfProject: IProject = {
    ...
  }
  
  const savePath = "./test-data/bcf3.0/Writer/WriteTest.bcf"

  const writer = new BcfWriter();
  
  const content = await writer.write(bcfproject)
  fs.writeFile(savePath, content, (err) => {})

  // See ./test/BasicWriteExample.js for more examples

Contribution

There's a few ways to contribute to this project and improve it:

  1. Fork the project repository and make your first pull request
  2. Submit sample BCF and it's linked IFC files in the 'test' folder
  3. Test it and create Issues so that we can start working on them

License

BCF-js is licensed under the Mozilla Public License 2.0. Please read the LICENSE file in this repository for more details.

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc