Skip to content

Commit

Permalink
fix var name and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Koyaani authored and autra committed May 31, 2022
1 parent f4d1523 commit 38aaae1
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ In the current implementation, the *Pnts* class only contains a *FeatureTable*

.. code-block:: python
>>> from py3dtiles import TileContentReader
>>> from py3dtiles import Pnts
>>> from py3dtiles import Pnts, TileContentReader
>>>
>>> filename = 'tests/pointCloudRGB.pnts'
>>>
Expand Down Expand Up @@ -80,7 +79,7 @@ corresponding data type.

.. code-block:: python
>>> from py3dtiles import Feature
>>> from py3dtiles import Feature, Pnts
>>> import numpy as np
>>>
>>> # create the numpy dtype for positions with 32-bit floating point numbers
Expand Down Expand Up @@ -117,8 +116,7 @@ https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/TileFormats/Batche

.. code-block:: python
>>> from py3dtiles import TileContentReader
>>> from py3dtiles import B3dm
>>> from py3dtiles import B3dm, TileContentReader
>>>
>>> filename = 'tests/dragon_low.b3dm'
>>>
Expand All @@ -130,7 +128,7 @@ https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/TileFormats/Batche
<py3dtiles.tile_content.TileContent>
>>>
>>> # extract information about the tile header
>>> th = tile.header
>>> th = tile_content.header
>>> th
<py3dtiles.b3dm.B3dmHeader>
>>> th.magic_value
Expand All @@ -155,7 +153,7 @@ file containing polyhedralsurfaces or multipolygons.
.. code-block:: python
>>> import numpy as np
>>> from py3dtiles import GlTF, TriangleSoup
>>> from py3dtiles import B3dm, GlTF, TriangleSoup
>>>
>>> # load a wkb file
>>> wkb = open('tests/building.wkb', 'rb').read()
Expand Down Expand Up @@ -183,7 +181,7 @@ file containing polyhedralsurfaces or multipolygons.
>>> gltf = GlTF.from_binary_arrays([geometry], transform)
>>>
>>> # create a b3dm tile_content directly from the glTF.
>>> t = B3dm.from_glTF(glTF)
>>> t = B3dm.from_glTF(gltf)
>>>
>>> # to save our tile as a .b3dm file
>>> t.save_as("mymodel.b3dm")

0 comments on commit 38aaae1

Please sign in to comment.