Sheet metal softbody with fixing points

Post Reply
MarcoS
Posts: 2
Joined: Thu Apr 14, 2016 2:45 am

Sheet metal softbody with fixing points

Post by MarcoS »

Hello,

I’m new with bullet physics, and I want to know if bullet can do simulation on flat sheet metal?

What I want to do is import a 3d mesh place fixing point on it with different in diameters in a fixed pattern and move the pattern so that the sheet metal has less sag from the gravity.

Thanks.
Last edited by MarcoS on Thu May 26, 2016 11:29 am, edited 1 time in total.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Can Bullet physics do this?

Post by benelot »

Hello MarcoS,


Welcome to the Bullet Physics forum!
Please quickly update the title of your first post to something like "Sheet metal softbody with fixing points", because that is what you want and it will attract many more people to help you than your generic title.

About your question, yes, this is definitely possible. If I understand correctly, you want to fixate your sheet metal at some points (with diameters, say circles) in space and leave the rest hanging. What you want is basically a softbody simulation with some rigid bodies in it. The rigid-bodies are disks that make up for the diameters, the softbody is the sheet metal hanging over it. The rigid-bodies are fixed using btFixedConstraints to a pivot pointing to the position in space. And then you load your sheetmetal and put it over it. You can look into the softbody examples of the example browser to understand how to create softbodies. Especially the cloth demos might be interesting for you.

Am I wrong with what I understood from your description?
MarcoS
Posts: 2
Joined: Thu Apr 14, 2016 2:45 am

Re: Sheet metal softbody with fixing points

Post by MarcoS »

Hello Benelot,

Thanks for the answer!

If have changed the post subject description.

Yes that is what I want to do, I have playing with the softbody example but without success, can you put me in the right direction with the softboy and two fixing point on it?

Thanks
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Sheet metal softbody with fixing points

Post by benelot »

Hi MarcoS,

I would suggest you put some more effort into it before you return to ask for help.

What you essentially want to do is the following (from SoftDemo.cpp in the example sources):

Code: Select all

//
// Cloth attach
//
static void	Init_ClothAttach(SoftDemo* pdemo)
{
	//TRACEDEMO
	const btScalar	s=4;
	const btScalar	h=6;
	const int		r=9;
	btSoftBody*		psb=btSoftBodyHelpers::CreatePatch(pdemo->m_softBodyWorldInfo,btVector3(-s,h,-s),
		btVector3(+s,h,-s),
		btVector3(-s,h,+s),
		btVector3(+s,h,+s),r,r,4+8,true);
	pdemo->getSoftDynamicsWorld()->addSoftBody(psb);

	btTransform startTransform;
	startTransform.setIdentity();
	startTransform.setOrigin(btVector3(0,h,-(s+3.5)));
	btRigidBody*		body=pdemo->createRigidBody(20,startTransform,new btBoxShape(btVector3(s,1,3)));
	psb->appendAnchor(0,body);
	psb->appendAnchor(r-1,body);
	pdemo->m_cutting=true;
}
(Don't worry, the code does not compile, as it uses the example framework here and there, but you can easily find out what the framework does and replace it with the actual bullet physics code. Takes some time, returns some fun :))

This produces a body attached to a patch of softbody cloth. Now you only need to fixate the body in space, change it to another shape to represent your disks with different diameters and then attach the cloth to the disk. That should come near to what you want. I am not sure if you can somehow increase the stiffness of the cloth, but I am sure there is an option somewhere. Do some exploration.
Post Reply