Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with IFC to XKT Conversion Resulting in Reduced Model Sizes #129

Open
crisav opened this issue Feb 9, 2024 · 0 comments
Open

Issue with IFC to XKT Conversion Resulting in Reduced Model Sizes #129

crisav opened this issue Feb 9, 2024 · 0 comments

Comments

@crisav
Copy link

crisav commented Feb 9, 2024

Description

We are encountering an issue where the conversion of IFC files to XKT format results in a significant reduction in the physical size of the models. This is particularly problematic for our application, which is designed to support both IFC and XKT model formats. When loading both the original IFC model and its XKT counterpart, there is a noticeable discrepancy in their physical dimensions. This difference adversely affects the use of measurement tools within the application, leading to inaccurate dimensions. For instance, a wall that measures 12 feet in the original IFC model might only measure approximately 4 feet in the XKT version. This issue is not isolated; several IFC files experience a much more substantial reduction in size when converted to XKT.

Impact

The disparity in model sizes between the original IFC files and their XKT conversions significantly impacts the accuracy of our application's measurement tools. This makes it challenging to maintain the integrity of spatial measurements, which is crucial for our users who rely on precise dimensions for planning, analysis, and execution of projects.

Steps to Reproduce

  1. Convert an IFC model to XKT format using the convert2xkt function
  2. Load both the original IFC model and the converted XKT model into the application.
  3. Use the DistanceMeasurementsPlugin from xeokit to compare the dimensions of identical elements within both models. This plugin is our standard tool for measuring distances in the application.

Expected Behavior

The conversion process should preserve the original physical dimensions of the IFC model, ensuring that the XKT model reflects accurate sizes and measurements.

Actual Behavior

The converted XKT models exhibit a significant reduction in physical size compared to their original IFC counterparts, leading to inaccuracies in measurements and dimensions within the application.

Possible Solution

Any insights or suggestions on maintaining the original scale and dimensions during the IFC to XKT conversion process would be greatly appreciated.

Additional Context

  • We are utilizing the DistanceMeasurementsPlugin from xeokit for distance measurements in our application. The inaccuracies in model dimensions directly impact the effectiveness of this tool.
  • The conversion is performed using the following asynchronous function:
    async function convertIFCFile(filePath, fileName) {
      return new Promise((resolve, reject) => {
        convert2xkt({
          WebIFC,
          source: filePath,
          output: `${fileName}.xkt`,
          log: (msg) => {
            console.log(msg);
          }
        }).then(
          async () => {
            console.log('Converted.');
            const xktPath = `${fileName}.xkt`;
            resolve(xktPath);
          },
          (errMsg) => {
            console.error(`Conversion failed: ${errMsg}`);
            reject(errMsg);
          }
        );
      });
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant