Giter Site home page Giter Site logo

Comments (4)

xeolabs avatar xeolabs commented on July 24, 2024

Looks like an issue with web-ifc..

from xeokit-convert.

g-rodigy avatar g-rodigy commented on July 24, 2024

Yes, it is web-ifc issue, but i mean can skip element before fully reading his data?

from xeokit-convert.

xeolabs avatar xeolabs commented on July 24, 2024

If I understand correctly, we have no means to configure conversion to ignore certain IFC elements by ID. This seems to be a useful potential feature though, but outside of our priorities at the moment. If anyone has time for to make a PR, I'd consider merging that though.

from xeokit-convert.

g-rodigy avatar g-rodigy commented on July 24, 2024

Not by ID, by element type as is in the constructor excludeTypes. If I understand correctly code

function parseRelatedItemsOfType(ctx, id, relation, related, type, parentMetaObjectId) {
const lines = ctx.ifcAPI.GetLineIDsWithType(ctx.modelID, type);
for (let i = 0; i < lines.size(); i++) {
const relID = lines.get(i);
const rel = ctx.ifcAPI.GetLine(ctx.modelID, relID);
const relatedItems = rel[relation];
let foundElement = false;
if (Array.isArray(relatedItems)) {
const values = relatedItems.map((item) => item.value);
foundElement = values.includes(id);
} else {
foundElement = (relatedItems.value === id);
}
if (foundElement) {
const element = rel[related];
if (!Array.isArray(element)) {
const ifcElement = ctx.ifcAPI.GetLine(ctx.modelID, element.value);
parseSpatialChildren(ctx, ifcElement, parentMetaObjectId);
} else {
element.forEach((element2) => {
const ifcElement = ctx.ifcAPI.GetLine(ctx.modelID, element2.value);
parseSpatialChildren(ctx, ifcElement, parentMetaObjectId);
});
}
}
}
}

Firstrly take some element, then his releated elements and read their data, if element type is excluded then he skiped. The bug happen just in the place where the data is reading (.getLine(...)) for after checking type and other.

from xeokit-convert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.