Skip to content

Polymesh.virtual_entities() returns incorrect Face3d #589

@mozman

Description

@mozman

Originally posted by chibai December 17, 2021
I'm trying to extract the basic element from a polyline(polyface)
But the vertices of the entity make me crazy
test.zip
test

from ezdxf import recover
from ezdxf.addons.drawing import matplotlib
# Exception handling left out for compactness:
doc, auditor = recover.readfile('test.dxf')
if not auditor.has_errors:
    matplotlib.qsave(doc.modelspace(), 'test.png')
for entity in doc.modelspace():
    if entity.dxf.handle == 'F6AC':
        e = list(entity.virtual_entities())[0]
        print(e.wcs_vertices())
skipped entity 3DFACE(#EC29). Reason: "invisible"
skipped entity 3DFACE(#EC2A). Reason: "invisible"
skipped entity 3DFACE(#EC2B). Reason: "invisible"
[Vec3(59416.31455091119, 21790.91531877725, 0.0), Vec3(59361.25307228302, 21813.84830555742, 0.0), Vec3(59380.16605928067, 21806.95449032696, 0.0), Vec3(0.0, 0.0, 0.0)]

The Vec3(0, 0, 0) if definitely not belong to the entity!

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