Skip to content

Import asc: Exclude nodata values for mesh creation - #1020

Open
tsimader wants to merge 2 commits into
domlysz:masterfrom
tsimader:tesselation_branch
Open

tsimader wants to merge 2 commits into
domlysz:masterfrom
tsimader:tesselation_branch

Conversation

@tsimader

@tsimader tsimader commented Dec 11, 2025 •

Copy link
Copy Markdown

I tried to work on the following "#TODO" comment for the operator for importing asc-files.

            for x in range(0, ncols, step):
                # TODO: exclude nodata values (implications for face generation)
                if not (self.importMode == 'CLOUD' and coldata[x] == nodata):

In my case, nodata filtering didn’t work because nodata is declared as float, while coldata[x] was a str in my case, so the comparison returned False.
To address this, I restructured the logic so that nodata vertices are kept initially, and any faces referencing a nodata vertex are removed later in the process.
This approach worked for my ASC file, but it still needs more testing to confirm that it behaves correctly across different datasets.

@grant-otto

Copy link
Copy Markdown

This worked for my ASC as well! Thank you for fixing this!!

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

Successfully merging this pull request may close these issues.

2 participants