Dynamo Code Block Geometry() in python

Hi,

Beginner here. I would like to get the geometry data out of scope boxes.
Currently I have a script that picks up the scopebxes I want than have to output them so I can run Geometry() in CodeBlock then send that output back to a new Python script. Would be nice to keep it all together.
Also, currently I am picking up he edge lines of the scopeboxes and then get the end and start points to determine all the corner points. Is there a quicker way to do this? (picking up only the corner points.
Thank you!

@Balazs.Endrodi83 ,

what do you mean with “Scope Box” ? do you mean boundingBox?

so you can work with min/max point … you could create a cubid

Hello @Balazs.Endrodi83 and welcome

like this ?

Exactly that. I tried with unwrap(IN[0]) maybe that was the problem…
In any case, thank you very much. this was exactly what I was looking for.
For bonus points, is it possible to get straight to the points or I have to pick up the lines then the start and end point, drop the duplicate points to have only the corner points?

here an example

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

scopeBox = IN[0]

lines = scopeBox.Geometry()

lst_points = sum([[l.StartPoint, l.EndPoint] for l in lines], [])

OUT= Point.PruneDuplicates(lst_points, 0.1)

you can find a good explanation of Unwrapping here

Pulling the verifies and getting the point geometry is likely more effective here, especially for more complex forms.