Skip to content

Unexpected Error Triggered by show() Call Before transformGeometry #1892

@huskier

Description

@huskier

An unusual issue occurs in the following code: if show(cube_result_1) is executed before transformGeometry, it raises the error OCP.Standard.Standard_ConstructionError: gp_GTrsf::Trsf() - non-orthogonal GTrsf. However, if the show(cube_result_1) call preceding transformGeometry is commented out, the program runs as expected.

import cadquery as cq
from cadquery.func import *
from cadquery.vis import show
import math

angle=45/180.0*math.pi;

cube_result_1 = box(w=10, l=10, h=10, centered=False)

transform_matrix_3 = cq.Matrix([
    [math.cos(angle), -math.sin(angle), 0, 10],
    [math.sin(angle),  math.cos(angle), 0, 20],
    [         0,                     0, 1, 30],
    [         0,                     0, 0,  1]
])

show(cube_result_1)

multmatrix_result_0 = cube_result_1.transformGeometry(transform_matrix_3)

show(multmatrix_result_0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions