# Simulink contact modeling, how can I avoid using the convex hull?

조회 수: 5(최근 30일)
L.Schuring 2022년 3월 2일
댓글: L.Schuring 2022년 3월 10일
I am trying to model contact between two bodies, a falling object and ground. In some of the fall simulations, I would like to model the ground having steps or a step - ultimately very simple geometries that can be defined by cubes. I thought I could use an STL file that I could swap out depending on what kind of ground was needed for simulation. However, the File Solid block I was hoping to use requires that I export the "convex hull" geometry of the ground for contact modeling (see image below)... This effectively gets rid of the step and replaces it with a sloped ground surface which is not acceptable for my simulations.
I am wondering if there is any simple way around this that does not involve separating the ground into multiple geometries that each have their own contact definitions with the falling object. Can I use the actual geometry without exporting the convex hull somehow? Or can I use other blocks to combine geometries to make steps so that the ground contact only needs ONE ground geometry rather a collecty of seperate ground bodies?
Ideally, I would like to avoid creating mutiple geometries that require seperate contact definitions with the falling object. The falling object that I have already has 14 seperate mass bodies that require individual spacial contact force blocks with the single flat ground geometry that I've used.
Hope this question is clear. Thank you to the Mathworks community!

댓글을 달려면 로그인하십시오.

### 답변(1개)

Steve Miller 2022년 3월 6일
Hi Lindsay,
If you use the STL file by itself, the exported geometry for contact modeling is the convex hull. For stairs, that would result in a ramp.
Some options that will permit you to use only one Spatial Contact Force block to represent the stairs:
1. You can use a Point Cloud block to represent the stairs. You can likely extract the points needed from the STL file. See example Mars Rover Model in Simscape on the File Exchange. A point cloud has been used to represent the wheels.
2. You can use a Grid Surface block to represent the stairs. See Mars Rover Model in Simscape on the File Exchange, where a Grid Surface block has been used to represent the terrain. Note that you should re-orient the reference for the grid surface blocks so that the z-axis points normal to the "ramp" you were getting before.
As you have already noted, you could divide the stairs up into separate geometries so that you do not get a convex hull for the entire set of stairs, but you would need Spatial Contact Force blocks between each stair element and each piece of the falling object.
--Steve
##### 댓글 수: 1표시숨기기 없음
L.Schuring 2022년 3월 10일
Thank you Steve, both options will resolve the issue I was having entirely! I really appreciate the time you took to put together your reply.
All the best,
Lindsay

댓글을 달려면 로그인하십시오.

### 범주

Find more on Bodies in Help Center and File Exchange

R2021b

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by