How to determine the size of an object

3 views
Skip to first unread message

Matthieu Hendriks

unread,
Feb 27, 2026, 10:29:35 AMFeb 27
to PythonSCAD
Is there a way of determining the x1, x2, y1 and y2 of an object, say the outer limits of an object? if I thougt maybe bbox but when I use bbox I get somthing like multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10.5], [0, 0, 0, 1]]) but i'm not sure how to interpretet this.

Like to hear.

nomike (they/them)

unread,
Feb 27, 2026, 10:54:32 AMFeb 27
to pytho...@googlegroups.com

Hi Matthieu,

On 2/27/26 16:29, Matthieu Hendriks wrote:
Is there a way of determining the x1, x2, y1 and y2 of an object, say the outer limits of an object? if I thougt maybe bbox but when I use bbox I get somthing like multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 10.5], [0, 0, 0, 1]]) but i'm not sure how to interpretet this.

Objects have a size and a position property:

```python
print(cube(10).size)
print(cube(10).position)

```

This works for all 3D objects.

I just realized though, that 2D objects don't (e.g. `square(10)` or `circle(r=10)`). I will add those.

Regards

nomike

Matthieu Hendriks

unread,
Feb 28, 2026, 5:36:04 AMFeb 28
to nomike (they/them), pytho...@googlegroups.com
Thanks this is exactly what I'm needed.

Op vr 27 feb 2026 om 16:54 schreef nomike (they/them) <nom...@nomike.com>:
--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/9ed5d3bb-e26b-411d-93c4-654dd7432b0e%40nomike.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages