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

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

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

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • poj 2408 Anagram Groups(hash)

    poj 2408 Anagram Groups(hash)

    2022年1月2日
    35
  • Java安全之Commons Collections1分析(二)

    Java安全之CommonsCollections1分析(二)0x00前言续上篇文,继续调试cc链。在上篇文章调试的cc链其实并不是一个完整的链。只是使用了几个方法的的互相调用弹出一个计算器。

    2021年12月12日
    38
  • 2020年最佳恶意软件删除工具Top 10「建议收藏」

    2020年最佳恶意软件删除工具Top 10「建议收藏」恶意软件删除工具可以帮助你从个人计算机中删除危险的恶意软件,从而避免受到黑客的攻击并防止以后的攻击隐患。保障你的电脑或笔记本电脑的安全性是非常重要的,因为你永远不知道攻击者何时会对你的设备发起攻击。所以,这意味着你不仅需要杀毒软件,还需要一个恶意软件删除工具。比如,广告软件和间谍软件有很大的不同之处,它们不是病毒。因此,仅查出设备是否已受到恶意软件的影响是远远不够的,而且采用手动删除的方法也是非常不切实际的。故此,恶意软件清除已成为一个普遍的问题。如今,恶意软件感染越来越普遍化,即便你自认为..

    2022年6月24日
    68
  • 执行Cmd命令[通俗易懂]

    执行Cmd命令[通俗易懂](1)直接在执行.cmd脚本:(2)直接仿制在CMD敲命令的方式:EventManager.WriteOutput("正在前端构建…");vardir=Path.C

    2022年8月1日
    0
  • layoutSubviews 调用

    layoutSubviews 调用学习了一下UIView的setNeedsDisplay和setNeedsLayout方法。首先两个方法都是异步执行的。而setNeedsDisplay会调用自动调用drawRect方法,这样可以拿到UIGraphicsGetCurrentContext,就可以画画了。而setNeedsLayout会默认调用layoutSubViews,就可以处理子视图中的一些数据。宗上所诉,setNeedsD

    2022年7月25日
    9
  • kali 国内源 与 apt-get update 报错-GPG error的解决方案[通俗易懂]

    kali 国内源 与 apt-get update 报错-GPG error的解决方案[通俗易懂]#中科大debhttp://mirrors.ustc.edu.cn/kalikali-rollingmainnon-freecontribdeb-srchttp://mirrors.ustc.edu.cn/kalikali-rollingmainnon-freecontrib#浙大debhttp://mirrors.zju.edu.cn/kalikali-rol…

    2022年10月13日
    0

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

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