3MFConsortium / test_suites

This repository contains 3MF conformance test suites. Each test suite provides coverage for a specific combination of 3MF Core and Extension requirements.
BSD 2-Clause "Simplified" License
7 stars 0 forks source link

Displacement 3MF Editor validation Issues #95

Closed JimZuber closed 8 months ago

JimZuber commented 1 year ago

Using this issue to capture 3MF Editor Validation Errors some that we can accumulate them and make one fix rather than dealing with them on a on-off basis when is much more time consuming.....

1)Incorrect error message when finding an invalid did attribute value in a triangle or specified as a default in triangles Current: "ER_151: triangle with did 24 points to a non-existant displacement2d resource". Should Be: "ER_151: triangle with did 24 points to a non-existent disp2dgroup resource" and.. Current: ER_149: triangles with did 99 points to a non-existant displacement2d resource Should be: ER_149: triangles with did 99 points to a non-existent disp2dgroup resource

2)The work "existent" is misspelled in a number of error messages as "existant"

3)The validator ignores the did, d1, d2, d3, or d4 subements of triangle if it contains a namespace prefix (which it may or may not have). As a result we do not catch invalid did values or incorrect indexes if the namespace is present.

4)The check for scalar factor currently generates an error if it is less that zero. The correct criteria for failure should be zero or less and the error message should be revised as follows....

ER_175: Scalar product of xyz values for vertex (1.0, 0.5180606761608713, 1.0) and normvector (0.0, -1.0, 0.0) is zero or a negative value. Object 4 triangle index 10, scalar values pointed to by v1 and d1

JimZuber commented 10 months ago

A few additional items noticed what generating negative test cases....

-The editor did not appear to complain if the index for "n" in disp2dcoord what only off by 1. More than 1, you get an error message. We should also check other indices related to displacements for the same error.

-Many error types that involve incorrect references to vertices, triangles, displacement indices, and norm vectors also generate false errors related to scalar factor. I am guessing that the values used for calculating the scalar factor are initialized with zero, and when another error occurs that prevents these default values from being updated, the scalar factor calculation runs with the zero values resulting in false errors. Once fixed, we should go through all the negative test cases for displacements to validate these false errors do not occur.

JimZuber commented 10 months ago

Note that item 4 on the initial post (not treating 0 as an error in scalar factor) has been corrected and is implemented in the version of the editor available on github.

JimZuber commented 9 months ago

Change Error 133 "normvector whose module is less than 1" to a warning so that it can be disabled.

jordig100 commented 9 months ago

I would say normvector above or below 1.

JimZuber commented 9 months ago

3MF validation incorrectly complains about a path being in displacement2d if the model file is a non-root model files. See test 3224_01

JimZuber commented 8 months ago

Validations or fixes have been implemented in the 3MF Editor that address all of the gaps outlined in this issue