<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13169" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2021-03-10T09:34:15+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/13169</id>

		<entry>
		<author><name><![CDATA[pasta99]]></name></author>
		<updated>2021-03-10T09:34:15+00:00</updated>

		<published>2021-03-10T09:34:15+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43346#p43346</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43346#p43346"/>
		<title type="html"><![CDATA[Re: Create collision shape manually with API]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43346#p43346"><![CDATA[
Thanks for the reply. <br>I added a btAlignedObjectArray for the vertices and indices to the args. In the API I added following code: <br><div class="codebox"><p>Code: </p><pre><code>if (shapeType == GEOM_MESH &amp;&amp; args.m_numVertices)        {                int numVertices = args.m_numVertices;                int numIndices = args.m_numIndices;                double* vertices = &amp;args.m_vertices[0];                int* indices = &amp;args.m_indices[0];                double meshScale[3];                scalarToDouble3(args.m_meshScale, meshScale);                if (numIndices)                {                        shapeIndex = b3CreateCollisionShapeAddConcaveMesh(sm, command, meshScale, vertices, numVertices, indices, numIndices);                }                else                {                        shapeIndex = b3CreateCollisionShapeAddConvexMesh(sm, command, meshScale, vertices, numVertices);                }        }</code></pre></div>Unfortunately if I call the function I get the message "b3Printf: Request createCollisionShape failed".<br> <br>Do you have an idea why this might be happening?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13919">pasta99</a> — Wed Mar 10, 2021 9:34 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2021-03-09T02:32:33+00:00</updated>

		<published>2021-03-09T02:32:33+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43341#p43341</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43341#p43341"/>
		<title type="html"><![CDATA[Re: Create collision shape manually with API]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43341#p43341"><![CDATA[
The C++ bindings (b3RobotSimulatorClientAPI ) is limited and would need to be expanded. PyBullet uses the C-API, and so does b3RobotSimulatorClientAPI . You can just add the args you need, and look at pybullet.c how the methods are called.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Tue Mar 09, 2021 2:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[pasta99]]></name></author>
		<updated>2021-03-08T06:27:38+00:00</updated>

		<published>2021-03-08T06:27:38+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43339#p43339</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43339#p43339"/>
		<title type="html"><![CDATA[Create collision shape manually with API]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=43339#p43339"><![CDATA[
I want to use the b3RobotSimulatorClientAPI similar to the Pybullet API in C++ code. In the pybullet examples it is possible to create meshes by hand like so: <a href="https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/createMesh.py" class="postlink">https://github.com/bulletphysics/bullet ... ateMesh.py</a> . Unfortunately there is no vertices and indices option in the b3RobotSimulatorCreateCollisionShapeArgs. Is there a way to create a mesh like in the example with the C++ API? Am I missing something?<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=13919">pasta99</a> — Mon Mar 08, 2021 6:27 am</p><hr />
]]></content>
	</entry>
	</feed>
