Skip to content

[BUG] Inconsistant units possible between line and linecode? #469

@John-Boik

Description

@John-Boik

In create_dss_object, for linecodes, several lines similar to the following appear:

    linecode.r1 = linecode.r1 / _convert_to_meters[linecode.units]
    linecode.x1 = linecode.x1 / _convert_to_meters[linecode.units]

Similar equations are also used when creating lines. Apparently in PMD, if units is not given for a linecode, then the multiplier defaults to 1.0 and a units=m is set for the linecode. But when units is not given for linecode, DSS apparently looks to the definition of units on lines that use the linecode, to determine what the units for linecode should be. Isn't it true that in the PMD parser, there would be an inconsistency in values if units for linecode is not given, but is given for lines that use the linecode, and these units are not meters?

If so, part of the solution might be to search for all lines that use a linecode when creating the linecode and units is not given. If all such lines have at most one unique value for units, then that is the value that the linecode should have. If lines are created after linecodes, then the search and any units changes might be more complicated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions