Skip to content

--transform fails on a file with no beams section, and exits 0 #229

Description

@webdevred

Problem

A jbeam file is not obliged to have a beams section. Classifying, sorting and renaming need none: only support classification reads beams, and its answer without them is that there are none.

transform instead fails the whole file:

$ cat n.jbeam
{
"testpart":{
    "nodes":[
        ["id", "posX", "posY", "posZ"],
        ["nl0", 0.9, -1.0, 0.1],
        ["nl1", 0.9, 0.0, 0.1],
    ],
},
}
$ jbeam-edit --transform n.jbeam
could not find fromList [ObjectIndex 0,ObjectKey "beams"]
$ echo $?
0

Three things are wrong. The file is left untouched, which is the actual defect. The exit code is 0, so a script or a batch run over a directory sees a success. And the message is a NodePath Show instance, which says nothing a user can act on.

A .bak.jbeam is written regardless, so it looks like something happened.

Expected

Skip support classification and transform the rest.

Note that this does not mean the file ends up with no support section. determineGroup' routes names ending in a letter to SupportTree before any beam is read, so a file with no beams can still have one. It is only the connectivity gate that has nothing to work with.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions