How to move object in normal direction?

Hallo!

This code snippet shows how to move objects with properties:



    normal= bpy.props.FloatVectorProperty(name="Normal Z", description="Normal", default = (0.0, 0.0, 0.1))    

    distance = bpy.props.FloatVectorProperty(name="Distance", description="Distance", default = (0.1, 0.0, 0.0))
    
    rotation = bpy.props.FloatVectorProperty(name="Rotation", description="Rotation", default = (0.0, 0.0, 0.0))

    scale = bpy.props.FloatVectorProperty(name="Scale", description="Scale", default = (0.0, 0.0, 0.0))

    normal_min = bpy.props.IntProperty(name="n-min", description="Normal", default = 0, soft_max=1000, soft_min=0, step=1)
    normal_max = bpy.props.IntProperty(name="n-Max", description="Normal", default = 0, soft_max=1000, soft_min=0, step=1)
 

    def execute(self, context):
        
        obj = bpy.context.active_object
        
        obj.delta_location[0] += self.distance[0]
        obj.delta_location[1] += self.distance[1]
        obj.delta_location[2] += self.distance[2]
        

        ### Normal Direction???
        #bpy.ops.transform.translate(value=(self.normal), constraint_axis=(False, False, True), constraint_orientation='NORMAL')
        
        for i in range(self.normal_min):
            bpy.ops.transform.translate(value=(0.0,0.0,-0.01), constraint_axis=(False, False, True), constraint_orientation='NORMAL')

        for i in range(self.normal_max):
            bpy.ops.transform.translate(value=(0.0,0.0, 0.01), constraint_axis=(False, False, True), constraint_orientation='NORMAL')




        obj.delta_rotation_euler.x += self.rotation[0]
        obj.delta_rotation_euler.y += self.rotation[1]
        obj.delta_rotation_euler.z += self.rotation[2]
        
        obj.delta_scale[0] += self.scale[0]
        obj.delta_scale[1] += self.scale[1]
        obj.delta_scale[2] += self.scale[2]
            

        return {'FINISHED'}

My Question is:

how can i move objects over normal z direction with a FloatVectorProperty in objectmode?

I can do it with an IntProperty.
One for plus and one for negative direction.
But i think there is a better solution for it?
Maybe i have to use local instead of normal direction?
If i use local and median: z in editmode translate (property shelf [N]) it will do that.

I want to use it after creating a mesh…like in the template: Operator Add mesh

Thanks for any help!

ARewO (Blender Diplom):
https://github.com/meta-androcto/blenderpython/blob/master/scripts/addons_extern/sfc_workstation/copy_replicator.py

Python move object on local axis:

Moving vertices in global coordinates (pink vertex):
http://blender.stackexchange.com/questions/12291/moving-vertices-in-global-coordinates?rq=1

The Editmode Example (CoDEmanX) / Shrink-Fatten:

I am no programmer so I can’t help you with the scripts but objects don’t have a “normal” axis. Faces have normals to define what way they are facing and since an object is (usually) composed of a closed mesh with multiple faces going in different directions it is not possible to define a normal axis for a whole object. I think you better go with the local axis.