乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: kaan27

[编程交流] center of pressure (center of

[复制链接]

4

主题

27

帖子

23

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 06:43:35 | 显示全部楼层
when I load the lisp it gives error. (Select LWPOLYLINE ; error: too few arguments)
回复

使用道具 举报

2

主题

389

帖子

387

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 06:47:19 | 显示全部楼层
You can try this snippet of code as well.  Just select your REGION you made.
  1. (vlax-get (vlax-ename->vla-object (car (entsel))) 'Centroid)
Taken from this link: http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/massprop-where-the-values-are-stored/td-p/2288271
 
But you avoided my question about MASSPROP.
回复

使用道具 举报

4

主题

27

帖子

23

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 06:48:21 | 显示全部楼层
massprop command calculates according to area but I want to calculate according to perimeter. They are different calculations.
 
070951r2b9mmzob8m9fbpk.png
回复

使用道具 举报

6

主题

23

帖子

15

银币

初来乍到

Rank: 1

铜币
33
发表于 2022-7-6 06:52:55 | 显示全部楼层
If you do not want the center of the area (centroid), but only the center gravity of the lines, why there is any hole (while there is no area) ?
Anyway, you can combine your lisp with hand calculation. Programming is for doing something very frequently, hence, save alot of time. Your job doesnot look quite common.
回复

使用道具 举报

44

主题

542

帖子

502

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-6 06:56:01 | 显示全部楼层
I've never heard of centre of gravity calculations based just upon shape perimeters. Calculating the centroid will achieve the same result.
 
My centroid calculations are rusty, although you will need to break the shape up into elements. E.g. if you had a T beam you could break it into two elements (the horizontal flange and the vertical web). Given you have a circle hole, this is not easy to do by hand.
回复

使用道具 举报

4

主题

27

帖子

23

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 07:00:16 | 显示全部楼层
The surface of the part is not empty, so there is a hole (piercing operation). When calculating the area instead of getting perimeter one by one. Calculating by hand easily but lisp unable.
回复

使用道具 举报

44

主题

542

帖子

502

银币

后起之秀

Rank: 20Rank: 20Rank: 20Rank: 20

铜币
220
发表于 2022-7-6 07:01:45 | 显示全部楼层
 
If the part has a surface, then it has an area. You can then find the (2d) centroid of the area/part which is your centre of gravity/mass. Otherwise I am not understanding your question. If your part is 3D, then it will be more complex.
 
You might need to post an example hand calculation (all steps etc) so someone can advise you where to start to program it.
回复

使用道具 举报

4

主题

27

帖子

23

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 07:05:19 | 显示全部楼层
Center of pressure is calculated in this way in press tooling operation
 
070952usp0aa2gmaapa202.png
回复

使用道具 举报

4

主题

27

帖子

23

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 07:06:49 | 显示全部楼层
070953rvq1uv1vzzdquv8u.png
回复

使用道具 举报

4

主题

27

帖子

23

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 07:11:21 | 显示全部楼层
This would be more understandable, I guess.
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 18:30 , Processed in 0.389852 second(s), 73 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表