- Add two 'Brick Solid' blocks and a 'World Frame' block to your model.
- Name the 'Brick Solid' blocks 'BottomBlock' and 'TopBlock'.
- Connect the 'R' port of 'BottomBlock' to the 'World Frame' block.
- Inside the dialog window for 'BottomBlock', create a new frame in the 'Frames' tab and rename it to 'Frame1'.
- Click the 'pencil' icon next to the newly created frame 'Frame1' to edit it.
- Set 'Frame Origin' to 'Based on Geometric Feature', click on the top face of the solid inside the 3d preview, press 'Use Selected Feature', and save changes.
- Open the dialog window of 'TopBlock' and deselect 'Show R Port' under 'Frames'.
- Create a new frame for 'TopBlock' and rename it to 'Frame2'.
- Repeat Step 6, but instead of using the top face as the geometric feature, rotate the camera in the 3d preview and select the bottom face.
- Connect the 'Frame1' port on 'BottomBlock' to the 'Frame2' port on 'TopBlock'.
How do I position two solids so that they touch without overlap in Simscape Multibody?
4 views (last 30 days)
Show older comments
Answered: MathWorks Support Team on 7 Feb 2023
I would like to position two solids in Simscape Multibody such that their faces touch without any overlap or gap in between. How would I accomplish this?
As an example, below I have provided steps for placing a brick solid on top of another brick solid. This procedure can be applied to other solid blocks and for other spatial configurations of solids.
In general, it is best to create custom frames that are based on geometric features and to use those frames to describe the relationship between two solids that touch. The 'R' port, defined for all solid blocks, represents the center of mass of that solid. It is common to connect objects to the 'World Frame' via their 'R' port because the 'World Frame' is not a solid. Connections between solids should not be made using the 'R' port as it is not physically possible for one solid to exist inside another.
More Answers (0)
Find more on Bodies in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!