Previous Thread  Next Thread

chat icon Select by edge loop and then reuse to select using lasso

Darius

Posted: Wed Nov 21, 2012 11:14 am
Joined: 21 Nov 2012
Posts: 3
Hello,
It is possible to do that?:
Separate by loosed parts and export them to dxf files.
The question:
It is possible to apply lasso selection using detected loosed part edges and create for example rectangle and circle inside them as one loosed part and then export to dxf?


Thank you
Reply with quote


CoDEmanX

Posted: Wed Nov 21, 2012 2:12 pm
Joined: 05 Apr 2009
Posts: 695
you can select lose edges and verts, and you can separate by loose parts.

I don't understand what you wanna do after that...
_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


Darius

Posted: Wed Nov 21, 2012 2:44 pm
Joined: 21 Nov 2012
Posts: 3
I want to to this using script.
It must be exported to dxf when is separated
Reply with quote


CoDEmanX

Posted: Wed Nov 21, 2012 4:18 pm
Joined: 05 Apr 2009
Posts: 695
well, how about

Code:
import bpy

if bpy.context.object:
    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.select_all(action='DESELECT')

    ob = bpy.data.objects['YourUnseparatedOb']

    bpy.context.scene.objects.active = ob
    ob.select = True

    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.separate(type='LOOSE')

    if not bpy.context.user_preferences.addons.get('io_export_dxf', False):
        bpy.ops.wm.addon_enable(module="io_export_dxf")

    bpy.ops.export.dxf(filepath="C:\\the\\filepath\\filename.ext", projectionThrough='NO', onlySelected=True, apply_modifiers=True, mesh_as='3DFACEs', entitylayer_from='obj.data.name', entitycolor_from='default_COLOR', entityltype_from='CONTINUOUS', layerName_from='LAYERNAME_DEF', verbose=False)


_________________
I'm sitting, waiting, wishing, building Blender in superstition...
Reply with quote


Darius

Posted: Wed Nov 21, 2012 8:49 pm
Joined: 21 Nov 2012
Posts: 3
Coll!
That are first and last steps I want to do.
I need to save separated parts to different dxf files, after object is separated using command bpy.ops.mesh.separate(type='LOOSE').
Object like in the example below must be joined again and saved as one object.

This is description why do I need this script:
1. I want to import puzzle dxf file for laser cutting
2. Later, I want to separate object into separated puzzle elements
3. Object like this wheel (picture above) must be joined again, because that is one puzzle element.
4. Objects must be saved to different dxf files. Later that dxf files will be imported to ProNest for cutting area optimization and this process is not related with Blender.

....................not be included in my script..................
5. In the next step on the puzzle elements (already separated) will be added faces.
6. Then they will be extruded.
7. Then will be added textures and will be created puzzle assembly animation
....................not be included in my script..................
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group