Rewriting the Cross Section Script

Tested in 35161
and not working

i tough it was registering but it’s not that either!

it does not make a PYC file ?
and don’t see it in list of scrupt in addons panel

i ho[pe you did not use “api”: 31965 this is very old man !

i remove the addons at the beginning and it works
and it does the cross section which i guess is the equivalent of the old cross section one in 2.49

but this is not equivalent to the knife cutter
have a look to this knife cutter it 's almost the same
but it cuts the object in 2
which would be nice to have also in 2.5 if you can do it

it would be a nice complement to the cross section one

thanks Happy 2.5

yeah, I have no idea what “api” version I used. Whatever the current one is. Where can I find out what api my bersion of blender is using?

need to change add on to that

bl_info

i’ ll test it

and it works now with add ons

now what about doing the cutting plane
can you do this one too!

one note here
i would preder to have this in the tools operator panel instad of object

faster acces to it i guess

forgot one thing i also added this at the end

bpy.utils.register_class(OBJECT_PT_cross)
bpy.utils.register_class(MakeCrossSection)

Thanks & salutations

bpy.utils.register_class(OBJECT_PT_cross)
bpy.utils.register_class(MakeCrossSection)

what does that do?

http://dl.dropbox.com/u/2586482/cut%20by%20plane%20matrix%20apply%202.py

here is my “cut by plane” script…it is VERY VERY ROUGH and a mess coding wise.

  1. It is based on a lot of the same structure as the cross section so don’t have them both in the addons at the same time
  2. it will crash blender occasionally
  3. It can’t handle vertices on the cut yet. So sometimes it throws an error. Try moving the plane slightly
  4. The faces aren’t always generated correctly. resuling in criss cross lines.

seems for a while now you also need to register the class for panels and operators
so this is one way i found to do it otherwise the script won’t work anyway
try it and see for yourself !
but there is another way too if you need it let me know

did you look at the example fron 2.49 script it might give some dieas how it was done
and make it work on same algo shold be easy if you know how to works with matrix edges and verts!

happy 2.5

which 2.49 script are you talking about? The built in function where exact cut and use guide geometry? Could you point me to what you are referring to?

here is file try it it’s fun

[ATTACH]130538[/ATTACH]

i was thinking about 2 other little tool s
like for objects face and edge

move one face of one object to be parallel to the face of another object
that would be very usefull!
and there is another one like that for edge
this can also be a tool which we don’t avhe right now !

i avhe a description of how to do this with empty et…
it’s not simple to do but with a script it wold be a lot easier !

let me know i can find the doc on this and may a video

happy 2.5

you could also make a small menu selecton for the different tool
so same addon would be able to do different things!

happy 2.5

did you ahve time to look at the blend file i uploaded for the plane knife from 2.49

shoud gie you some ideas hopefully

are you going to make a tool prop panel with selection for slice and plane knife may be
that would be very nice to have these tools together in one script

salutations

Object selections in blender have an order, this makes perfect sense.

Hi, I created my own script, heavily based on yours. It is PEP-8 conformant and supports blender 2.58 (bpy.ops.object.[location|rotation|scale]_apply is replaced by bpy.ops.object.translation_apply in blender 2.57 -> blender 2.58). That means also that my script does NOT support blender <= 2.57.

It also works with the add-on manager and utilizes the register() and unregister() functions to register the panel and the operator.

It is located here; https://github.com/jwandborg/blender-make_cross_section, feel free to draw inspiration from it.

That is great. This is one of the first python scripts I wrote so its nice to see it brought up to speed. I look forward to checking out your version.

sorry but can you upload it here in thread
it’ does not look very long and would be easier to download cause i did not see how to get it !

thanks

I tried your script, succesfully registered in the object property panel but can’t figure out how it works…
When I select to objects (meshes), a cube and a plane, it creates a new object (cross section) but it is just an empty (no matters the order I select the two objects)…

Anibody can upgrade thes escript to blender 2.59 ?

Any update on the Cross Section script?

yes would be nice to see and update here !

anhone knows how to !

thanks