V-rep学习笔记:切削

V-rep学习笔记:切削

大家好,又见面了,我是你们的朋友全栈君。

  V-REP allows you to perform cutting simulations. The user can model almost any type of cutting volumes as long as they are convex (however you can always combine several convex cutting volumes to obtain a non-convex cutting volume). The scene objects that allow for this functionality are mills, which can cut cuttable entities. Following figures illustrates examples using mills:

V-rep学习笔记:切削

[Two cutting simulation examples]

  Mills will always have a convex cutting volume, however they can be combined to generate a non-convex cutting volume or more complex volumes. They cut parts of cuttable entities away that interferes with their cutting volume. By default, cuttable objects have their cuttable tag disabled. Refer to the object common properties to enable or disable individual object’s cuttable tag.

  Parts of cuttable objects that have been cut away will not be collidable, measurable, detectable or renderable anymore (but the remainder will). Depending on the size and complexity of cuttable objects, the cutting operation can be slowed down. The cutting speed is also linked to the cutting volume precision and the rate at which the cut is performed. Smooth cutting volumes usually perform better when the cutting is continuous (not a one-time cut). A too small cutting rate might also result in a slow-down due to the increasing size of the required calculation structure. The best is to test for the best cutting volume – cutting rate relationship.

  Cut objects can be reset to their initial state with the simResetMilling command. Changes can also be made permanent with the simApplyMilling command.The amount of cut surface/volume can be recorded by graph objects. Refer to graphs and graph data stream types for more information about how to record mill data.

 

   VREP中Mill只能对表面进行切削(不支持实体模型切削)。下面导入一个立方体STL网格模型,勾选其Cuttable属性:

V-rep学习笔记:切削

   然后添加一个Mill放在立方体上表面(刀具的切削体要进入立方体表面内),cutting volume可以设置成下面几种基本形状:

V-rep学习笔记:切削

  添加脚本控制Mill在立方体上表面移动,可以看到与刀具接触的面被移除:

V-rep学习笔记:切削

  仿真结束后被切削的对象会还原,如果要应用切削改变,可以使用simApplyMilling函数(Applies changes made during milling operations to a cuttable object)。

function sysCall_init()
    -- do some initialization here:

    millHandle = sim.getObjectHandle('Mill')

end

function sysCall_actuation()
    -- put your actuation code here
    
    -- Explicit handling
    --sim.handleMill(millHandle) 

    local position=sim.getObjectPosition(millHandle,-1)
    position[1]=position[1]+0.0001
    sim.setObjectPosition(millHandle,-1,position)
end



function sysCall_cleanup()
    -- do some clean-up here
end

 

 

 

 

参考:

Solid Mesh

Solid mesh for milling

Importing stl files as solid, non hollow objects

转载于:https://www.cnblogs.com/21207-iHome/p/9297104.html

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/107419.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号