diff --git a/.travis.yml b/.travis.yml
index 3bc26766..3781de8f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -101,9 +101,7 @@ script:
 - if [[ "$PYTHON_VERSION" == "3.6" ]]; then conda install pyembree scikit-image; fi;
 - if [[ "$PYTHON_VERSION" == "3.6" ]]; then pip install python-fcl; fi;
 # lxml stopped supporting EOL Python
-- if [[ "$PYTHON_VERSION" == "3.4" ]]; then pip install lxml==4.3.5; fi;
-# sdist for released shapely has issues on 3.8
-- if [[ "$PYTHON_VERSION" == "3.8" ]]; then pip install shapely==1.7a2; fi;
+- if [[ "$PYTHON_VERSION" == "3.4" ]]; then pip install lxml==4.3.5 shapely==1.6.4; fi;
 
 # install most deps here
 - pip install -q .[easy]
diff --git a/trimesh/remesh.py b/trimesh/remesh.py
index e2c8d4b9..7b93260e 100644
--- a/trimesh/remesh.py
+++ b/trimesh/remesh.py
@@ -46,10 +46,11 @@ def subdivide(vertices,
     else:
         face_index = np.asanyarray(face_index)
 
-    # the (c,3) int set of vertex indices
-    faces = faces[face_index]
+    # the (c, 3) int array of vertex indices
+    faces_subset = faces[face_index]
+
     # the (c, 3, 3) float set of points in the triangles
-    triangles = vertices[faces]
+    triangles = vertices[faces_subset]
     # the 3 midpoints of each triangle edge
     # stacked to a (3 * c, 3) float
     mid = np.vstack([triangles[:, g, :].mean(axis=1)
@@ -57,27 +58,27 @@ def subdivide(vertices,
                                [1, 2],
                                [2, 0]]])
 
-    # for adjacent faces we are going to be generating
+    # for adjacent faces_subset we are going to be generating
     # the same midpoint twice so merge them here
     mid_idx = (np.arange(len(face_index) * 3)).reshape((3, -1)).T
     unique, inverse = grouping.unique_rows(mid)
     mid = mid[unique]
     mid_idx = inverse[mid_idx] + len(vertices)
 
-    # the new faces with correct winding
-    f = np.column_stack([faces[:, 0],
+    # the new faces_subset with correct winding
+    f = np.column_stack([faces_subset[:, 0],
                          mid_idx[:, 0],
                          mid_idx[:, 2],
                          mid_idx[:, 0],
-                         faces[:, 1],
+                         faces_subset[:, 1],
                          mid_idx[:, 1],
                          mid_idx[:, 2],
                          mid_idx[:, 1],
-                         faces[:, 2],
+                         faces_subset[:, 2],
                          mid_idx[:, 0],
                          mid_idx[:, 1],
                          mid_idx[:, 2]]).reshape((-1, 3))
-    # add the 3 new faces per old face
+    # add the 3 new faces_subset per old face
     new_faces = np.vstack((faces, f[len(face_index):]))
     # replace the old face with a smaller face
     new_faces[face_index] = f[:len(face_index)]
@@ -87,7 +88,7 @@ def subdivide(vertices,
     if vertex_attributes is not None:
         new_attributes = {}
         for key, values in vertex_attributes.items():
-            attr_tris = values[faces]
+            attr_tris = values[faces_subset]
             attr_mid = np.vstack([
                 attr_tris[:, g, :].mean(axis=1)
                 for g in [[0, 1],
diff --git a/trimesh/version.py b/trimesh/version.py
index f78b7205..90bbb877 100644
--- a/trimesh/version.py
+++ b/trimesh/version.py
@@ -1,1 +1,1 @@
-__version__ = '3.5.16'
+__version__ = '3.5.17'

Indexing Error in remesh.subdivide when using face_index
faces are re-indexed in the beginning of the function
https://github.com/mikedh/trimesh/blob/82a2acda892e82e9c727ea8ba81c301bbfca5d70/trimesh/remesh.py#L50

which causes indexing error here
https://github.com/mikedh/trimesh/blob/82a2acda892e82e9c727ea8ba81c301bbfca5d70/trimesh/remesh.py#L81-L83

This is because new_faces are made of faces corresponding to face_index instead of the original faces

I think having reference to the original array would fix this, i.e., on L50
faces_old = faces
faces = faces[face_index]

and on the line linked on L81
new_faces = np.vstack((faces_old, f[len(face_index):]))

BTW. having face_index is a very useful feature especially for adaptive subdivision in visualization.
diff --git a/tests/test_remesh.py b/tests/test_remesh.py
index 974e36b6..9d5f83d3 100644
--- a/tests/test_remesh.py
+++ b/tests/test_remesh.py
@@ -35,6 +35,20 @@ class SubDivideTest(g.unittest.TestCase):
 
             assert (edge_len < max_edge).all()
 
+    def test_sub(self):
+        # try on some primitives
+        meshes = [g.trimesh.creation.box(),
+                  g.trimesh.creation.icosphere()]
+
+        for m in meshes:
+            s = m.subdivide(face_index=[0, len(m.faces) - 1])
+            # shouldn't have subdivided in-place
+            assert len(s.faces) > len(m.faces)
+            # area should be the same
+            assert g.np.isclose(m.area, s.area)
+            # volume should be the same
+            assert g.np.isclose(m.volume, s.volume)
+
     def test_uv(self):
         # get a mesh with texture
         m = g.get_mesh('fuze.obj')

pip install -e .[all]
parse_log_pytest
requirements.txt
pytest pytest-cov pyinstrument
apt-get update apt-get install -y gcc
3.6
requirements/base.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
autoprop==4.1.0
backports.cached-property==1.0.2
certifi==2021.5.30
chardet==5.0.0
charset-normalizer==2.0.12
colorlog==6.9.0
coverage==6.2
cycler==0.11.0
Cython==3.0.12
decorator==4.4.2
glooey==0.3.6
idna==3.10
imageio==2.15.0
importlib-metadata==4.8.3
iniconfig==1.1.1
jsonschema==3.2.0
kiwisolver==1.3.1
lxml==5.3.1
matplotlib==3.3.4
more-itertools==8.14.0
mpmath==1.3.0
msgpack==1.0.5
networkx==2.5.1
numpy==1.19.5
packaging==21.3
Pillow==8.4.0
pluggy==1.0.0
psutil==7.0.0
py==1.11.0
pycollada==0.8
pyglet==2.0.10
pyinstrument==3.4.2
pyinstrument-cext==0.2.4
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-cov==4.0.0
python-dateutil==2.9.0.post0
python-fcl==0.7.0.5
PyWavelets==1.1.1
PyYAML==6.0.1
requests==2.27.1
Rtree==0.9.7
scikit-image==0.17.2
scipy==1.5.4
Shapely==1.8.5.post1
signature_dispatch==1.0.0
six==1.17.0
svg.path==6.2
sympy==1.9
tifffile==2020.9.3
tomli==1.2.3
triangle==20220202
-e git+https://github.com/mikedh/trimesh.git@82a2acda892e82e9c727ea8ba81c301bbfca5d70#egg=trimesh
typeguard==2.13.3
typing==3.7.4.3
typing_extensions==4.1.1
urllib3==1.26.20
vecrec==0.3.1
xxhash==3.2.0
zipp==3.6.0

name: trimesh
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - autoprop==4.1.0
      - backports-cached-property==1.0.2
      - chardet==5.0.0
      - charset-normalizer==2.0.12
      - colorlog==6.9.0
      - coverage==6.2
      - cycler==0.11.0
      - cython==3.0.12
      - decorator==4.4.2
      - glooey==0.3.6
      - idna==3.10
      - imageio==2.15.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jsonschema==3.2.0
      - kiwisolver==1.3.1
      - lxml==5.3.1
      - matplotlib==3.3.4
      - more-itertools==8.14.0
      - mpmath==1.3.0
      - msgpack==1.0.5
      - networkx==2.5.1
      - numpy==1.19.5
      - packaging==21.3
      - pillow==8.4.0
      - pluggy==1.0.0
      - psutil==7.0.0
      - py==1.11.0
      - pycollada==0.8
      - pyglet==2.0.10
      - pyinstrument==3.4.2
      - pyinstrument-cext==0.2.4
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-dateutil==2.9.0.post0
      - python-fcl==0.7.0.5
      - pywavelets==1.1.1
      - pyyaml==6.0.1
      - requests==2.27.1
      - rtree==0.9.7
      - scikit-image==0.17.2
      - scipy==1.5.4
      - shapely==1.8.5.post1
      - signature-dispatch==1.0.0
      - six==1.17.0
      - svg-path==6.2
      - sympy==1.9
      - tifffile==2020.9.3
      - tomli==1.2.3
      - triangle==20220202
      - typeguard==2.13.3
      - typing==3.7.4.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - vecrec==0.3.1
      - xxhash==3.2.0
      - zipp==3.6.0
prefix: /opt/conda/envs/trimesh

tests/test_remesh.py::SubDivideTest::test_sub
tests/test_remesh.py::SubDivideTest::test_subdivide tests/test_remesh.py::SubDivideTest::test_uv
.travis.yml trimesh/version.py trimesh/remesh.py
.travis.yml trimesh/version.py trimesh/remesh.py