Add missing face attribute to the XML schema.
PiperOrigin-RevId: 561330536 Change-Id: I693fc5228591e4a26ea0749435a6ce9869afd457
This commit is contained in:
committed by
Copybara-Service
parent
16ee0dfde5
commit
f371ca7a4e
@@ -3319,6 +3319,11 @@ coordinates results in compiler error. See :ref:`CComposite` in the modeling gui
|
|||||||
:at:`vertex`: :at-val:`real(3*nvert), optional`
|
:at:`vertex`: :at-val:`real(3*nvert), optional`
|
||||||
Vertex 3D positions in global coordinates (cable only).
|
Vertex 3D positions in global coordinates (cable only).
|
||||||
|
|
||||||
|
.. _body-composite-face:
|
||||||
|
|
||||||
|
:at:`face`: :at-val:`real(3*nvert), optional`
|
||||||
|
Face connectivity of the vertices (shell only).
|
||||||
|
|
||||||
.. _body-composite-initial:
|
.. _body-composite-initial:
|
||||||
|
|
||||||
:at:`initial`: :at-val:`[free, ball, none], "0"`
|
:at:`initial`: :at-val:`[free, ball, none], "0"`
|
||||||
|
|||||||
+3
-1
@@ -390,7 +390,9 @@
|
|||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`offset<body-composite-offset>` | :ref:`flatinertia<body-composite-flatinertia>` | :ref:`solrefsmooth<body-composite-solrefsmooth>` | :ref:`solimpsmooth<body-composite-solimpsmooth>` | |
|
| | | | :ref:`offset<body-composite-offset>` | :ref:`flatinertia<body-composite-flatinertia>` | :ref:`solrefsmooth<body-composite-solrefsmooth>` | :ref:`solimpsmooth<body-composite-solimpsmooth>` | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
| | | | :ref:`vertex<body-composite-vertex>` | :ref:`initial<body-composite-initial>` | :ref:`curve<body-composite-curve>` | :ref:`size<body-composite-size>` | |
|
| | | | :ref:`vertex<body-composite-vertex>` | :ref:`face<body-composite-face>` | :ref:`initial<body-composite-initial>` | :ref:`curve<body-composite-curve>` | |
|
||||||
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
|
| | | | :ref:`size<body-composite-size>` | | | | |
|
||||||
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
| | | +-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+-----------------------------------------------------------------+ |
|
||||||
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
+------------------------------------+----+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||||
| |_2| composite |br| |_2| |L| | | .. table:: |
|
| |_2| composite |br| |_2| |L| | | .. table:: |
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ bool mjCComposite::Make(mjCModel* model, mjCBody* body, char* error, int error_s
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check spacing
|
// check spacing
|
||||||
if (type==mjCOMPTYPE_GRID || type==mjCOMPTYPE_PARTICLE) {
|
if (type==mjCOMPTYPE_GRID || (type==mjCOMPTYPE_PARTICLE && uservert.empty())) {
|
||||||
if (spacing < mju_max(def[0].geom.size[0],
|
if (spacing < mju_max(def[0].geom.size[0],
|
||||||
mju_max(def[0].geom.size[1], def[0].geom.size[2]))) {
|
mju_max(def[0].geom.size[1], def[0].geom.size[2]))) {
|
||||||
return comperr(error, "Spacing must be larger than geometry size",
|
return comperr(error, "Spacing must be larger than geometry size",
|
||||||
@@ -2192,7 +2192,7 @@ void mjCComposite::MakeSkin3(mjCModel* model) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// box
|
// box
|
||||||
if (type==mjCOMPTYPE_BOX || type==mjCOMPTYPE_PARTICLE) {
|
else if (type==mjCOMPTYPE_BOX || type==mjCOMPTYPE_PARTICLE) {
|
||||||
// z-faces
|
// z-faces
|
||||||
MakeSkin3Box(skin, count[0], count[1], 1, vcnt, "%sB%d_%d_0");
|
MakeSkin3Box(skin, count[0], count[1], 1, vcnt, "%sB%d_%d_0");
|
||||||
fmt = "%sB%d_%d_" + string(cnt2);
|
fmt = "%sB%d_%d_" + string(cnt2);
|
||||||
|
|||||||
@@ -270,8 +270,8 @@ static const char* MJCF[nMJCF][mjXATTRNUM] = {
|
|||||||
{"light", "*", "15", "name", "class", "directional", "castshadow", "active",
|
{"light", "*", "15", "name", "class", "directional", "castshadow", "active",
|
||||||
"pos", "dir", "attenuation", "cutoff", "exponent", "ambient", "diffuse", "specular",
|
"pos", "dir", "attenuation", "cutoff", "exponent", "ambient", "diffuse", "specular",
|
||||||
"mode", "target"},
|
"mode", "target"},
|
||||||
{"composite", "*", "12", "prefix", "type", "count", "spacing", "offset",
|
{"composite", "*", "13", "prefix", "type", "count", "spacing", "offset",
|
||||||
"flatinertia", "solrefsmooth", "solimpsmooth", "vertex",
|
"flatinertia", "solrefsmooth", "solimpsmooth", "vertex", "face",
|
||||||
"initial", "curve", "size"},
|
"initial", "curve", "size"},
|
||||||
{"<"},
|
{"<"},
|
||||||
{"plugin", "*", "2", "plugin", "instance"},
|
{"plugin", "*", "2", "plugin", "instance"},
|
||||||
@@ -1943,6 +1943,9 @@ void mjXReader::OneComposite(XMLElement* elem, mjCBody* pbody, mjCDef* def) {
|
|||||||
String2Vector(text, comp.uservert);
|
String2Vector(text, comp.uservert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// shell
|
||||||
|
ReadAttrTxt(elem, "face", comp.userface);
|
||||||
|
|
||||||
// process curve string
|
// process curve string
|
||||||
std::istringstream iss(curves);
|
std::istringstream iss(curves);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user