Returns a 3D wedge with the specified dimensions for each point on the stack. :param dx: Distance along the X axis :param dy: Distance along the Y axis :param dz: Distance along the Z axis :param xmin: The minimum X location :param zmin: The minimum
(
self: T,
dx: float,
dy: float,
dz: float,
xmin: float,
zmin: float,
xmax: float,
zmax: float,
pnt: VectorLike = Vector(0, 0, 0),
dir: VectorLike = Vector(0, 0, 1),
centered: Union[bool, Tuple[bool, bool, bool]] = True,
combine: CombineMode = True,
clean: bool = True,
)
| 4139 | return self.eachpoint(lambda loc: s.moved(loc), True, combine, clean) |
| 4140 | |
| 4141 | def wedge( |
| 4142 | self: T, |
| 4143 | dx: float, |
| 4144 | dy: float, |
| 4145 | dz: float, |
| 4146 | xmin: float, |
| 4147 | zmin: float, |
| 4148 | xmax: float, |
| 4149 | zmax: float, |
| 4150 | pnt: VectorLike = Vector(0, 0, 0), |
| 4151 | dir: VectorLike = Vector(0, 0, 1), |
| 4152 | centered: Union[bool, Tuple[bool, bool, bool]] = True, |
| 4153 | combine: CombineMode = True, |
| 4154 | clean: bool = True, |
| 4155 | ) -> T: |
| 4156 | """ |
| 4157 | Returns a 3D wedge with the specified dimensions for each point on the stack. |
| 4158 | |
| 4159 | :param dx: Distance along the X axis |
| 4160 | :param dy: Distance along the Y axis |
| 4161 | :param dz: Distance along the Z axis |
| 4162 | :param xmin: The minimum X location |
| 4163 | :param zmin: The minimum Z location |
| 4164 | :param xmax: The maximum X location |
| 4165 | :param zmax: The maximum Z location |
| 4166 | :param pnt: A vector (or tuple) for the origin of the direction for the wedge |
| 4167 | :param dir: The direction vector (or tuple) for the major axis of the wedge |
| 4168 | :param centered: If True, the wedge will be centered around the reference point. |
| 4169 | If False, the corner of the wedge will be on the reference point and it will |
| 4170 | extend in the positive x, y and z directions. Can also use a 3-tuple to |
| 4171 | specify centering along each axis. |
| 4172 | :param combine: Whether the results should be combined with other solids on the stack |
| 4173 | (and each other) |
| 4174 | :param clean: True to attempt to have the kernel clean up the geometry, False otherwise |
| 4175 | :return: A wedge object for each point on the stack |
| 4176 | |
| 4177 | One wedge is created for each item on the current stack. If no items are on the stack, one |
| 4178 | wedge using the current workplane center is created. |
| 4179 | |
| 4180 | If combine is True, the result will be a single object on the stack. If a solid was found |
| 4181 | in the chain, the result is that solid with all wedges produced fused onto it otherwise, |
| 4182 | the result is the combination of all the produced wedges. |
| 4183 | |
| 4184 | If combine is False, the result will be a list of the wedges produced. |
| 4185 | """ |
| 4186 | |
| 4187 | # Convert the point tuple to a vector, if needed |
| 4188 | if isinstance(pnt, tuple): |
| 4189 | pnt = Vector(pnt) |
| 4190 | |
| 4191 | # Convert the direction tuple to a vector, if needed |
| 4192 | if isinstance(dir, tuple): |
| 4193 | dir = Vector(dir) |
| 4194 | |
| 4195 | if isinstance(centered, bool): |
| 4196 | centered = (centered, centered, centered) |
| 4197 | |
| 4198 | offset = Vector() |