From 09a5ffd100760f392af738a96cb691e8ad654235 Mon Sep 17 00:00:00 2001 From: jdegenstein Date: Sun, 23 Jun 2024 13:37:43 -0500 Subject: [PATCH] geometry.py -> rename vec_dir to is_direction --- src/build123d/geometry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/build123d/geometry.py b/src/build123d/geometry.py index 7cbc37ad..9e66b76a 100644 --- a/src/build123d/geometry.py +++ b/src/build123d/geometry.py @@ -465,18 +465,18 @@ def to_dir(self) -> gp_Dir: """Convert to OCCT gp_Dir object""" return gp_Dir(self.wrapped.XYZ()) - def transform(self, affine_transform: Matrix, vec_dir: bool = True) -> Vector: + def transform(self, affine_transform: Matrix, is_direction: bool = False) -> Vector: """Apply affine transformation Args: affine_transform (Matrix): affine transformation matrix - vec_dir (bool, optional): Should self be transformed as a vector or direction? - Defaults to True (Vector) + is_direction (bool, optional): Should self be transformed as a vector or direction? + Defaults to False (vector) Returns: Vector: transformed vector """ - if vec_dir: + if not is_direction: # to gp_Pnt to obey build123d transformation convention (in OCP.vectors do not translate) pnt = self.to_pnt() pnt_t = pnt.Transformed(affine_transform.wrapped.Trsf())