scripting things for the 3d workspace

Hey all, just wondering if it’s possible to have python scripts that can place things into the 3dview.

I’m just experimenting with solid modeling and I’m wondering if it’s possible to make a python script that can make new ‘objects’ in the 3d view port. Specifically I want to implement a boundary representation system for solid modeling. I already got a simple 2D b-rep system made in python and if I can implement it inside blender and use all of it’s features it would be great.

Thanks for any help in advance.

Yes you can and it’s pretty simple (at least the moving objects with python part)

This script moves your selected object to location (0,0,0):

Blender.Scene.GetCurrent().getActiveObject().loc = (0,0,0)

This was taken from :

And this tutorial teaches you to procedurally create objects in python: