├── .gitattributes ├── .gitignore ├── CHANGES.txt ├── LICENSE ├── MANIFEST ├── MANIFEST.in ├── README.md ├── README.rst ├── docs ├── MAKE HTML.bat ├── Makefile ├── build │ ├── doctrees │ │ ├── _templates │ │ │ └── class.doctree │ │ ├── dc_base.doctree │ │ ├── dc_bounds.doctree │ │ ├── dc_circle.doctree │ │ ├── dc_color.doctree │ │ ├── dc_cs.doctree │ │ ├── dc_curve.doctree │ │ ├── dc_has_pts.doctree │ │ ├── dc_intersection.doctree │ │ ├── dc_interval.doctree │ │ ├── dc_line.doctree │ │ ├── dc_mesh.doctree │ │ ├── dc_pgon.doctree │ │ ├── dc_plane.doctree │ │ ├── dc_pline.doctree │ │ ├── dc_point.doctree │ │ ├── dc_surface.doctree │ │ ├── dc_vec.doctree │ │ ├── dc_xform.doctree │ │ ├── environment.pickle │ │ ├── files.doctree │ │ ├── index.doctree │ │ └── stubs │ │ │ ├── decodes.core.dc_base.Basis.doctree │ │ │ ├── decodes.core.dc_base.Geometry.doctree │ │ │ ├── decodes.core.dc_base.HasBasis.doctree │ │ │ ├── decodes.core.dc_bounds.Bounds.doctree │ │ │ ├── decodes.core.dc_circle.Arc.doctree │ │ │ ├── decodes.core.dc_circle.Circle.doctree │ │ │ ├── decodes.core.dc_color.BoolField.doctree │ │ │ ├── decodes.core.dc_color.Color.doctree │ │ │ ├── decodes.core.dc_color.Image.doctree │ │ │ ├── decodes.core.dc_color.PixelGrid.doctree │ │ │ ├── decodes.core.dc_color.ValueField.doctree │ │ │ ├── decodes.core.dc_cs.CS.doctree │ │ │ ├── decodes.core.dc_cs.CylCS.doctree │ │ │ ├── decodes.core.dc_curve.Curve.doctree │ │ │ ├── decodes.core.dc_curve.IsParametrized.doctree │ │ │ ├── decodes.core.dc_has_pts.HasPts.doctree │ │ │ ├── decodes.core.dc_intersection.Intersector.doctree │ │ │ ├── decodes.core.dc_interval.Interval.doctree │ │ │ ├── decodes.core.dc_line.Line.doctree │ │ │ ├── decodes.core.dc_line.LinearEntity.doctree │ │ │ ├── decodes.core.dc_line.Ray.doctree │ │ │ ├── decodes.core.dc_line.Segment.doctree │ │ │ ├── decodes.core.dc_line.VecField.doctree │ │ │ ├── decodes.core.dc_mesh.Mesh.doctree │ │ │ ├── decodes.core.dc_pgon.PGon.doctree │ │ │ ├── decodes.core.dc_pgon.RGon.doctree │ │ │ ├── decodes.core.dc_plane.Plane.doctree │ │ │ ├── decodes.core.dc_pline.PLine.doctree │ │ │ ├── decodes.core.dc_point.BPoint.doctree │ │ │ ├── decodes.core.dc_point.Point.doctree │ │ │ ├── decodes.core.dc_surface.Surface.doctree │ │ │ ├── decodes.core.dc_vec.Vec.doctree │ │ │ └── decodes.core.dc_xform.Xform.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _sources │ │ ├── _templates │ │ │ └── class.txt │ │ ├── dc_base.txt │ │ ├── dc_bounds.txt │ │ ├── dc_circle.txt │ │ ├── dc_color.txt │ │ ├── dc_cs.txt │ │ ├── dc_curve.txt │ │ ├── dc_has_pts.txt │ │ ├── dc_intersection.txt │ │ ├── dc_interval.txt │ │ ├── dc_line.txt │ │ ├── dc_mesh.txt │ │ ├── dc_pgon.txt │ │ ├── dc_plane.txt │ │ ├── dc_pline.txt │ │ ├── dc_point.txt │ │ ├── dc_surface.txt │ │ ├── dc_vec.txt │ │ ├── dc_xform.txt │ │ ├── files.txt │ │ ├── index.txt │ │ └── stubs │ │ │ ├── decodes.core.dc_base.Basis.txt │ │ │ ├── decodes.core.dc_base.Geometry.txt │ │ │ ├── decodes.core.dc_base.HasBasis.txt │ │ │ ├── decodes.core.dc_bounds.Bounds.txt │ │ │ ├── decodes.core.dc_circle.Arc.txt │ │ │ ├── decodes.core.dc_circle.Circle.txt │ │ │ ├── decodes.core.dc_color.BoolField.txt │ │ │ ├── decodes.core.dc_color.Color.txt │ │ │ ├── decodes.core.dc_color.Image.txt │ │ │ ├── decodes.core.dc_color.PixelGrid.txt │ │ │ ├── decodes.core.dc_color.ValueField.txt │ │ │ ├── decodes.core.dc_cs.CS.txt │ │ │ ├── decodes.core.dc_cs.CylCS.txt │ │ │ ├── decodes.core.dc_curve.Curve.txt │ │ │ ├── decodes.core.dc_curve.IsParametrized.txt │ │ │ ├── decodes.core.dc_has_pts.HasPts.txt │ │ │ ├── decodes.core.dc_intersection.Intersector.txt │ │ │ ├── decodes.core.dc_interval.Interval.txt │ │ │ ├── decodes.core.dc_line.Line.txt │ │ │ ├── decodes.core.dc_line.LinearEntity.txt │ │ │ ├── decodes.core.dc_line.Ray.txt │ │ │ ├── decodes.core.dc_line.Segment.txt │ │ │ ├── decodes.core.dc_line.VecField.txt │ │ │ ├── decodes.core.dc_mesh.Mesh.txt │ │ │ ├── decodes.core.dc_pgon.PGon.txt │ │ │ ├── decodes.core.dc_pgon.RGon.txt │ │ │ ├── decodes.core.dc_plane.Plane.txt │ │ │ ├── decodes.core.dc_pline.PLine.txt │ │ │ ├── decodes.core.dc_point.BPoint.txt │ │ │ ├── decodes.core.dc_point.Point.txt │ │ │ ├── decodes.core.dc_surface.Surface.txt │ │ │ ├── decodes.core.dc_vec.Vec.txt │ │ │ └── decodes.core.dc_xform.Xform.txt │ │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── basic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── file.png │ │ ├── jquery.js │ │ ├── minus.png │ │ ├── nature.css │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ └── websupport.js │ │ ├── _templates │ │ └── class.html │ │ ├── dc_base.html │ │ ├── dc_bounds.html │ │ ├── dc_circle.html │ │ ├── dc_color.html │ │ ├── dc_cs.html │ │ ├── dc_curve.html │ │ ├── dc_has_pts.html │ │ ├── dc_intersection.html │ │ ├── dc_interval.html │ │ ├── dc_line.html │ │ ├── dc_mesh.html │ │ ├── dc_pgon.html │ │ ├── dc_plane.html │ │ ├── dc_pline.html │ │ ├── dc_point.html │ │ ├── dc_surface.html │ │ ├── dc_vec.html │ │ ├── dc_xform.html │ │ ├── files.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── objects.inv │ │ ├── search.html │ │ ├── searchindex.js │ │ └── stubs │ │ ├── decodes.core.dc_base.Basis.html │ │ ├── decodes.core.dc_base.Geometry.html │ │ ├── decodes.core.dc_base.HasBasis.html │ │ ├── decodes.core.dc_bounds.Bounds.html │ │ ├── decodes.core.dc_circle.Arc.html │ │ ├── decodes.core.dc_circle.Circle.html │ │ ├── decodes.core.dc_color.BoolField.html │ │ ├── decodes.core.dc_color.Color.html │ │ ├── decodes.core.dc_color.Image.html │ │ ├── decodes.core.dc_color.PixelGrid.html │ │ ├── decodes.core.dc_color.ValueField.html │ │ ├── decodes.core.dc_cs.CS.html │ │ ├── decodes.core.dc_cs.CylCS.html │ │ ├── decodes.core.dc_curve.Curve.html │ │ ├── decodes.core.dc_curve.IsParametrized.html │ │ ├── decodes.core.dc_has_pts.HasPts.html │ │ ├── decodes.core.dc_intersection.Intersector.html │ │ ├── decodes.core.dc_interval.Interval.html │ │ ├── decodes.core.dc_line.Line.html │ │ ├── decodes.core.dc_line.LinearEntity.html │ │ ├── decodes.core.dc_line.Ray.html │ │ ├── decodes.core.dc_line.Segment.html │ │ ├── decodes.core.dc_line.VecField.html │ │ ├── decodes.core.dc_mesh.Mesh.html │ │ ├── decodes.core.dc_pgon.PGon.html │ │ ├── decodes.core.dc_pgon.RGon.html │ │ ├── decodes.core.dc_plane.Plane.html │ │ ├── decodes.core.dc_pline.PLine.html │ │ ├── decodes.core.dc_point.BPoint.html │ │ ├── decodes.core.dc_point.Point.html │ │ ├── decodes.core.dc_surface.Surface.html │ │ ├── decodes.core.dc_vec.Vec.html │ │ └── decodes.core.dc_xform.Xform.html ├── make.bat └── source │ ├── _static │ └── nature.css │ ├── _templates │ ├── class.rst │ ├── class.rst.txt │ └── index.html │ ├── conf.py │ ├── dc_base.rst │ ├── dc_base.rst.txt │ ├── dc_bounds.rst │ ├── dc_circle.rst │ ├── dc_color.rst │ ├── dc_cs.rst │ ├── dc_curve.rst │ ├── dc_has_pts.rst │ ├── dc_intersection.rst │ ├── dc_interval.rst │ ├── dc_line.rst │ ├── dc_mesh.rst │ ├── dc_pgon.rst │ ├── dc_plane.rst │ ├── dc_pline.rst │ ├── dc_point.rst │ ├── dc_surface.rst │ ├── dc_vec.rst │ ├── dc_xform.rst │ ├── files.rst │ ├── index.rst │ ├── new 2.txt │ ├── new 3.txt │ └── stubs │ ├── decodes.core.dc_base.Basis.rst │ ├── decodes.core.dc_base.Geometry.rst │ ├── decodes.core.dc_base.HasBasis.rst │ ├── decodes.core.dc_bounds.Bounds.rst │ ├── decodes.core.dc_circle.Arc.rst │ ├── decodes.core.dc_circle.Circle.rst │ ├── decodes.core.dc_color.BoolField.rst │ ├── decodes.core.dc_color.Color.rst │ ├── decodes.core.dc_color.Image.rst │ ├── decodes.core.dc_color.PixelGrid.rst │ ├── decodes.core.dc_color.ValueField.rst │ ├── decodes.core.dc_cs.CS.rst │ ├── decodes.core.dc_cs.CylCS.rst │ ├── decodes.core.dc_curve.Curve.rst │ ├── decodes.core.dc_curve.IsParametrized.rst │ ├── decodes.core.dc_has_pts.HasPts.rst │ ├── decodes.core.dc_intersection.Intersector.rst │ ├── decodes.core.dc_interval.Interval.rst │ ├── decodes.core.dc_line.Line.rst │ ├── decodes.core.dc_line.LinearEntity.rst │ ├── decodes.core.dc_line.Ray.rst │ ├── decodes.core.dc_line.Segment.rst │ ├── decodes.core.dc_line.VecField.rst │ ├── decodes.core.dc_mesh.Mesh.rst │ ├── decodes.core.dc_pgon.PGon.rst │ ├── decodes.core.dc_pgon.RGon.rst │ ├── decodes.core.dc_plane.Plane.rst │ ├── decodes.core.dc_pline.PLine.rst │ ├── decodes.core.dc_point.BPoint.rst │ ├── decodes.core.dc_point.Point.rst │ ├── decodes.core.dc_surface.Surface.rst │ ├── decodes.core.dc_vec.Vec.rst │ └── decodes.core.dc_xform.Xform.rst ├── setup.cfg ├── setup.py ├── setup_superseded.py ├── src └── decodes │ ├── __init__.py │ ├── core │ ├── __init__.py │ ├── dc_base.py │ ├── dc_bounds.py │ ├── dc_circle.py │ ├── dc_color.py │ ├── dc_cone.py │ ├── dc_cs.py │ ├── dc_curve.py │ ├── dc_cylinder.py │ ├── dc_graph.py │ ├── dc_grid.py │ ├── dc_has_pts.py │ ├── dc_intersection.py │ ├── dc_interval.py │ ├── dc_line.py │ ├── dc_mesh.py │ ├── dc_pgon.py │ ├── dc_plane.py │ ├── dc_pline.py │ ├── dc_point.py │ ├── dc_raster.py │ ├── dc_surface.py │ ├── dc_tri.py │ ├── dc_vec.py │ └── dc_xform.py │ ├── extensions │ ├── __init__.py │ ├── cellular_automata.py │ ├── classical_surfaces.py │ ├── lsystem.py │ ├── packing.py │ ├── parse_epw.py │ ├── poisson_sampling.py │ ├── reaction_diffusion.py │ ├── solar_geometry.py │ ├── tiling_2d.py │ ├── tiling_danzer.py │ └── voxel.py │ └── io │ ├── __init__.py │ ├── autocad_out.py │ ├── dynamo_in.py │ ├── dynamo_out.py │ ├── gh_in.py │ ├── gh_out.py │ ├── json_out.py │ ├── jsonpickle │ ├── __init__.py │ ├── _samples.py │ ├── backend.py │ ├── compat.py │ ├── handlers.py │ ├── pickler.py │ ├── tags.py │ ├── unpickler.py │ ├── util.py │ └── version.py │ ├── jupyter_out.py │ ├── outie.py │ ├── processing_out.py │ ├── pyautocad │ ├── __init__.py │ ├── api.py │ ├── cache.py │ ├── contrib │ │ ├── __init__.py │ │ └── tables.py │ ├── types.py │ └── utils.py │ ├── rhino_in.py │ ├── rhino_out.py │ ├── rhinoscript │ ├── __init__.py │ ├── application.py │ ├── block.py │ ├── curve.py │ ├── dimension.py │ ├── document.py │ ├── geometry.py │ ├── grips.py │ ├── group.py │ ├── hatch.py │ ├── layer.py │ ├── light.py │ ├── line.py │ ├── linetype.py │ ├── material.py │ ├── mesh.py │ ├── object.py │ ├── plane.py │ ├── pointvector.py │ ├── selection.py │ ├── surface.py │ ├── transformation.py │ ├── userdata.py │ ├── userinterface.py │ ├── utility.py │ └── view.py │ ├── svg_out.py │ └── threejs_out.py └── tests ├── __init__.py ├── curve_near_pt.ghx ├── log.txt ├── near_unit_test.gh ├── test_classical_surface.py ├── test_cs.py ├── test_curve.py ├── test_has_basis.py ├── test_has_pts.py ├── test_interval.py ├── test_line.py ├── test_mesh.py ├── test_pgon.py ├── test_plane.py ├── test_pline.py ├── test_point.py ├── test_surface.py ├── test_vec.py ├── test_voxel.py ├── test_xform.py └── test_xsect.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[co] 2 | 3 | # Packages 4 | *.egg 5 | *.egg-info 6 | dist 7 | build 8 | eggs 9 | parts 10 | bin 11 | var 12 | sdist 13 | develop-eggs 14 | .installed.cfg 15 | 16 | # Installer logs 17 | pip-log.txt 18 | 19 | # Unit test / coverage reports 20 | .coverage 21 | .tox 22 | 23 | #Translations 24 | *.mo 25 | 26 | #Mr Developer 27 | .mr.developer.cfg 28 | 29 | #osx hidden file 30 | *.DS_Store 31 | 32 | 33 | #visual studio files 34 | *.user 35 | *.suo 36 | [Bb]in 37 | [Oo]bj 38 | 39 | #help files 40 | *.chm 41 | 42 | #jython class files 43 | *$py.class 44 | 45 | -------------------------------------------------------------------------------- /CHANGES.txt: -------------------------------------------------------------------------------- 1 | v0.1.0 6/6/2014 -- Inital release 2 | v0.2.0 1/14/2018 -- Updated for Python 3.0, updated installation process -------------------------------------------------------------------------------- /MANIFEST: -------------------------------------------------------------------------------- 1 | # file GENERATED by distutils, do NOT edit 2 | README.txt 3 | setup.py 4 | decodes\__init__.py 5 | decodes\test2.png 6 | decodes\core\__init__.py 7 | decodes\core\dc_base.py 8 | decodes\core\dc_bounds.py 9 | decodes\core\dc_circle.py 10 | decodes\core\dc_color.py 11 | decodes\core\dc_cs.py 12 | decodes\core\dc_curve.py 13 | decodes\core\dc_has_pts.py 14 | decodes\core\dc_intersection.py 15 | decodes\core\dc_interval.py 16 | decodes\core\dc_line.py 17 | decodes\core\dc_mesh.py 18 | decodes\core\dc_pgon.py 19 | decodes\core\dc_plane.py 20 | decodes\core\dc_pline.py 21 | decodes\core\dc_point.py 22 | decodes\core\dc_surface.py 23 | decodes\core\dc_vec.py 24 | decodes\core\dc_xform.py 25 | decodes\extensions\__init__.py 26 | decodes\extensions\cellular_automata.py 27 | decodes\extensions\classical_surfaces.py 28 | decodes\extensions\graph.py 29 | decodes\extensions\lsystem.py 30 | decodes\extensions\packing.py 31 | decodes\extensions\parse_epw.py 32 | decodes\extensions\reaction_diffusion.py 33 | decodes\extensions\solar_geometry.py 34 | decodes\extensions\tiling_2d.py 35 | decodes\extensions\tiling_danzer.py 36 | decodes\extensions\voxel.py 37 | decodes\io\__init__.py 38 | decodes\io\autocad_out.py 39 | decodes\io\dynamo_in.py 40 | decodes\io\dynamo_out.py 41 | decodes\io\gh_in.py 42 | decodes\io\gh_out.py 43 | decodes\io\outie.py 44 | decodes\io\processing_out.py 45 | decodes\io\rhino_in.py 46 | decodes\io\rhino_out.py 47 | decodes\io\svg_out.py 48 | decodes\io\rhinoscript\__init__.py 49 | decodes\io\rhinoscript\application.py 50 | decodes\io\rhinoscript\block.py 51 | decodes\io\rhinoscript\curve.py 52 | decodes\io\rhinoscript\dimension.py 53 | decodes\io\rhinoscript\document.py 54 | decodes\io\rhinoscript\geometry.py 55 | decodes\io\rhinoscript\grips.py 56 | decodes\io\rhinoscript\group.py 57 | decodes\io\rhinoscript\hatch.py 58 | decodes\io\rhinoscript\layer.py 59 | decodes\io\rhinoscript\light.py 60 | decodes\io\rhinoscript\line.py 61 | decodes\io\rhinoscript\linetype.py 62 | decodes\io\rhinoscript\material.py 63 | decodes\io\rhinoscript\mesh.py 64 | decodes\io\rhinoscript\object.py 65 | decodes\io\rhinoscript\plane.py 66 | decodes\io\rhinoscript\pointvector.py 67 | decodes\io\rhinoscript\selection.py 68 | decodes\io\rhinoscript\surface.py 69 | decodes\io\rhinoscript\transformation.py 70 | decodes\io\rhinoscript\userdata.py 71 | decodes\io\rhinoscript\userinterface.py 72 | decodes\io\rhinoscript\utility.py 73 | decodes\io\rhinoscript\view.py 74 | decodes\test\log.txt 75 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include decodes *.txt *.png 2 | recursive-include tests *.py 3 | include *.rst *.txt LICENSE 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | decodes 2 | ======= 3 | 4 | a platform agnostic generative design library for 3d designers 5 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ====================================== 2 | Decod.es 3 | ====================================== 4 | 5 | a platform agnostic generative design library for 3d designers -------------------------------------------------------------------------------- /docs/MAKE HTML.bat: -------------------------------------------------------------------------------- 1 | @cd "source\stubs" 2 | @del *.rst 3 | @cd "..\..\" 4 | make html 5 | pause -------------------------------------------------------------------------------- /docs/build/doctrees/_templates/class.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/_templates/class.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_base.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_base.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_bounds.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_bounds.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_circle.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_circle.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_color.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_color.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_cs.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_cs.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_curve.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_curve.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_has_pts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_has_pts.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_intersection.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_intersection.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_interval.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_interval.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_line.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_line.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_mesh.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_mesh.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_pgon.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_pgon.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_plane.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_plane.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_pline.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_pline.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_point.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_point.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_surface.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_surface.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_vec.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_vec.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/dc_xform.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/dc_xform.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/build/doctrees/files.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/files.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_base.Basis.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_base.Basis.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_base.Geometry.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_base.Geometry.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_base.HasBasis.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_base.HasBasis.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_bounds.Bounds.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_bounds.Bounds.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_circle.Arc.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_circle.Arc.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_circle.Circle.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_circle.Circle.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_color.BoolField.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_color.BoolField.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_color.Color.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_color.Color.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_color.Image.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_color.Image.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_color.PixelGrid.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_color.PixelGrid.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_color.ValueField.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_color.ValueField.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_cs.CS.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_cs.CS.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_cs.CylCS.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_cs.CylCS.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_curve.Curve.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_curve.Curve.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_curve.IsParametrized.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_curve.IsParametrized.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_has_pts.HasPts.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_has_pts.HasPts.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_intersection.Intersector.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_intersection.Intersector.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_interval.Interval.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_interval.Interval.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_line.Line.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_line.Line.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_line.LinearEntity.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_line.LinearEntity.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_line.Ray.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_line.Ray.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_line.Segment.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_line.Segment.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_line.VecField.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_line.VecField.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_mesh.Mesh.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_mesh.Mesh.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_pgon.PGon.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_pgon.PGon.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_pgon.RGon.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_pgon.RGon.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_plane.Plane.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_plane.Plane.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_pline.PLine.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_pline.PLine.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_point.BPoint.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_point.BPoint.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_point.Point.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_point.Point.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_surface.Surface.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_surface.Surface.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_vec.Vec.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_vec.Vec.doctree -------------------------------------------------------------------------------- /docs/build/doctrees/stubs/decodes.core.dc_xform.Xform.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/doctrees/stubs/decodes.core.dc_xform.Xform.doctree -------------------------------------------------------------------------------- /docs/build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: e15d5a871a69a09b65d254383545ae38 4 | tags: fbb0d17656682115ca4d033fb2f83ba1 5 | -------------------------------------------------------------------------------- /docs/build/html/_sources/_templates/class.txt: -------------------------------------------------------------------------------- 1 | {{ objname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | .. autoclass:: {{ objname }} 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: {{ objname }}.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_base.txt: -------------------------------------------------------------------------------- 1 | dc_base.py 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autosummary:: 6 | :toctree: stubs 7 | :template: class.rst 8 | 9 | decodes.core.dc_base.Basis 10 | decodes.core.dc_base.Geometry 11 | decodes.core.dc_base.HasBasis 12 | 13 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_bounds.txt: -------------------------------------------------------------------------------- 1 | dc_bounds.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_bounds 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_bounds.Bounds -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_circle.txt: -------------------------------------------------------------------------------- 1 | dc_circle.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_circle 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_circle.Circle 9 | decodes.core.dc_circle.Arc -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_color.txt: -------------------------------------------------------------------------------- 1 | dc_color.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_color 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_color.BoolField 9 | decodes.core.dc_color.Color 10 | decodes.core.dc_color.Image 11 | decodes.core.dc_color.PixelGrid 12 | decodes.core.dc_color.ValueField 13 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_cs.txt: -------------------------------------------------------------------------------- 1 | dc_cs.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_cs 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_cs.CS 9 | decodes.core.dc_cs.CylCS -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_curve.txt: -------------------------------------------------------------------------------- 1 | dc_curve.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_curve 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_curve.Curve 9 | decodes.core.dc_curve.IsParametrized 10 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_has_pts.txt: -------------------------------------------------------------------------------- 1 | dc_has_pts.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_has_pts 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_has_pts.HasPts 9 | 10 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_intersection.txt: -------------------------------------------------------------------------------- 1 | dc_intersection.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_intersection 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_intersection.Intersector 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_interval.txt: -------------------------------------------------------------------------------- 1 | dc_interval.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_interval 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_interval.Interval 9 | 10 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_line.txt: -------------------------------------------------------------------------------- 1 | dc_line.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_line 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_line.Line 9 | decodes.core.dc_line.Segment 10 | decodes.core.dc_line.Ray 11 | decodes.core.dc_line.LinearEntity 12 | decodes.core.dc_line.VecField 13 | 14 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_mesh.txt: -------------------------------------------------------------------------------- 1 | dc_mesh.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_mesh 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_mesh.Mesh 9 | 10 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_pgon.txt: -------------------------------------------------------------------------------- 1 | dc_pgon.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_pgon 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_pgon.PGon 9 | decodes.core.dc_pgon.RGon 10 | 11 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_plane.txt: -------------------------------------------------------------------------------- 1 | dc_plane.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_plane 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_plane.Plane -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_pline.txt: -------------------------------------------------------------------------------- 1 | dc_pline.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_pline 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_pline.PLine 9 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_point.txt: -------------------------------------------------------------------------------- 1 | dc_point.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_point 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_point.BPoint 9 | decodes.core.dc_point.Point 10 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_surface.txt: -------------------------------------------------------------------------------- 1 | dc_surface.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_surface 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_surface.Surface 9 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_vec.txt: -------------------------------------------------------------------------------- 1 | dc_vec.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_vec 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_vec.Vec 9 | -------------------------------------------------------------------------------- /docs/build/html/_sources/dc_xform.txt: -------------------------------------------------------------------------------- 1 | dc_xform.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_xform 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_xform.Xform 9 | 10 | -------------------------------------------------------------------------------- /docs/build/html/_sources/files.txt: -------------------------------------------------------------------------------- 1 | 2 | .. currentmodule:: decodes.core 3 | .. toctree:: 4 | :maxdepth: 4 5 | 6 | dc_base 7 | dc_bounds 8 | dc_circle 9 | dc_color 10 | dc_cs 11 | dc_curve 12 | dc_has_pts 13 | dc_intersection 14 | dc_interval 15 | dc_line 16 | dc_mesh 17 | dc_pgon 18 | dc_plane 19 | dc_pline 20 | dc_point 21 | dc_surface 22 | dc_vec 23 | dc_xform 24 | 25 | This is something I want to say that is not in the docstring. 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | 2 | .. currentmodule:: decodes.core 3 | .. toctree:: 4 | :maxdepth: 3 5 | 6 | dc_base 7 | dc_bounds 8 | dc_circle 9 | dc_color 10 | dc_cs 11 | dc_curve 12 | dc_has_pts 13 | dc_intersection 14 | dc_interval 15 | dc_line 16 | dc_mesh 17 | dc_pgon 18 | dc_plane 19 | dc_pline 20 | dc_point 21 | dc_surface 22 | dc_vec 23 | dc_xform -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_base.Basis.txt: -------------------------------------------------------------------------------- 1 | Basis 2 | ========================== 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autoclass:: Basis 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Basis.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_base.Geometry.txt: -------------------------------------------------------------------------------- 1 | Geometry 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autoclass:: Geometry 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Geometry.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_base.HasBasis.txt: -------------------------------------------------------------------------------- 1 | HasBasis 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autoclass:: HasBasis 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: HasBasis.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_bounds.Bounds.txt: -------------------------------------------------------------------------------- 1 | Bounds 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_bounds 5 | .. autoclass:: Bounds 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Bounds.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_circle.Arc.txt: -------------------------------------------------------------------------------- 1 | Arc 2 | ========================== 3 | 4 | .. currentmodule:: decodes.core.dc_circle 5 | .. autoclass:: Arc 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Arc.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_circle.Circle.txt: -------------------------------------------------------------------------------- 1 | Circle 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_circle 5 | .. autoclass:: Circle 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Circle.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_color.BoolField.txt: -------------------------------------------------------------------------------- 1 | BoolField 2 | =============================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: BoolField 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: BoolField.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_color.Color.txt: -------------------------------------------------------------------------------- 1 | Color 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: Color 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Color.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_color.Image.txt: -------------------------------------------------------------------------------- 1 | Image 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: Image 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Image.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_color.PixelGrid.txt: -------------------------------------------------------------------------------- 1 | PixelGrid 2 | =============================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: PixelGrid 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: PixelGrid.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_color.ValueField.txt: -------------------------------------------------------------------------------- 1 | ValueField 2 | ================================ 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: ValueField 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: ValueField.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_cs.CS.txt: -------------------------------------------------------------------------------- 1 | CS 2 | ===================== 3 | 4 | .. currentmodule:: decodes.core.dc_cs 5 | .. autoclass:: CS 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: CS.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_cs.CylCS.txt: -------------------------------------------------------------------------------- 1 | CylCS 2 | ======================== 3 | 4 | .. currentmodule:: decodes.core.dc_cs 5 | .. autoclass:: CylCS 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: CylCS.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_curve.Curve.txt: -------------------------------------------------------------------------------- 1 | Curve 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_curve 5 | .. autoclass:: Curve 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Curve.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_curve.IsParametrized.txt: -------------------------------------------------------------------------------- 1 | IsParametrized 2 | ==================================== 3 | 4 | .. currentmodule:: decodes.core.dc_curve 5 | .. autoclass:: IsParametrized 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: IsParametrized.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_has_pts.HasPts.txt: -------------------------------------------------------------------------------- 1 | HasPts 2 | ============================== 3 | 4 | .. currentmodule:: decodes.core.dc_has_pts 5 | .. autoclass:: HasPts 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: HasPts.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_intersection.Intersector.txt: -------------------------------------------------------------------------------- 1 | Intersector 2 | ======================================== 3 | 4 | .. currentmodule:: decodes.core.dc_intersection 5 | .. autoclass:: Intersector 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Intersector.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_interval.Interval.txt: -------------------------------------------------------------------------------- 1 | Interval 2 | ================================= 3 | 4 | .. currentmodule:: decodes.core.dc_interval 5 | .. autoclass:: Interval 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Interval.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_line.Line.txt: -------------------------------------------------------------------------------- 1 | Line 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: Line 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Line.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_line.LinearEntity.txt: -------------------------------------------------------------------------------- 1 | LinearEntity 2 | ================================= 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: LinearEntity 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: LinearEntity.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_line.Ray.txt: -------------------------------------------------------------------------------- 1 | Ray 2 | ======================== 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: Ray 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Ray.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_line.Segment.txt: -------------------------------------------------------------------------------- 1 | Segment 2 | ============================ 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: Segment 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Segment.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_line.VecField.txt: -------------------------------------------------------------------------------- 1 | VecField 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: VecField 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: VecField.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_mesh.Mesh.txt: -------------------------------------------------------------------------------- 1 | Mesh 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_mesh 5 | .. autoclass:: Mesh 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Mesh.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_pgon.PGon.txt: -------------------------------------------------------------------------------- 1 | PGon 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_pgon 5 | .. autoclass:: PGon 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: PGon.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_pgon.RGon.txt: -------------------------------------------------------------------------------- 1 | RGon 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_pgon 5 | .. autoclass:: RGon 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: RGon.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_plane.Plane.txt: -------------------------------------------------------------------------------- 1 | Plane 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_plane 5 | .. autoclass:: Plane 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Plane.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_pline.PLine.txt: -------------------------------------------------------------------------------- 1 | PLine 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_pline 5 | .. autoclass:: PLine 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: PLine.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_point.BPoint.txt: -------------------------------------------------------------------------------- 1 | BPoint 2 | ============================ 3 | 4 | .. currentmodule:: decodes.core.dc_point 5 | .. autoclass:: BPoint 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: BPoint.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_point.Point.txt: -------------------------------------------------------------------------------- 1 | Point 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_point 5 | .. autoclass:: Point 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Point.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_surface.Surface.txt: -------------------------------------------------------------------------------- 1 | Surface 2 | =============================== 3 | 4 | .. currentmodule:: decodes.core.dc_surface 5 | .. autoclass:: Surface 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Surface.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_vec.Vec.txt: -------------------------------------------------------------------------------- 1 | Vec 2 | ======================= 3 | 4 | .. currentmodule:: decodes.core.dc_vec 5 | .. autoclass:: Vec 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Vec.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_sources/stubs/decodes.core.dc_xform.Xform.txt: -------------------------------------------------------------------------------- 1 | Xform 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_xform 5 | .. autoclass:: Xform 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Xform.__init__ 12 | -------------------------------------------------------------------------------- /docs/build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs/build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/comment.png -------------------------------------------------------------------------------- /docs/build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/down.png -------------------------------------------------------------------------------- /docs/build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/file.png -------------------------------------------------------------------------------- /docs/build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #333333 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 44 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 45 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 46 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 47 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 48 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 49 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 50 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 51 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 52 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 53 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 54 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 55 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 56 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 57 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 58 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 59 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 60 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 61 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 62 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/build/html/_static/up-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/up-pressed.png -------------------------------------------------------------------------------- /docs/build/html/_static/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/_static/up.png -------------------------------------------------------------------------------- /docs/build/html/_templates/class.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | <no title> — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 39 | 40 |
41 |
42 |
43 | 44 |

{{ objname }} 45 | {{ underline }}

46 | 47 | 48 |
49 |
50 |
51 |
52 | 61 | 65 | 66 | -------------------------------------------------------------------------------- /docs/build/html/dc_bounds.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_bounds.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_bounds.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_bounds.Bounds(**kargs)A 2d retangular or 3d cubic boudary class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_circle.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_circle.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_circle.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
decodes.core.dc_circle.Circle(plane, radius)a circle class
decodes.core.dc_circle.Arc(cs, radius, ...)a circle class
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 | 90 | 94 | 95 | -------------------------------------------------------------------------------- /docs/build/html/dc_cs.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_cs.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_cs.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
decodes.core.dc_cs.CS([a, b, c])a ortho coordinate system class
decodes.core.dc_cs.CylCS([pt])a cylindrical coordinate system
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 | 90 | 94 | 95 | -------------------------------------------------------------------------------- /docs/build/html/dc_curve.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_curve.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_curve.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
decodes.core.dc_curve.Curve([function, ...])a simple curve class
decodes.core.dc_curve.IsParametrizedAbstract class for describing functionality common to Curves and Surfaces
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 | 90 | 94 | 95 | -------------------------------------------------------------------------------- /docs/build/html/dc_has_pts.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_has_pts.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_has_pts.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_has_pts.HasPts([vertices, basis])A base class for anything that contains a list of vertices.
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_intersection.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_intersection.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_intersection.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_intersection.Intersector()intersection results class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_interval.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_interval.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_interval.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_interval.Interval([a, b])an interval class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_mesh.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_mesh.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_mesh.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_mesh.Mesh([vertices, faces, ...])a very simple mesh class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_pgon.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_pgon.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_pgon.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
decodes.core.dc_pgon.PGon([vertices, basis])a very simple 2d polygon class
decodes.core.dc_pgon.RGon(num_of_sides[, ...])A Regular Polygon Class
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 | 90 | 94 | 95 | -------------------------------------------------------------------------------- /docs/build/html/dc_plane.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_plane.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_plane.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_plane.Plane([point, normal])a simple plane class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_pline.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_pline.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_pline.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_pline.PLine([vertices, basis])a simple polyline class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_point.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_point.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_point.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
decodes.core.dc_point.BPoint([a, b, c, basis])a based point class
decodes.core.dc_point.Point([a, b, c])a simple point class
68 |
69 | 70 | 71 |
72 |
73 |
74 |
75 | 90 | 94 | 95 | -------------------------------------------------------------------------------- /docs/build/html/dc_surface.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_surface.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_surface.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_surface.Surface([function, ...])a simple surface class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_vec.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_vec.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_vec.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_vec.Vec([a, b, c])a simple vector class
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/dc_xform.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | dc_xform.py — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 47 | 48 |
49 |
50 |
51 | 52 |
53 |

dc_xform.py

54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
decodes.core.dc_xform.Xform([value, matrix])A transformation matrix class.
65 |
66 | 67 | 68 |
69 |
70 |
71 |
72 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/docs/build/html/objects.inv -------------------------------------------------------------------------------- /docs/build/html/search.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Search — decodes .1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 45 | 46 |
47 |
48 |
49 | 50 |

Search

51 |
52 | 53 |

54 | Please activate JavaScript to enable the search 55 | functionality. 56 |

57 |
58 |

59 | From here you can search these documents. Enter your search 60 | words into the box below and click "search". Note that the search 61 | function will automatically search for all of the words. Pages 62 | containing fewer words won't appear in the result list. 63 |

64 |
65 | 66 | 67 | 68 |
69 | 70 |
71 | 72 |
73 | 74 |
75 |
76 |
77 |
78 | 87 | 91 | 92 | -------------------------------------------------------------------------------- /docs/source/_templates/class.rst: -------------------------------------------------------------------------------- 1 | {{ objname }} 2 | {{ underline }} 3 | 4 | .. currentmodule:: {{ module }} 5 | .. autoclass:: {{ objname }} 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: {{ objname }}.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/_templates/class.rst.txt: -------------------------------------------------------------------------------- 1 | {{ objname }} 2 | {{ underline }} 3 | 4 | 5 | .. currentmodule:: {{ module }} 6 | 7 | .. autoclass:: {{ objname }} 8 | 9 | {% block methods %} 10 | .. automethod:: __init__ 11 | 12 | {% if methods %} 13 | .. rubric:: Methods 14 | 15 | .. autosummary:: 16 | {% for item in methods %} 17 | ~{{ name }}.{{ item }} 18 | {%- endfor %} 19 | {% endif %} 20 | {% endblock %} 21 | 22 | {% block attributes %} 23 | {% if attributes %} 24 | .. rubric:: Attributes 25 | 26 | .. autosummary:: 27 | {% for item in attributes %} 28 | ~{{ name }}.{{ item }} 29 | {%- endfor %} 30 | {% endif %} 31 | {% endblock %} 32 | 33 | -------------------------------------------------------------------------------- /docs/source/_templates/index.html: -------------------------------------------------------------------------------- 1 | {% extends "!index.html" %} 2 | hello -------------------------------------------------------------------------------- /docs/source/dc_base.rst: -------------------------------------------------------------------------------- 1 | dc_base.py 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autosummary:: 6 | :toctree: stubs 7 | :template: class.rst 8 | 9 | decodes.core.dc_base.Basis 10 | decodes.core.dc_base.Geometry 11 | decodes.core.dc_base.HasBasis 12 | 13 | -------------------------------------------------------------------------------- /docs/source/dc_base.rst.txt: -------------------------------------------------------------------------------- 1 | ************************************* 2 | Base 3 | ************************************* 4 | 5 | .. currentmodule:: decodes.core.dc_base 6 | .. autosummary:: 7 | :toctree: stubs 8 | :template: class.rst 9 | 10 | Geometry 11 | Basis 12 | 13 | -------------------------------------------------------------------------------- /docs/source/dc_bounds.rst: -------------------------------------------------------------------------------- 1 | dc_bounds.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_bounds 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_bounds.Bounds -------------------------------------------------------------------------------- /docs/source/dc_circle.rst: -------------------------------------------------------------------------------- 1 | dc_circle.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_circle 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_circle.Circle 9 | decodes.core.dc_circle.Arc -------------------------------------------------------------------------------- /docs/source/dc_color.rst: -------------------------------------------------------------------------------- 1 | dc_color.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_color 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_color.BoolField 9 | decodes.core.dc_color.Color 10 | decodes.core.dc_color.Image 11 | decodes.core.dc_color.PixelGrid 12 | decodes.core.dc_color.ValueField 13 | -------------------------------------------------------------------------------- /docs/source/dc_cs.rst: -------------------------------------------------------------------------------- 1 | dc_cs.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_cs 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_cs.CS 9 | decodes.core.dc_cs.CylCS -------------------------------------------------------------------------------- /docs/source/dc_curve.rst: -------------------------------------------------------------------------------- 1 | dc_curve.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_curve 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_curve.Curve 9 | decodes.core.dc_curve.IsParametrized 10 | -------------------------------------------------------------------------------- /docs/source/dc_has_pts.rst: -------------------------------------------------------------------------------- 1 | dc_has_pts.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_has_pts 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_has_pts.HasPts 9 | 10 | -------------------------------------------------------------------------------- /docs/source/dc_intersection.rst: -------------------------------------------------------------------------------- 1 | dc_intersection.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_intersection 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_intersection.Intersector 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/source/dc_interval.rst: -------------------------------------------------------------------------------- 1 | dc_interval.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_interval 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_interval.Interval 9 | 10 | -------------------------------------------------------------------------------- /docs/source/dc_line.rst: -------------------------------------------------------------------------------- 1 | dc_line.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_line 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_line.Line 9 | decodes.core.dc_line.Segment 10 | decodes.core.dc_line.Ray 11 | decodes.core.dc_line.LinearEntity 12 | decodes.core.dc_line.VecField 13 | 14 | -------------------------------------------------------------------------------- /docs/source/dc_mesh.rst: -------------------------------------------------------------------------------- 1 | dc_mesh.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_mesh 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_mesh.Mesh 9 | 10 | -------------------------------------------------------------------------------- /docs/source/dc_pgon.rst: -------------------------------------------------------------------------------- 1 | dc_pgon.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_pgon 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_pgon.PGon 9 | decodes.core.dc_pgon.RGon 10 | 11 | -------------------------------------------------------------------------------- /docs/source/dc_plane.rst: -------------------------------------------------------------------------------- 1 | dc_plane.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_plane 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_plane.Plane -------------------------------------------------------------------------------- /docs/source/dc_pline.rst: -------------------------------------------------------------------------------- 1 | dc_pline.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_pline 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_pline.PLine 9 | -------------------------------------------------------------------------------- /docs/source/dc_point.rst: -------------------------------------------------------------------------------- 1 | dc_point.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_point 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_point.BPoint 9 | decodes.core.dc_point.Point 10 | -------------------------------------------------------------------------------- /docs/source/dc_surface.rst: -------------------------------------------------------------------------------- 1 | dc_surface.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_surface 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_surface.Surface 9 | -------------------------------------------------------------------------------- /docs/source/dc_vec.rst: -------------------------------------------------------------------------------- 1 | dc_vec.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_vec 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_vec.Vec 9 | -------------------------------------------------------------------------------- /docs/source/dc_xform.rst: -------------------------------------------------------------------------------- 1 | dc_xform.py 2 | ========================= 3 | .. currentmodule:: decodes.core.dc_xform 4 | .. autosummary:: 5 | :toctree: stubs 6 | :template: class.rst 7 | 8 | decodes.core.dc_xform.Xform 9 | 10 | -------------------------------------------------------------------------------- /docs/source/files.rst: -------------------------------------------------------------------------------- 1 | 2 | .. currentmodule:: decodes.core 3 | .. toctree:: 4 | :maxdepth: 4 5 | 6 | dc_base 7 | dc_bounds 8 | dc_circle 9 | dc_color 10 | dc_cs 11 | dc_curve 12 | dc_has_pts 13 | dc_intersection 14 | dc_interval 15 | dc_line 16 | dc_mesh 17 | dc_pgon 18 | dc_plane 19 | dc_pline 20 | dc_point 21 | dc_surface 22 | dc_vec 23 | dc_xform 24 | 25 | This is something I want to say that is not in the docstring. 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | 2 | .. currentmodule:: decodes.core 3 | .. toctree:: 4 | :maxdepth: 3 5 | 6 | dc_base 7 | dc_bounds 8 | dc_circle 9 | dc_color 10 | dc_cs 11 | dc_curve 12 | dc_has_pts 13 | dc_intersection 14 | dc_interval 15 | dc_line 16 | dc_mesh 17 | dc_pgon 18 | dc_plane 19 | dc_pline 20 | dc_point 21 | dc_surface 22 | dc_vec 23 | dc_xform -------------------------------------------------------------------------------- /docs/source/new 2.txt: -------------------------------------------------------------------------------- 1 | .. toctree:: 2 | :maxdepth: 2 3 | 4 | dc_base 5 | dc_bounds 6 | dc_circle 7 | dc_color 8 | dc_cs 9 | dc_curve 10 | dc_has_pts 11 | dc_intersection 12 | dc_interval 13 | dc_line 14 | dc_mesh 15 | dc_pgon 16 | dc_plane 17 | dc_pline 18 | dc_point 19 | dc_surface 20 | dc_vec 21 | dc_xform 22 | 23 | 24 | 25 | .. automodule:: decodes 26 | :members: 27 | 28 | decodes.core 29 | ========================= 30 | 31 | .. automodule:: decodes.core 32 | :members: 33 | 34 | 35 | Indices and tables 36 | ================== 37 | 38 | * :ref:`genindex` 39 | * :ref:`modindex` 40 | * :ref:`search` 41 | 42 | -------------------------------------------------------------------------------- /docs/source/new 3.txt: -------------------------------------------------------------------------------- 1 | .. autoclass:: decodes.core.dc_line.Line 2 | :show-inheritance: 3 | :undoc-members: 4 | :members: 5 | :private-members: 6 | 7 | .. automethod:: decodes.core.dc_line.Line.__init__ 8 | 9 | 10 | .. autoclass:: decodes.core.dc_line.Segment 11 | :show-inheritance: 12 | :undoc-members: 13 | :members: 14 | :private-members: 15 | 16 | .. automethod:: decodes.core.dc_line.Segment.__init__ 17 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_base.Basis.rst: -------------------------------------------------------------------------------- 1 | Basis 2 | ========================== 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autoclass:: Basis 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Basis.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_base.Geometry.rst: -------------------------------------------------------------------------------- 1 | Geometry 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autoclass:: Geometry 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Geometry.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_base.HasBasis.rst: -------------------------------------------------------------------------------- 1 | HasBasis 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_base 5 | .. autoclass:: HasBasis 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: HasBasis.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_bounds.Bounds.rst: -------------------------------------------------------------------------------- 1 | Bounds 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_bounds 5 | .. autoclass:: Bounds 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Bounds.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_circle.Arc.rst: -------------------------------------------------------------------------------- 1 | Arc 2 | ========================== 3 | 4 | .. currentmodule:: decodes.core.dc_circle 5 | .. autoclass:: Arc 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Arc.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_circle.Circle.rst: -------------------------------------------------------------------------------- 1 | Circle 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_circle 5 | .. autoclass:: Circle 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Circle.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_color.BoolField.rst: -------------------------------------------------------------------------------- 1 | BoolField 2 | =============================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: BoolField 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: BoolField.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_color.Color.rst: -------------------------------------------------------------------------------- 1 | Color 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: Color 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Color.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_color.Image.rst: -------------------------------------------------------------------------------- 1 | Image 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: Image 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Image.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_color.PixelGrid.rst: -------------------------------------------------------------------------------- 1 | PixelGrid 2 | =============================== 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: PixelGrid 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: PixelGrid.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_color.ValueField.rst: -------------------------------------------------------------------------------- 1 | ValueField 2 | ================================ 3 | 4 | .. currentmodule:: decodes.core.dc_color 5 | .. autoclass:: ValueField 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: ValueField.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_cs.CS.rst: -------------------------------------------------------------------------------- 1 | CS 2 | ===================== 3 | 4 | .. currentmodule:: decodes.core.dc_cs 5 | .. autoclass:: CS 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: CS.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_cs.CylCS.rst: -------------------------------------------------------------------------------- 1 | CylCS 2 | ======================== 3 | 4 | .. currentmodule:: decodes.core.dc_cs 5 | .. autoclass:: CylCS 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: CylCS.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_curve.Curve.rst: -------------------------------------------------------------------------------- 1 | Curve 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_curve 5 | .. autoclass:: Curve 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Curve.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_curve.IsParametrized.rst: -------------------------------------------------------------------------------- 1 | IsParametrized 2 | ==================================== 3 | 4 | .. currentmodule:: decodes.core.dc_curve 5 | .. autoclass:: IsParametrized 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: IsParametrized.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_has_pts.HasPts.rst: -------------------------------------------------------------------------------- 1 | HasPts 2 | ============================== 3 | 4 | .. currentmodule:: decodes.core.dc_has_pts 5 | .. autoclass:: HasPts 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: HasPts.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_intersection.Intersector.rst: -------------------------------------------------------------------------------- 1 | Intersector 2 | ======================================== 3 | 4 | .. currentmodule:: decodes.core.dc_intersection 5 | .. autoclass:: Intersector 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Intersector.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_interval.Interval.rst: -------------------------------------------------------------------------------- 1 | Interval 2 | ================================= 3 | 4 | .. currentmodule:: decodes.core.dc_interval 5 | .. autoclass:: Interval 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Interval.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_line.Line.rst: -------------------------------------------------------------------------------- 1 | Line 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: Line 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Line.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_line.LinearEntity.rst: -------------------------------------------------------------------------------- 1 | LinearEntity 2 | ================================= 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: LinearEntity 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: LinearEntity.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_line.Ray.rst: -------------------------------------------------------------------------------- 1 | Ray 2 | ======================== 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: Ray 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Ray.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_line.Segment.rst: -------------------------------------------------------------------------------- 1 | Segment 2 | ============================ 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: Segment 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Segment.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_line.VecField.rst: -------------------------------------------------------------------------------- 1 | VecField 2 | ============================= 3 | 4 | .. currentmodule:: decodes.core.dc_line 5 | .. autoclass:: VecField 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: VecField.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_mesh.Mesh.rst: -------------------------------------------------------------------------------- 1 | Mesh 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_mesh 5 | .. autoclass:: Mesh 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Mesh.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_pgon.PGon.rst: -------------------------------------------------------------------------------- 1 | PGon 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_pgon 5 | .. autoclass:: PGon 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: PGon.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_pgon.RGon.rst: -------------------------------------------------------------------------------- 1 | RGon 2 | ========================= 3 | 4 | .. currentmodule:: decodes.core.dc_pgon 5 | .. autoclass:: RGon 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: RGon.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_plane.Plane.rst: -------------------------------------------------------------------------------- 1 | Plane 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_plane 5 | .. autoclass:: Plane 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Plane.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_pline.PLine.rst: -------------------------------------------------------------------------------- 1 | PLine 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_pline 5 | .. autoclass:: PLine 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: PLine.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_point.BPoint.rst: -------------------------------------------------------------------------------- 1 | BPoint 2 | ============================ 3 | 4 | .. currentmodule:: decodes.core.dc_point 5 | .. autoclass:: BPoint 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: BPoint.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_point.Point.rst: -------------------------------------------------------------------------------- 1 | Point 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_point 5 | .. autoclass:: Point 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Point.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_surface.Surface.rst: -------------------------------------------------------------------------------- 1 | Surface 2 | =============================== 3 | 4 | .. currentmodule:: decodes.core.dc_surface 5 | .. autoclass:: Surface 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Surface.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_vec.Vec.rst: -------------------------------------------------------------------------------- 1 | Vec 2 | ======================= 3 | 4 | .. currentmodule:: decodes.core.dc_vec 5 | .. autoclass:: Vec 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Vec.__init__ 12 | -------------------------------------------------------------------------------- /docs/source/stubs/decodes.core.dc_xform.Xform.rst: -------------------------------------------------------------------------------- 1 | Xform 2 | =========================== 3 | 4 | .. currentmodule:: decodes.core.dc_xform 5 | .. autoclass:: Xform 6 | :show-inheritance: 7 | :undoc-members: 8 | :members: 9 | :private-members: 10 | 11 | .. automethod:: Xform.__init__ 12 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [bdist_wheel] 2 | universal = 1 3 | 4 | [metadata] 5 | license_file = LICENSE -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | ''' 2 | written using this tutorial: https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/ 3 | 4 | when ready to install: 5 | * make sure requirements are installed 6 | $ pip install -U pip setuptools wheel twine 7 | * delete the build and dist directories 8 | * build 9 | $ python setup.py sdist bdist_wheel 10 | * upload to PIP 11 | $ twine upload -r pypi dist/decodes-0.2.X* 12 | 13 | ''' 14 | 15 | import codecs 16 | import os 17 | import re 18 | 19 | from setuptools import setup, find_packages 20 | 21 | ################################################################### 22 | 23 | NAME = "decodes" 24 | PACKAGES = find_packages(where="src") 25 | 26 | 27 | META_PATH = os.path.join("src", "decodes", "__init__.py") 28 | # KSTEINFE TODO 29 | 30 | KEYWORDS = ["geometry", "vector", "design"] 31 | CLASSIFIERS = [ 32 | "Development Status :: 5 - Production/Stable", 33 | "Intended Audience :: Developers", 34 | "Intended Audience :: Education", 35 | "Natural Language :: English", 36 | "License :: OSI Approved :: MIT License", 37 | "Operating System :: OS Independent", 38 | "Programming Language :: Python", 39 | "Programming Language :: Python :: 2", 40 | "Programming Language :: Python :: 2.7", 41 | "Programming Language :: Python :: 3", 42 | "Programming Language :: Python :: 3.3", 43 | "Programming Language :: Python :: 3.4", 44 | "Programming Language :: Python :: 3.5", 45 | "Programming Language :: Python :: 3.6", 46 | "Topic :: Multimedia :: Graphics :: 3D Modeling" 47 | ] 48 | INSTALL_REQUIRES = [] 49 | 50 | ################################################################### 51 | 52 | HERE = os.path.abspath(os.path.dirname(__file__)) 53 | 54 | 55 | def read(*parts): 56 | """ 57 | Build an absolute path from *parts* and and return the contents of the 58 | resulting file. Assume UTF-8 encoding. 59 | """ 60 | with codecs.open(os.path.join(HERE, *parts), "rb", "utf-8") as f: 61 | return f.read() 62 | 63 | 64 | META_FILE = read(META_PATH) 65 | 66 | 67 | def find_meta(meta): 68 | """ 69 | Extract __*meta*__ from META_FILE. 70 | """ 71 | meta_match = re.search( 72 | r"^__{meta}__ = ['\"]([^'\"]*)['\"]".format(meta=meta), 73 | META_FILE, re.M 74 | ) 75 | if meta_match: 76 | return meta_match.group(1) 77 | raise RuntimeError("Unable to find __{meta}__ string.".format(meta=meta)) 78 | 79 | 80 | if __name__ == "__main__": 81 | setup( 82 | name=NAME, 83 | description=find_meta("description"), 84 | license=find_meta("license"), 85 | url=find_meta("uri"), 86 | version=find_meta("version"), 87 | author=find_meta("author"), 88 | author_email=find_meta("email"), 89 | maintainer=find_meta("author"), 90 | maintainer_email=find_meta("email"), 91 | keywords=KEYWORDS, 92 | long_description=read("README.rst"), 93 | packages=PACKAGES, 94 | package_dir={"": "src"}, 95 | zip_safe=False, 96 | classifiers=CLASSIFIERS, 97 | install_requires=INSTALL_REQUIRES, 98 | ) 99 | -------------------------------------------------------------------------------- /setup_superseded.py: -------------------------------------------------------------------------------- 1 | # written using this tutorial: http://getpython3.com/diveintopython3/packaging.html 2 | # to build a windows dist, do this: python setup.py bdist_wininst 3 | # to build a simple dist, do this: python setup.py sdist 4 | from distutils.core import setup 5 | setup( 6 | name = 'decodes', 7 | packages = ['decodes','decodes.core', 'decodes.extensions', 'decodes.io', 'decodes.io.rhinoscript'], 8 | version = '0.1.0', 9 | description = 'a geometry library for 3d designers', 10 | url = "http://decod.es", 11 | author='Kyle Steinfeld', 12 | author_email = "ksteinfe@gmail.com", 13 | classifiers = [ 14 | "Programming Language :: Python :: 2.7", 15 | "Topic :: Multimedia :: Graphics :: 3D Modeling" 16 | ], 17 | ) 18 | 19 | -------------------------------------------------------------------------------- /src/decodes/core/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | VERBOSE_FS = False # determines if we verify file system loaded right 3 | VERBOSE = True 4 | 5 | if VERBOSE_FS: print("decodes core loaded") 6 | 7 | EPSILON = 1.0e-10 8 | 9 | from .dc_interval import * 10 | from .dc_color import * 11 | 12 | from .dc_base import * 13 | from .dc_vec import * 14 | from .dc_point import * 15 | 16 | """ 17 | VECTOR CONSTANTS 18 | """ 19 | UX = Vec(1,0,0) 20 | UY = Vec(0,1,0) 21 | UZ = Vec(0,0,1) 22 | 23 | from .dc_graph import * 24 | 25 | from .dc_bounds import * 26 | 27 | from .dc_plane import * 28 | from .dc_cs import * 29 | 30 | from .dc_line import * 31 | from .dc_circle import * 32 | from .dc_tri import * 33 | 34 | from .dc_raster import * 35 | from .dc_grid import * 36 | 37 | from .dc_has_pts import * 38 | from .dc_pline import * 39 | from .dc_mesh import * 40 | from .dc_pgon import * 41 | 42 | from .dc_xform import * 43 | from .dc_intersection import * 44 | 45 | from .dc_curve import * 46 | from .dc_surface import * 47 | 48 | """ 49 | Shifts a List 50 | """ 51 | def shift(lst,n=0): 52 | n = int(n)%len(lst) 53 | return lst[n:] + lst[:n] 54 | 55 | 56 | """ 57 | Matches Relative Indices within a List 58 | """ 59 | def match(lst,rel_idxs): 60 | return list(zip(*[shift(lst,idx) for idx in rel_idxs])) -------------------------------------------------------------------------------- /src/decodes/core/dc_cone.py: -------------------------------------------------------------------------------- 1 | #!python 2 | 3 | from decodes.core import * 4 | # from . import dc_base, dc_interval, dc_vec, dc_point, dc_plane, dc_cs, dc_circle 5 | if VERBOSE_FS: print("dc_cone.py loaded") 6 | import math 7 | 8 | class Cone(Circle): 9 | """ 10 | A 3d right circular cone class 11 | 12 | In the Cartesian coordinate system, an elliptic cone is the locus of an equation of the form: 13 | x2 y2 z2 14 | -- + -- = -- 15 | a2 b2 c2 16 | 17 | """ 18 | def __init__(self, plane, radius, height): 19 | self.height = height 20 | super().__init__(plane, radius) 21 | 22 | def __repr__(self): return "cone[{0},{1},{2},{3},{4},{5} r:{6} h:{7}]".format(self.x,self.y,self.z,self._vec.x,self._vec.y,self._vec.z,self.rad,self.height) 23 | 24 | def contains(self, pt): 25 | # the axis vector, pointing from the base to the tip 26 | cone_axis = self.normal * self.height 27 | # project pt onto axis to find the point's distance along the axis: 28 | cone_dist = math.sqrt(cone_axis.dot(pt - self.origin)) 29 | if cone_dist < 0 or cone_dist > self.height: 30 | # point is above or below cone 31 | return False 32 | 33 | # Then you calculate the cone radius at that point along the axis: 34 | cone_radius = (cone_dist / self.height) * self.rad 35 | # And finally calculate the point's orthogonal distance from the axis to compare against the cone radius: 36 | orth_distance = (pt - self.origin) - self.normal * cone_dist 37 | 38 | if orth_distance > cone_radius: 39 | # point is to the side of the cone 40 | return False 41 | return True 42 | 43 | def volume(self): 44 | """ 45 | V = 1/3 * Ab * h 46 | """ 47 | return((math.pi * self.rad * 2.0 * self.height) / 3) 48 | 49 | # entry point 50 | if __name__ == "__main__": 51 | print("main") 52 | o = Cone(Plane(), 5.0, 10.0) 53 | 54 | print(o) 55 | print("contains %d" % (o.contains(Point(0.0, 0.0, 5.0)))) 56 | print("volume %f" % (o.volume())) 57 | 58 | -------------------------------------------------------------------------------- /src/decodes/core/dc_cylinder.py: -------------------------------------------------------------------------------- 1 | #!python 2 | 3 | from decodes.core import * 4 | # from . import dc_base, dc_interval, dc_vec, dc_point, dc_plane, dc_cs, dc_circle 5 | if VERBOSE_FS: print("dc_cylinder.py loaded") 6 | 7 | 8 | 9 | class Cylinder(Circle): 10 | """ 11 | right circular cylinder 12 | CircleGeometry(radius, segments, thetaStart, thetaLength) 13 | PlaneGeometry(width, height, widthSegments, heightSegments) 14 | CylinderGeometry(radiusTop, radiusBottom, height, radiusSegments, heightSegments, openEnded, thetaStart, thetaLength) 15 | 16 | """ 17 | def __init__(self, plane, radius, height): 18 | self.height = height 19 | super().__init__(plane, radius) 20 | 21 | def __repr__(self): return "cylinder[{0},{1},{2},{3},{4},{5} r:{6} h:{7}]".format(self.x,self.y,self.z,self._vec.x,self._vec.y,self._vec.z,self.rad,self.height) 22 | 23 | def contains(self, pt): 24 | if(self.near_pt(pt).dist(self) >= self.rad): 25 | return False 26 | return super().contains(pt, self.height * 0.5) 27 | 28 | # entry point 29 | if __name__ == "__main__": 30 | print("main") 31 | o = Cylinder(Plane(), 5, 10) 32 | 33 | print(o) 34 | print("contains %d" % (o.contains(Point(4.5,0,4.9)))) 35 | -------------------------------------------------------------------------------- /src/decodes/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | print("extensions loaded") -------------------------------------------------------------------------------- /src/decodes/extensions/cellular_automata.py: -------------------------------------------------------------------------------- 1 | from ..core import * 2 | from ..core import dc_color, dc_base, dc_vec, dc_point, dc_cs, dc_line, dc_mesh, dc_pgon, dc_xform 3 | import copy 4 | print("cellular_automata.py loaded") 5 | 6 | class CA (object): 7 | 8 | def __init__(self,pixel_res=Interval(20,20),include_corners=False,wrap=False): 9 | self.width = int(pixel_res.a) 10 | self.height = int(pixel_res.b) 11 | self.clear(include_corners,wrap) 12 | 13 | def set_cell(self,x,y,val): 14 | x,y = self._reframe(x,y) 15 | self.cells.set(x,y,val) 16 | 17 | # sets the entire field. Expects a list of booleans 18 | def set_cells(self, initial_cell=False): 19 | for n, bool in enumerate(initial_cell): 20 | self.cells._pixels[n] = bool 21 | 22 | # pass a function to be used for each iteration of the automata 23 | # assumes that function takes the status of the home cell, and a list of the statuses of the neighbors 24 | # function returns the new value for the home cell 25 | def set_rule(self,func=False): 26 | self.rule = func 27 | 28 | def get_cell(self,x,y): return self.cells.get(x,y) 29 | 30 | def get_cells(self) : return self.cells 31 | 32 | def _reframe(self,x,y): 33 | while x > self.width -1 : x = x - self.width 34 | while y > self.height -1: y = y - self.height 35 | while x < 0 : x = self.width + x 36 | while y < 0 : y = self.height + y 37 | return x,y 38 | 39 | def clear(self,include_corners,wrap): 40 | self.cells = BoolField(Interval(self.width,self.height),wrap,include_corners) 41 | self.step_count = 0 42 | self.hist = [] 43 | 44 | def record(self): 45 | self.hist.append(self.cells) 46 | 47 | # makes a new generation by calling the function stored in self.rule 48 | 49 | def step(self, t=1.0): 50 | nxt_cells = BoolField(Interval(self.width,self.height),self.cells.wrap,self.cells.include_corners) 51 | t = max(min(1.0,t),0.0) 52 | for x in range(0,self.width): 53 | for y in range(0,self.height): 54 | cur_cell = self.cells.get(x,y) 55 | neighbor_cells = self.cells.neighbors_of(x,y) 56 | nxt_cell = self.rule(cur_cell, neighbor_cells) 57 | nxt_cells.set(x,y,nxt_cell) 58 | self.cells = nxt_cells 59 | self.step_count += 1 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/decodes/extensions/lsystem.py: -------------------------------------------------------------------------------- 1 | from ..core import * 2 | from math import * 3 | from ..core import dc_color, dc_base, dc_vec, dc_point, dc_cs, dc_line, dc_mesh, dc_pgon, dc_xform 4 | import copy 5 | print("lsystem.py loaded") 6 | 7 | 8 | class LEngine(object): 9 | 10 | def __init__(self,axiom): 11 | self.axiom = axiom 12 | self.rules = [] 13 | self.clear() 14 | 15 | def add_rule(self,rulething): 16 | # check on structure of rulething and convert to tuple 17 | rule = rulething 18 | try: 19 | rule.strip() 20 | rule = [str.strip() for str in rulething.split("->")] 21 | except: 22 | try: 23 | rule = rulething[0],rulething[1] 24 | except: 25 | raise TypeError("oh snap") 26 | self.rules.append(rule) 27 | 28 | def clear(self): 29 | self.hist = [self.axiom] 30 | self.rules = [] 31 | 32 | @property 33 | def cur_gen(self): return self.hist[-1] 34 | 35 | def apply_rules(self, char): 36 | # check the rules for the appropriate one to apply 37 | for rule in self.rules: 38 | if char == rule[0]: 39 | return rule[1] 40 | break 41 | return char 42 | 43 | def step(self): 44 | nxt_gen = "" 45 | for chr in self.cur_gen: nxt_gen += str(self.apply_rules(chr)) 46 | self.hist.append(nxt_gen) # add this string to our history 47 | 48 | 49 | class LTurtle(object): 50 | 51 | def __init__(self,instructions): 52 | self.inst = instructions 53 | self.pts = [Point()] 54 | self.css = [CS()] 55 | self.angle = math.pi/4 56 | self.step_size = 1.0 57 | 58 | def go(self): 59 | lines = [] 60 | while len(self.inst)>0: 61 | chr = self.inst[0] 62 | # move the turtle based on the current string character 63 | if chr == '-': #yaw right 64 | self.do_xform(self.css[-1].zAxis,self.angle) 65 | elif chr == '+': #yaw left 66 | self.do_xform(self.css[-1].zAxis,-self.angle) 67 | elif chr == '^': #pitch up 68 | self.do_xform(self.css[-1].xAxis,-self.angle) 69 | elif chr == '&': #pitch down 70 | self.do_xform(self.css[-1].xAxis,self.angle) 71 | elif chr == '}': #roll right 72 | self.do_xform(self.css[-1].yAxis,self.angle) 73 | elif chr == '{': # roll left 74 | self.do_xform(self.css[-1].yAxis,-self.angle) 75 | elif chr == 'F': # draw line 76 | nxt_pt = self.pts[-1] + (self.css[-1].yAxis * self.step_size) 77 | lines.append(Segment(self.pts[-1],nxt_pt)) 78 | self.pts[-1] = nxt_pt 79 | elif chr == '[': #push the stack 80 | self.push(self.pts[-1], self.css[-1]) 81 | elif chr == ']': #pop the stack 82 | self.pop() 83 | self.inst = self.inst[1:] 84 | return lines 85 | 86 | def do_xform(self,axis,angle): 87 | xf = Xform.rotation(axis=axis,angle=angle) 88 | self.css[-1] = self.css[-1] * xf 89 | pass 90 | 91 | def push(self,pt,cs): 92 | self.pts.append(pt) 93 | self.css.append(cs) 94 | 95 | def pop(self): 96 | self.pts = self.pts[:-1] 97 | self.css = self.css[:-1] 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/decodes/extensions/parse_epw.py: -------------------------------------------------------------------------------- 1 | import decodes.core as dc 2 | from decodes.core import * 3 | 4 | # number of lines in the header 5 | # holds true for ALL EPW files 6 | number_of_epw_header_lines = 8 7 | # a dictionary that maps keystrings to column positions 8 | # not a comprehensive list. for a complete listing, see 9 | # apps1.eere.energy.gov/buildings/energyplus/ 10 | # pdfs/weatherdatainformation.pdf 11 | epw_keycols = { 12 | "DirNormIrad": 14, #direct normal irradiance (w/m2) 13 | "DifHorzIrad": 15, #diffuse horizontal irradiance (w/m2) 14 | "OpqSkyCvr": 23 , #opaque sky cover (tenths of sky) 15 | "DryBulbTemp": 6 , #dry bulb temperature (deg C) 16 | "DewPtTemp": 7 , #dew point temperature (deg C) 17 | "RelHumid": 8 , #relative humidity (%) 18 | "Pressure": 9 , #atmospheric station pressure (Pa) 19 | "WindDir": 20 , #wind direction (degrees) 20 | "WindSpd": 21 , #wind speed (m/s) 21 | "PreciptWater": 28 , #precipitable water (mm) 22 | "AeroDepth": 29 , #aerosol depth (1000ths) 23 | "SnowDepth": 30 , #snow depth (cm) 24 | "YearOfSample": 0 , #year of sample data 25 | } 26 | 27 | def epw_metadata(path): 28 | """ returns the metadata of an EPW file 29 | path (string) filepath to the EPW file 30 | out: a dict containing EPW metadata 31 | """ 32 | with open(path) as myfile: 33 | head=[next(myfile) for x in range(number_of_epw_header_lines)] 34 | 35 | #city,state/province/region,country,data source,wmo number,lat,long,timezone,elevation 36 | #LOCATION,San Francisco Intl Ap,CA,USA,TMY3,724940,37.62,-122.40,-8.0,2.0 37 | dict = {} 38 | vals = head[0].split(",") 39 | dict['name'] = vals[1] 40 | dict['state'] = vals[2] 41 | dict['country'] = vals[3] 42 | dict['datasource'] = vals[4] 43 | dict['wmo'] = int(vals[5]) 44 | dict['lat'] = float(vals[6]) 45 | dict['long'] = float(vals[7]) 46 | dict['timezone'] = float(vals[8]) 47 | dict['elevation'] = float(vals[9]) 48 | return dict 49 | 50 | def parse_epw_file(path, desired_keys): 51 | """ parses an EPW file and returns structured data 52 | path (string) filepath to the EPW file 53 | desired_keys ([string]) keys indicating the values to be returned. only keys listed in epw_keycols may be used. 54 | out: if desired_keys is a single string, an array of floats is returned, if desired_keys is an array of keys, an array of dicts is returned. 55 | """ 56 | skip = number_of_epw_header_lines 57 | file = open(path) # open the file 58 | lineno = 0 # keeps track of how many lines have been parsed 59 | hours = [] #initalize an empty list where we'll store our dicts 60 | for line in file: 61 | if lineno >= skip : # only parse this line if past the header 62 | hourdict = _parse_epw_line(line, desired_keys) # parse line 63 | if hourdict is not None : 64 | hours.append(hourdict) 65 | lineno += 1 # keep track of how many lines have been parsed 66 | if lineno > 8760+skip : break 67 | return hours 68 | 69 | def _parse_epw_line(string, desired_keys): 70 | vals = string.split(",") 71 | if isinstance(desired_keys, str): 72 | return float(vals[epw_keycols[desired_keys]]) 73 | else : 74 | return {k:float(vals[epw_keycols[k]]) for k in desired_keys} 75 | -------------------------------------------------------------------------------- /src/decodes/extensions/poisson_sampling.py: -------------------------------------------------------------------------------- 1 | import decodes.core as dc 2 | from decodes.core import * 3 | import math as m 4 | import random 5 | 6 | class Poisson_Sampler(): 7 | 8 | def __init__(self, bds, r): 9 | 10 | self.r = r 11 | self.r_sqr = r*r 12 | self.cell_size = r/m.sqrt(2) 13 | self.dom_x, self.dom_y = bds.ival_x, bds.ival_y 14 | self.len_row = int(m.ceil(self.dom_x.b/self.cell_size)) 15 | self.len_col = int(m.ceil(self.dom_y.b/self.cell_size)) 16 | self.cells = {} 17 | self.graph = Graph() 18 | 19 | for xi in range(self.len_row): 20 | for yi in range(self.len_col): 21 | self.cells[(xi,yi)] = [] 22 | 23 | for cell in self.cells: 24 | if cell[0] max_cycles: 82 | print('stopped after {} cycles'.format(max_cycles)) 83 | break 84 | 85 | return sample_points -------------------------------------------------------------------------------- /src/decodes/extensions/solar_geometry.py: -------------------------------------------------------------------------------- 1 | # SolarGeometry module 2 | import decodes.core as dc 3 | from decodes.core import * 4 | import datetime 5 | import math 6 | 7 | class SolarGeom(): 8 | def __init__(self,latitude,longitude,timezone): 9 | self.lat = latitude 10 | self.lng = longitude 11 | self.tmz = timezone 12 | 13 | #determine the sun vector for given coordinates, day of the year, local time. 14 | def vec_at(self,day_of_year,hour_of_day): 15 | altitude, azimuth = self.altazi_at(day_of_year,hour_of_day) 16 | x = math.cos(altitude)*math.sin(azimuth) 17 | y = math.cos(altitude)*math.cos(azimuth) 18 | z = math.sin(altitude) 19 | return Vec(x, y, z) 20 | 21 | def altazi_at(self,day_of_year,hour_of_day): 22 | altitude, azimuth, d, o = self.angles_at(day_of_year,hour_of_day) 23 | return altitude, azimuth 24 | 25 | def angles_at(self,day_of_year,hour_of_day): 26 | """ 27 | calculates the following solar position angles for given coordinates, integer day of the year (0->365), local time. 28 | Altitude 29 | Azimuth 30 | Declination 31 | Hour Angle 32 | all output in radians 33 | """ 34 | alpha = self._calc_alpha(day_of_year, hour_of_day) 35 | #calculate Declination Angle 36 | declination = 0.396372-22.91327*math.cos(alpha)+4.02543*math.sin(alpha)-0.387205*math.cos(2*alpha)+0.051967*math.sin(2*alpha)-0.154527*math.cos(3*alpha)+0.084798*math.sin(3*alpha) 37 | declination_rad = math.radians(declination) 38 | 39 | # time correction for solar angle 40 | TC = 0.004297+0.107029*math.cos(alpha)-1.837877*math.sin(alpha)-0.837378*math.cos(2*alpha)-2.340475*math.sin(2*alpha) 41 | # calculate Solar Hour Angle, angle between local longitude and solar noon 42 | hour_angle = (hour_of_day-12-self.tmz)*(360/24) + self.lng + TC 43 | if hour_angle >= 180: 44 | hour_angle = hour_angle - 360 45 | if hour_angle <= -180: 46 | hour_angle = hour_angle + 360 47 | hour_angle_rad = math.radians(hour_angle) 48 | 49 | #calc Altitude Angle 50 | lat_rad = math.radians(self.lat) 51 | cos_zenith= math.sin(lat_rad)*math.sin(declination_rad)+math.cos(lat_rad)*math.cos(declination_rad)*math.cos(hour_angle_rad) 52 | if cos_zenith>1: 53 | cos_zenith = 1 54 | if cos_zenith<-1: 55 | cos_zenith = -1 56 | 57 | zenith_rad = math.acos(cos_zenith) 58 | altitude_rad = math.asin(cos_zenith) 59 | 60 | #calc Azimuth angle 61 | cos_azimuth = (math.sin(declination_rad)-math.sin(lat_rad)*math.cos(zenith_rad))/(math.cos(lat_rad)*math.sin(zenith_rad)) 62 | azimuth = math.degrees(math.acos(cos_azimuth)) 63 | if hour_angle_rad > 0: 64 | azimuth = 360-azimuth 65 | azimuth_rad = math.radians(azimuth) 66 | 67 | return altitude_rad, azimuth_rad, declination_rad, hour_angle_rad 68 | 69 | 70 | 71 | @staticmethod 72 | def _calc_alpha(day_in, hour_in): 73 | """ 74 | calculates alpha = ecliptic longitude, varying from alpha = 0 completing 360 in 1 year. 75 | """ 76 | alphaOut = (360/365.25)*(day_in + hour_in/24) 77 | return math.radians(alphaOut) 78 | 79 | @staticmethod 80 | def str_to_day_of_year(date_in): 81 | """ 82 | converts a date given as "mo/day" into a day of year 83 | """ 84 | daysInMonth= [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] 85 | (month, day) = date_in.split('/') 86 | dayOut = 0; 87 | for m in range(1,int(month)): 88 | dayOut = dayOut + daysInMonth[m-1] 89 | dayOut = dayOut + int(day) 90 | return dayOut 91 | 92 | @staticmethod 93 | def str_to_decimal_hour(time_in): 94 | """ 95 | converts 24h time into a decimal hour 96 | """ 97 | (hour, minutes) = time_in.split(':') 98 | return int(hour) + int(minutes)/60.0 99 | 100 | -------------------------------------------------------------------------------- /src/decodes/extensions/voxel.py: -------------------------------------------------------------------------------- 1 | import decodes.core as dc 2 | from decodes.core import * 3 | import math 4 | 5 | class VoxelField(Geometry): 6 | """ 7 | Currently rounds down to nearest whole Voxel 8 | 9 | """ 10 | def __init__(self, boundary, res_x, res_y, res_z, initial_value = 0.0): 11 | self.bnds = boundary 12 | self._res_x = res_x 13 | self._res_y = res_y 14 | self._res_z = res_z 15 | self._stack = tuple(ValueField(Interval(res_x,res_y),initial_value) for z in range(self._res_z)) 16 | 17 | @property 18 | def res_x(self): 19 | return self._res_x 20 | 21 | @property 22 | def res_y(self): 23 | return self._res_y 24 | 25 | @property 26 | def res_z(self): 27 | return self._res_z 28 | 29 | @property 30 | def bnds(self): 31 | return self._bnds 32 | 33 | @bnds.setter 34 | def bnds(self,value): 35 | self._dim_pixel = None 36 | self._dim_pixel2 = None 37 | self._bnds = value 38 | 39 | @property 40 | def dim_pixel(self): 41 | """ 42 | returns the spatial dimensions of a single pixel of this voxel grid as a vector 43 | """ 44 | if self._dim_pixel is None : self._dim_pixel = Vec(self.bnds.dim_x / self._res_x , self.bnds.dim_y / self._res_y, self.bnds.dim_z / self._res_z) 45 | return self._dim_pixel 46 | 47 | @property 48 | def dim_pixel2(self): 49 | """ 50 | returns the spatial dimensions of HALF OF a single pixel of this voxel grid as a tuple 51 | """ 52 | if self._dim_pixel2 is None : self._dim_pixel2 = self._dim_pixel = Vec(self.bnds.dim_x / self._res_x , self.bnds.dim_y / self._res_y, self.bnds.dim_z / self._res_z) / 2.0 53 | return self._dim_pixel2 54 | 55 | @property 56 | def max_value(self): 57 | return max([tray.max_value for tray in stack]) 58 | 59 | @property 60 | def min_value(self): 61 | return min([tray.max_value for tray in stack]) 62 | 63 | def set(self,x,y,z,value) : 64 | if x<0 or x>self._res_x-1 : raise IndexError("x out of bounds. this voxel field has %s pixels in the x direction and you asked to set %s"%(self._res_x,x)) 65 | if y<0 or y>self._res_y-1 : raise IndexError("y out of bounds. this voxel field has %s pixels in the y direction and you asked to set %s"%(self._res_y,y)) 66 | if z<0 or z>self._res_z-1 : raise IndexError("z out of bounds. this voxel field has %s pixels in the z direction and you asked to set %s"%(self._res_z,z)) 67 | self._stack[z]._pixels[int(self.res_y*y+x)] = value 68 | 69 | def get(self,x,y,z) : 70 | if x<0 or x>self._res_x-1 : raise IndexError("x out of bounds. this voxel field has %s pixels in the x direction and you asked for %s"%(self._res_x,x)) 71 | if y<0 or y>self._res_y-1 : raise IndexError("y out of bounds. this voxel field has %s pixels in the y direction and you asked for %s"%(self._res_y,y)) 72 | if z<0 or z>self._res_z-1 : raise IndexError("z out of bounds. this voxel field has %s pixels in the z direction and you asked for %s"%(self._res_z,z)) 73 | return self._stack[z]._pixels[int(self.res_y*y+x)] 74 | 75 | def cpt_at(self,x,y,z): 76 | """ 77 | returns the centerpoint of the pixel referenced by the given address 78 | """ 79 | if x<0 or x>self._res_x-1 : raise IndexError("x out of bounds. this voxel field has %s pixels in the x direction and you asked for %s"%(self._res_x,x)) 80 | if y<0 or y>self._res_y-1 : raise IndexError("y out of bounds. this voxel field has %s pixels in the y direction and you asked for %s"%(self._res_y,y)) 81 | if z<0 or z>self._res_z-1 : raise IndexError("z out of bounds. this voxel field has %s pixels in the z direction and you asked for %s"%(self._res_z,z)) 82 | pt = self.bnds.eval(float(x)/float(self._res_x),float(y)/float(self._res_y),float(z)/float(self._res_z)) 83 | pt = pt + self.dim_pixel2 84 | pt.val = self._stack[z]._pixels[int(self.res_y*y+x)] 85 | return pt 86 | 87 | def to_pts(self) : 88 | pts = [] 89 | for z in range(self.res_z): 90 | for y in range(self.res_y): 91 | for x in range(self.res_x): 92 | pts.append(self.cpt_at(x,y,z)) 93 | return pts -------------------------------------------------------------------------------- /src/decodes/io/__init__.py: -------------------------------------------------------------------------------- 1 | print("io loaded") 2 | -------------------------------------------------------------------------------- /src/decodes/io/jsonpickle/compat.py: -------------------------------------------------------------------------------- 1 | import sys 2 | 3 | # True if we are running on Python 3. 4 | PY3 = sys.version_info[0] == 3 5 | PY32 = PY3 and sys.version_info[1] == 2 6 | PY2 = not PY3 7 | 8 | try: 9 | bytes = bytes 10 | except NameError: 11 | bytes = str 12 | 13 | try: 14 | set = set 15 | except NameError: 16 | from sets import Set as set 17 | set = set 18 | 19 | try: 20 | str = str 21 | except NameError: 22 | str = str 23 | 24 | try: 25 | long = int 26 | except NameError: 27 | long = int 28 | 29 | try: 30 | chr = chr 31 | except NameError: 32 | chr = chr 33 | -------------------------------------------------------------------------------- /src/decodes/io/jsonpickle/tags.py: -------------------------------------------------------------------------------- 1 | """The jsonpickle.tags module provides the custom tags 2 | used for pickling and unpickling Python objects. 3 | 4 | These tags are keys into the flattened dictionaries 5 | created by the Pickler class. The Unpickler uses 6 | these custom key names to identify dictionaries 7 | that need to be specially handled. 8 | """ 9 | from .compat import set 10 | 11 | ID = 'py_id' 12 | OBJECT = 'py_object' 13 | TYPE = 'py_type' 14 | REPR = 'py_repr' 15 | REF = 'py_ref' 16 | TUPLE = 'py_tuple' 17 | SET = 'py_set' 18 | SEQ = 'py_seq' 19 | STATE = 'py_state' 20 | JSON_KEY = 'json://' 21 | 22 | # All reserved tag names 23 | RESERVED = set([OBJECT, TYPE, REPR, REF, TUPLE, SET, SEQ, STATE]) 24 | -------------------------------------------------------------------------------- /src/decodes/io/jsonpickle/version.py: -------------------------------------------------------------------------------- 1 | VERSION = '0.7.1' 2 | -------------------------------------------------------------------------------- /src/decodes/io/jupyter_out.py: -------------------------------------------------------------------------------- 1 | from .. import * 2 | from ..core import * 3 | from ..core import dc_base, dc_vec, dc_point, dc_cs, dc_line, dc_mesh, dc_pgon 4 | from . import outie 5 | from . import svg_out 6 | if VERBOSE_FS: print("jupyter_out loaded") 7 | 8 | import os, sys, math 9 | import io 10 | 11 | class JupyterOut(svg_out.SVGOut): 12 | """outie for writing stuff to a Jupyter notebook""" 13 | 14 | point_size = 4 15 | default_canvas_dimensions = Interval(560,360) 16 | html_template = '
{}
' 17 | default_scale = 10.0 18 | default_grid_color = Color(0.98,0.98,0.98) 19 | 20 | def __init__(self, scale=False, grid_bnds=False, grid_color=False): 21 | if not scale: scale = JupyterOut.default_scale 22 | super(JupyterOut,self).__init__( 23 | "", 24 | canvas_dimensions = JupyterOut.default_canvas_dimensions, 25 | flip_y = True, 26 | center_on_origin = True, 27 | scale = scale, 28 | save_file = False, 29 | verbose = False 30 | ) 31 | 32 | self.grid_bnds = grid_bnds 33 | self.grid_color = grid_color 34 | if not self.grid_color: self.grid_color = JupyterOut.default_grid_color 35 | self.put_reference_geom() 36 | 37 | def put_reference_geom(self): 38 | # grid set to 1-unit cells 39 | # grid extents set by y-dimension 40 | 41 | if self.grid_bnds: 42 | for bnd in self.grid_bnds: 43 | pl = bnd.to_pline() 44 | pl.set_fill(self.grid_color) 45 | pl.set_color(1,1,1) 46 | pl.set_weight(1) 47 | self.put( pl ) 48 | 49 | pt = Point() 50 | pt.set_weight(min(self.grid_bnds[0].dim_x, self.grid_bnds[0].dim_y ) * 0.5 * self._scale ) 51 | pt.set_color(1,1,1) 52 | self.put(pt) 53 | 54 | ''' 55 | ext = self._canvas_dim.b / 2 / self._scale 56 | cnt = int(ext/self.cell_size - 1) * 2 57 | ext = cnt * self.cell_size 58 | 59 | for ival_y in Interval(-ext/2,ext/2)//cnt: 60 | for ival_x in Interval(-ext/2,ext/2)//cnt: 61 | pt = Point(ival_x.a,ival_y.a) + Vec(0.5,0.5) 62 | pg = PGon.rectangle(pt,1,1) 63 | pg.set_fill(0.95,0.95,0.95) 64 | pg.set_color(1,1,1) 65 | pg.set_weight(1) 66 | self.put( pg ) 67 | ''' 68 | 69 | def draw(self): 70 | from IPython.core.display import display, HTML 71 | 72 | super(JupyterOut,self).draw() 73 | 74 | display(HTML(JupyterOut.html_template.format( 75 | self._canvas_dim.a, 76 | self._canvas_dim.b, 77 | self.svg 78 | ))) 79 | 80 | def clear(self): 81 | super(JupyterOut,self).clear() 82 | self.put_reference_geom() 83 | 84 | 85 | @staticmethod 86 | def origin_centered(scale=10, half_cell_count=16): 87 | # fits well to a canvas dimension of 560,360 88 | ext = half_cell_count 89 | bnds = Bounds(ival_x = Interval(-ext,ext), ival_y = Interval(-ext,ext) ) 90 | bnds = bnds // half_cell_count * 2 91 | return JupyterOut(scale=scale, grid_bnds=bnds) 92 | 93 | @staticmethod 94 | def two_pi(scale=40, grid_color=False): 95 | # fits well to a canvas dimension of 560,360 96 | ext_x = math.pi*2 97 | ext_y = 4.0 98 | bnds = Bounds(ival_x = Interval(-ext_x,ext_x), ival_y = Interval(-ext_y,ext_y) ) 99 | bnds = bnds // 8 100 | return JupyterOut(scale=scale, grid_bnds=bnds, grid_color=grid_color) 101 | 102 | @staticmethod 103 | def unit_square(scale=300, grid_color=False): 104 | # fits well to a canvas dimension of 560,360 105 | 106 | bnds = Bounds(ival_x = Interval(), ival_y = Interval() ) 107 | bnds = bnds // 4 108 | 109 | out = JupyterOut(scale=scale, grid_bnds=bnds, grid_color=grid_color) 110 | out._xf *= Xform.translation(Vec(-0.5,-0.5)) 111 | return out 112 | -------------------------------------------------------------------------------- /src/decodes/io/outie.py: -------------------------------------------------------------------------------- 1 | from decodes import * 2 | from decodes.core import * 3 | from decodes.core import dc_base, dc_color 4 | 5 | if VERBOSE_FS: print("outie loaded") 6 | import copy, collections 7 | 8 | class Outie(object): 9 | """base outie class""" 10 | 11 | def __init__(self): 12 | self.iconscale = 1.0 # a scale factor for icons 13 | self.geom = [] # a simple list of geometry 14 | self._allow_foreign = False 15 | 16 | def __iadd__(self, other): 17 | #todo: outie += other_outie should combine these outies 18 | self.put(other) 19 | return self 20 | 21 | def put(self,ngeom): 22 | 23 | if self._allow_foreign : 24 | self.geom.append(copy.deepcopy(ngeom)) # if we allow foreigners, just put in whatever they gave us 25 | else: 26 | if ngeom is None : return 27 | if isinstance(ngeom, (Geometry) ) : 28 | if isinstance(ngeom, (HasBasis) ) and ngeom.do_translate : 29 | try: 30 | ngeom = ngeom.basis_applied() 31 | # self.geom.append(copy.deepcopy(ngeom)) 32 | self.geom.append(ngeom) 33 | except: 34 | self.geom.append(ngeom) 35 | else: 36 | self.geom.append(ngeom) 37 | elif isinstance(ngeom, collections.Iterable) : 38 | for g in ngeom : self.put(g) 39 | else : 40 | raise NotImplementedError("This doesn't look like Decodes Geometry!\nThis outie doesn't allow foreigners!\n{0}".format(ngeom)) 41 | 42 | 43 | def draw(self, clear_buffer = False): 44 | #iterates over the geom list, 45 | #calls the (hopefully overridden) draw function for each geometric object 46 | #returns a list of successful writes 47 | self._startDraw() 48 | try: 49 | results = list(map(self._drawGeom, self.geom)) 50 | if False in results: 51 | print("dump not completely successful, the following geometry was not written:") 52 | i = -1 53 | try: 54 | while 1: 55 | i = results.index(False, i+1) 56 | print(str(i) , self.geom[i]) 57 | except ValueError: 58 | pass 59 | 60 | self._endDraw() #finish up anything we need to in our drawing context 61 | if clear_buffer: self.clear() #empty the outie after each draw 62 | return results 63 | except: 64 | self._endDraw() 65 | raise 66 | 67 | 68 | def clear(self): 69 | self.geom = [] 70 | 71 | def set_color(self,a,b=None,c=None): 72 | if not hasattr(self, 'props') : self.props = {} 73 | if isinstance(a, (Color) ) : self.props['color'] = a 74 | else : self.props['color'] = Color(a,b,c) 75 | 76 | def _startDraw(self): 77 | pass 78 | 79 | def _endDraw(self): 80 | pass -------------------------------------------------------------------------------- /src/decodes/io/pyautocad/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | pyautocad 5 | ~~~~~~~~~ 6 | 7 | AutoCAD Automation for Python. 8 | 9 | :copyright: (c) 2012 by Roman Haritonov. 10 | :license: BSD, see LICENSE.txt for more details. 11 | """ 12 | __docformat__ = 'restructuredtext en' 13 | __version__ = '0.1.2' 14 | 15 | from .api import * 16 | from .types import * 17 | -------------------------------------------------------------------------------- /src/decodes/io/pyautocad/cache.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | .. versionadded:: 0.1.2 5 | 6 | pyautocad.cache 7 | ~~~~~~~~~~~~~~~ 8 | 9 | Proxy to cache all object attributes. 10 | 11 | :copyright: (c) 2012 by Roman Haritonov. 12 | :license: BSD, see LICENSE.txt for more details. 13 | """ 14 | 15 | 16 | class Cached(object): 17 | """ 18 | Proxy for caching object attributes. 19 | 20 | Consider external class `Foo` with expensive property (we can't change its code):: 21 | 22 | class Foo(object): 23 | @property 24 | def x(self): 25 | print 'consuming time' 26 | time.sleep(1) 27 | return 42 28 | 29 | Cache all attributes and test access:: 30 | 31 | foo = Foo() 32 | cached_foo = Cached(foo) 33 | for i in range(10): 34 | print cached_foo.x 35 | 36 | Output:: 37 | 38 | consuming time 39 | 42 40 | 42 41 | 42 42 | 42 43 | 42 44 | 45 | It's possible to switch caching off with :meth:`switch_caching` 46 | and retrieve original instance with :meth:`get_original` 47 | """ 48 | def __init__(self, instance): 49 | object.__setattr__(self, '_instance', instance) 50 | object.__setattr__(self, '_is_enabled', True) 51 | object.__setattr__(self, '_storage', {}) 52 | 53 | def get_original(self): 54 | """ Returns original instance 55 | """ 56 | return self._instance 57 | 58 | def switch_caching(self, is_enabled): 59 | """ Switch caching on or off 60 | 61 | :param is_enabled: caching status `True` or `False` 62 | :type is_enabled: bool 63 | """ 64 | self._is_enabled = is_enabled 65 | if not is_enabled: 66 | self._storage = {} 67 | 68 | def __setattr__(self, key, value): 69 | if key in self.__dict__: 70 | return object.__setattr__(self, key, value) 71 | object.__setattr__(self._instance, key, value) 72 | if self._is_enabled: 73 | self._storage[key] = value 74 | 75 | def __getattr__(self, key): 76 | if key in self.__dict__: 77 | return object.__getattribute__(self, key) 78 | storage = self._storage 79 | if self._is_enabled and key in storage: 80 | return storage[key] 81 | value = getattr(self._instance, key) 82 | storage[key] = value 83 | return value 84 | 85 | def __delattr__(self, key): 86 | if key in self.__dict__: 87 | return object.__delattr__(self, key) 88 | if key in self._storage: 89 | del self._storage[key] 90 | object.__delattr__(self._instance, key) 91 | 92 | 93 | 94 | 95 | if __name__ == "__main__": 96 | import time 97 | 98 | class Foo(object): 99 | @property 100 | def x(self): 101 | print('consuming time') 102 | time.sleep(1) 103 | return 42 104 | 105 | foo = Foo() 106 | cached_foo = Cached(foo) 107 | for i in range(5): 108 | print(cached_foo.x) -------------------------------------------------------------------------------- /src/decodes/io/pyautocad/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/src/decodes/io/pyautocad/contrib/__init__.py -------------------------------------------------------------------------------- /src/decodes/io/pyautocad/utils.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | """ 4 | pyautocad.utils 5 | ~~~~~~~~~~~~~~~ 6 | 7 | Utility functions for work with texts, tables, etc. 8 | 9 | :copyright: (c) 2012 by Roman Haritonov. 10 | :license: BSD, see LICENSE.txt for more details. 11 | """ 12 | 13 | import sys 14 | import re 15 | import time 16 | from contextlib import contextmanager 17 | 18 | 19 | def unformat_mtext(s, exclude_list=('P', 'S')): 20 | """Returns string with removed format information 21 | 22 | :param s: string with multitext 23 | :param exclude_list: don't touch tags from this list. Default ('P', 'S') for 24 | newline and fractions 25 | 26 | :: 27 | 28 | >>> text = ur'{\\fGOST type A|b0|i0|c204|p34;TEST\\fGOST type A|b0|i0|c0|p34;123}' 29 | >>> unformat_mtext(text) 30 | u'TEST123' 31 | 32 | """ 33 | s = re.sub(r'\{?\\[^%s][^;]+;' % ''.join(exclude_list), '', s) 34 | s = re.sub(r'\}', '', s) 35 | return s 36 | 37 | 38 | def mtext_to_string(s): 39 | """ 40 | Returns string with removed format innformation as :func:`unformat_mtext` and 41 | `\\P` (paragraphs) replaced with newlines 42 | 43 | :: 44 | 45 | >>> text = ur'{\\fGOST type A|b0|i0|c204|p34;TEST\\fGOST type A|b0|i0|c0|p34;123}\\Ptest321' 46 | >>> mtext_to_string(text) 47 | u'TEST123\\ntest321' 48 | 49 | """ 50 | 51 | return unformat_mtext(s).replace('\\P', '\n') 52 | 53 | 54 | def string_to_mtext(s): 55 | """Returns string in Autocad multitext format 56 | 57 | Replaces newllines `\\\\n` with `\\\\P`, etc. 58 | """ 59 | return s.replace('\\', '\\\\').replace('\n', '\P') 60 | 61 | 62 | def text_width(text_item): 63 | """Returns width of Autocad `Text` or `MultiText` object 64 | """ 65 | bbox_min, bbox_max = text_item.GetBoundingbox() 66 | return bbox_max[0] - bbox_min[0] 67 | 68 | 69 | @contextmanager 70 | def suppressed_regeneration_of(table): 71 | """ .. versionadded:: 0.1.2 72 | 73 | Context manager. Suppresses table regeneration to dramatically speedup table operations 74 | 75 | :param table: table object 76 | 77 | :: 78 | 79 | with suppressed_regeneration_of(table): 80 | populate(table) # or change its properties 81 | 82 | """ 83 | # TODO: find the way to suppress regeneration of other objects 84 | table.RegenerateTableSuppressed = True 85 | try: 86 | yield 87 | finally: 88 | table.RegenerateTableSuppressed = False 89 | 90 | @contextmanager 91 | def timing(message='Elapsed'): 92 | """ Context manager for timing execution 93 | 94 | :param message: message to print 95 | 96 | Usage:: 97 | 98 | with timing('some operation'): 99 | do_some_actions() 100 | 101 | Will print:: 102 | 103 | some operation: 1.000 s # where 1.000 is actual execution time 104 | 105 | """ 106 | begin = time.time() 107 | try: 108 | yield begin 109 | finally: 110 | elapsed = (time.time() - begin) 111 | print('%s: %.3f s' % (message, elapsed)) 112 | 113 | 114 | 115 | 116 | def dynamic_print(text): 117 | """Prints text dynamically in one line 118 | 119 | Used for printing something like animations, or progress 120 | """ 121 | sys.stdout.write('\r%s' % text) 122 | sys.stdout.flush() 123 | -------------------------------------------------------------------------------- /src/decodes/io/rhino_in.py: -------------------------------------------------------------------------------- 1 | from .. import * 2 | from ..core import * 3 | from ..core import dc_base, dc_vec, dc_point, dc_cs, dc_line, dc_mesh, dc_pgon, dc_xform 4 | import rhinoscriptsyntax as rs 5 | if VERBOSE_FS: print("rhino_in loaded") 6 | 7 | 8 | class RhinoIn(): 9 | """innie for pulling stuff from rhino""" 10 | """based on Rhinoscript package""" 11 | 12 | def __init__(self): 13 | pass 14 | 15 | def get_point(self, prompt="select a point"): 16 | rh_point = rs.GetPoint(prompt) 17 | return Point(rh_point[0],rh_point[1],rh_point[2]) 18 | 19 | def get_mesh(self, prompt="select a mesh", triangulate=False): 20 | mesh_id = rs.GetObject(prompt, 32, True) 21 | rh_mesh = rs.coercemesh(mesh_id) 22 | 23 | verts = [Point(rh_pt.X,rh_pt.Y,rh_pt.Z) for rh_pt in rh_mesh.Vertices] 24 | faces = [] 25 | for rh_fc in rh_mesh.Faces : 26 | if triangulate: 27 | faces.append([rh_fc[0],rh_fc[1],rh_fc[2]]) #add the first three points of each face 28 | if rh_fc[2] != rh_fc[3] : 29 | faces.append([rh_fc[0],rh_fc[2],rh_fc[3]]) #if face is a quad, add the missing triangle 30 | else : 31 | if rh_fc[2] == rh_fc[3] : faces.append([rh_fc[0],rh_fc[1],rh_fc[2]]) 32 | else : faces.append([rh_fc[0],rh_fc[1],rh_fc[2],rh_fc[3]]) 33 | 34 | return Mesh(verts,faces) 35 | 36 | 37 | def from_rgvec(rg_vec): 38 | return Vec(rg_vec.X,rg_vec.Y,rg_vec.Z) 39 | 40 | def from_rgpt(rg_pt): 41 | return Point(rg_pt.X,rg_pt.Y,rg_pt.Z) 42 | 43 | def from_rgplane(rh_plane): 44 | cpt = from_rgpt(rh_plane.Origin) 45 | x_axis = from_rgvec(rh_plane.XAxis) 46 | y_axis = from_rgvec(rh_plane.YAxis) 47 | return CS(cpt,x_axis,y_axis) 48 | 49 | def from_rgpolyline(gh_polyline): 50 | if gh_polyline.IsClosed : 51 | gh_curve = gh_polyline.ToNurbsCurve() 52 | isplanar, plane = gh_curve.TryGetPlane() 53 | if isplanar : 54 | cs = from_rgplane(plane) 55 | w_verts = [from_rgpt(gh_polyline[i]) for i in range(len(gh_polyline))] 56 | verts = [ Vec(pt*cs.ixform) for pt in w_verts ] 57 | if (verts[0]==verts[-1]) : del verts[-1] #remove last vert if a duplicate 58 | return PGon(verts,cs) 59 | else: 60 | warnings.warn("Cannot import non-planar closed polyline as PGon, attempting to import as a PLine") 61 | 62 | # if we've gotten this far, then the pline isn't closed, or is closed and non-planar 63 | gh_curve = gh_polyline.ToNurbsCurve() 64 | w_verts = [from_rgpt(gh_polyline[i]) for i in range(len(gh_polyline))] 65 | return PLine(w_verts) 66 | 67 | 68 | def from_rgtransform(rh_xf): 69 | xf = Xform() 70 | xf.m00, xf.m01, xf.m02, xf.m03 = rh_xf.M00, rh_xf.M01, rh_xf.M02, rh_xf.M03 71 | xf.m10, xf.m11, xf.m12, xf.m13 = rh_xf.M10, rh_xf.M11, rh_xf.M12, rh_xf.M13 72 | xf.m20, xf.m21, xf.m22, xf.m23 = rh_xf.M20, rh_xf.M21, rh_xf.M22, rh_xf.M23 73 | xf.m30, xf.m31, xf.m32, xf.m33 = rh_xf.M30, rh_xf.M31, rh_xf.M32, rh_xf.M33 74 | return xf 75 | 76 | -------------------------------------------------------------------------------- /src/decodes/io/rhinoscript/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/src/decodes/io/rhinoscript/__init__.py -------------------------------------------------------------------------------- /src/decodes/io/rhinoscript/linetype.py: -------------------------------------------------------------------------------- 1 | import scriptcontext 2 | from . import utility as rhutil 3 | import Rhino 4 | 5 | 6 | def __getlinetype(name_or_id): 7 | id = rhutil.coerceguid(name_or_id) 8 | if id: name_or_id = id 9 | linetype = scriptcontext.doc.Linetypes.Find(name_or_id, True) 10 | if linetype>=0: return scriptcontext.doc.Linetypes[linetype] 11 | 12 | 13 | def IsLinetype(name_or_id): 14 | """Verifies the existance of a linetype in the document 15 | Returns: True or False 16 | """ 17 | lt = __getlinetype(name_or_id) 18 | return lt is not None 19 | 20 | 21 | def IsLinetypeReference(name_or_id): 22 | """Verifies that an existing linetype is from a reference file 23 | Returns: True or False 24 | """ 25 | lt = __getlinetype(name_or_id) 26 | if lt is None: raise ValueError("unable to coerce %s into linetype"%name_or_id) 27 | return lt.IsReference 28 | 29 | 30 | def LinetypeCount(): 31 | "Returns number of linetypes in the document" 32 | return scriptcontext.doc.Linetypes.Count 33 | 34 | 35 | def LinetypeNames(sort=False): 36 | """Returns names of all linetypes in the document 37 | Parameters: 38 | sort[opt] = return a sorted list of the linetype names 39 | Returns 40 | list of strings if successful 41 | """ 42 | count = scriptcontext.doc.Linetypes.Count 43 | rc = [] 44 | for i in range(count): 45 | linetype = scriptcontext.doc.Linetypes[i] 46 | if not linetype.IsDeleted: rc.append(linetype.Name) 47 | if sort: rc.sort() 48 | return rc 49 | -------------------------------------------------------------------------------- /src/decodes/io/threejs_out.py: -------------------------------------------------------------------------------- 1 | from .. import * 2 | from ..core import * 3 | from ..core import dc_base, dc_vec, dc_point, dc_cs, dc_line, dc_mesh, dc_pgon 4 | from . import outie 5 | if VERBOSE_FS: print("threejs_out loaded") 6 | 7 | import os, sys, math 8 | import io 9 | 10 | class ThreeJSOut(outie.Outie): 11 | """outie for writing stuff to a ThreeJS scene file""" 12 | 13 | default_color = Color(0) 14 | point_size = 2 15 | min_point_size = 0.001 16 | default_curve_resolution = 50 17 | 18 | def __init__(self, filename, path=False, save_file=True): 19 | super(ThreeJSOut,self).__init__() 20 | if filename[-4:].lower() == ".js" : filename = filename[:-4] 21 | if path==False : 22 | self.filepath = os.path.expanduser("~") + os.sep + filename + ".js" 23 | else : 24 | if path[-4:].lower() == ".js" : self.filepath = path 25 | else : self.filepath = path + os.sep + filename + ".js" 26 | 27 | self._save_file = save_file 28 | self.jsonstr = False 29 | 30 | def _startDraw(self): 31 | print("building 3js string") 32 | self.jsonstr = False 33 | 34 | self.buffer = io.StringIO() 35 | self.buffer.write('{\n"metadata":{},\n') 36 | 37 | def _endDraw(self): 38 | self.buffer.write('\n}') 39 | self.jsonstr = self.buffer.getvalue() 40 | 41 | if self._save_file: 42 | print("drawing 3js to "+self.filepath) 43 | # write buffer to file 44 | fo = open(self.filepath, "wb") 45 | fo.write( self.jsonstr ) 46 | fo.close() 47 | 48 | self.buffer.close() 49 | 50 | 51 | def _drawGeom(self, g): 52 | # here we sort out what type of geometry we're dealing with, and call the proper draw functions 53 | # MUST LOOK FOR CHILD CLASSES BEFORE PARENT CLASSES (points before vecs) 54 | 55 | if isinstance(g, Point) : return self._drawPoint(g) 56 | if isinstance(g, LinearEntity) : 57 | if isinstance(g, Line) : return self._drawLine(g) 58 | if isinstance(g, Ray) : return self._drawRay(g) 59 | if isinstance(g, Segment) : return self._drawSegment(g) 60 | 61 | return False 62 | 63 | def _drawPoint(self, pt): 64 | self.buffer.write('a point at location %s, %s, %s \n' % (pt.x, pt.y,pt.z)) 65 | return True 66 | 67 | def _drawSegment(self, seg): 68 | self.buffer.write('a line from x1="%s" y1="%s" x2="%s" y2="%s \n"' % (seg.spt.x, seg.spt.y, seg.ept.x, seg.ept.y)) 69 | return True 70 | 71 | def _drawRay(self, ray): 72 | return False 73 | 74 | def _drawLine(self, line): 75 | return False 76 | 77 | 78 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | print("unit_tests loaded") 2 | import unittest, importlib, sys, inspect, os 3 | 4 | 5 | #__all__ = ["test_has_basis","test_cs","test_interval","test_line","test_mesh","test_pgon","test_point","test_vec","test_xform"] 6 | __all__=["test_voxel","test_xsect","test_classical_surface","test_pgon", "test_pline","test_mesh","test_point","test_has_pts","test_curve","test_surface","test_plane","test_interval","test_line","test_vec","test_xform"] 7 | 8 | 9 | filename = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+os.sep+'log.txt' 10 | logfile = open(filename, "w") 11 | for submod in __all__: 12 | logfile.write( "\n\n== "+submod.upper()+" ==\n" ) 13 | mod = importlib.import_module("decodes.test."+submod) 14 | suite = unittest.TestLoader().loadTestsFromTestCase(mod.Tests) 15 | unittest.TextTestRunner(logfile,verbosity=2).run(suite) 16 | logfile.close 17 | 18 | -------------------------------------------------------------------------------- /tests/near_unit_test.gh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ksteinfe/decodes/b876d6d01ea23ccbf4558182582a822b008cf2b8/tests/near_unit_test.gh -------------------------------------------------------------------------------- /tests/test_classical_surface.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import decodes.core as dc 3 | from decodes.core import * 4 | from decodes.extensions.classical_surfaces import * 5 | 6 | class Tests(unittest.TestCase): 7 | 8 | def test_rotational(self): 9 | def func(t): 10 | return Point(t,math.sin(t)+1.2) 11 | crv = Curve(func,Interval(0,math.pi*2)) 12 | cs = CS(Point(2,2)) 13 | rot_surf = RotationalSurface(cs,crv) 14 | 15 | # v isocurves result in based curves, which require basis-to-basis transformations 16 | # we currently do basis-to-basis xforms using rhino library 17 | # iso = rot_surf.isocurve(v_val=math.pi/2) 18 | 19 | iso = rot_surf.isocurve(u_val=0.25) 20 | 21 | def AssertPointsAlmostEqual(self,pa,pb,places=4): 22 | self.assertAlmostEqual(pa.x,pb.x,places) 23 | self.assertAlmostEqual(pa.y,pb.y,places) 24 | self.assertAlmostEqual(pa.z,pb.z,places) -------------------------------------------------------------------------------- /tests/test_cs.py: -------------------------------------------------------------------------------- 1 | 2 | import decodes.core as dc 3 | from decodes.core import * 4 | 5 | outie = dc.make_out(dc.outies.Rhino, "wayout") 6 | 7 | o = Point(0,0,10) 8 | vx = Vec(0,0,10) 9 | vy = Vec(0,10,0) 10 | cs1 = CS(o,vx,vy) 11 | cs2 = CS(Point(),Vec(1,0),Vec(0,1)) 12 | for g in [cs1,cs2] : outie.put(g) 13 | 14 | 15 | pa = Point(2,1,10) 16 | pb = Point(2,1,11) 17 | pc = Point(2,1,12) 18 | cs3 = CS(pc+Vec(0,0,1)) 19 | for g in [pa,pb,pc,cs3] : outie.put(g) 20 | 21 | 22 | xf = Xform.change_basis(cs1,cs2) 23 | csx = cs3*xf 24 | pax,pbx,pcx = map(lambda pt:pt*xf,[pa,pb,pc]) 25 | for g in [pax,pbx,pcx,csx] : outie.put(g) 26 | # for g in parr : outie.put(g) 27 | 28 | outie.draw() -------------------------------------------------------------------------------- /tests/test_has_basis.py: -------------------------------------------------------------------------------- 1 | import decodes.core as dc 2 | from decodes.core import * 3 | 4 | import math, copy 5 | 6 | 7 | outie = dc.make_out(dc.outies.Rhino, "basistest") 8 | outie_red = dc.make_out(dc.outies.Rhino, "redstuff") 9 | outie_red.set_color(1.0,0,0) 10 | 11 | print "CS basis" 12 | cs = CS(Point(5,5),Vec(1,-1)) 13 | pts = [Point(t,math.sin(t),0,basis=cs) for t in drange(0,math.pi*2,5)] 14 | outie.put([cs,pts]) 15 | print "here are the points defined relative to their base:" 16 | for p in pts : print p 17 | print "here they are in world coords:" 18 | for p in pts : print p.basis_applied() 19 | print "you can also access point coords as you would expect, using the _x,_y, and _z attributes" 20 | print "%s,%s,%s" %(pts[2]._x,pts[2]._y,pts[2]._z) 21 | print "using the x,y and z attributes returns world coords" 22 | print "%s,%s,%s" %(pts[2].x,pts[2].y,pts[2].z) 23 | 24 | print "if we strip the basis off, points will default to the basis of R3:" 25 | pts = [p.basis_stripped() for p in pts] 26 | outie.put(pts) 27 | 28 | 29 | print "CylCS basis" 30 | print "let's plot the same points in two different bases..." 31 | cylindrical_cs = CylCS(Point(-4,0)) 32 | orthogonal_cs = CS(Point(4,0)) 33 | 34 | pts = [dc.Point(math.cos(t),t,math.sin(t)) for t in drange(0,math.pi*2,20)] 35 | print pts 36 | pts_cyld = [p.set_basis(cylindrical_cs) for p in pts] 37 | pts_orth = [p.set_basis(orthogonal_cs) for p in pts] 38 | pts_none = [p.basis_stripped() for p in pts] 39 | 40 | outie.put([pts_cyld,cylindrical_cs]) 41 | outie.put([pts_orth,orthogonal_cs]) 42 | outie.put(pts_none) 43 | 44 | print "this demonstrates the difference between measuring distance in 'basis space' vs 'world space'" 45 | print "_distance() returns basis space distance, so long as both points share the same basis" 46 | print "distance() always returns world space" 47 | print "_distance cyld = %s" %pts_cyld[0]._distance(pts_cyld[10]) 48 | print "_distance orth = %s" %pts_orth[0]._distance(pts_orth[10]) 49 | print "distance cyld = %s" %pts_cyld[0].distance(pts_cyld[10]) 50 | print "distance orth = %s" %pts_orth[0].distance(pts_orth[10]) 51 | print "calling _distance() on points of two different bases will raise an error" 52 | print "_distance cyld to orth = %s" %pts_cyld[0]._distance(pts_orth[10]) 53 | 54 | print "we can manipulate the basis, and all the children follow" 55 | orthogonal_cs.origin = Point(4,0,4) 56 | outie.put([pts_orth,orthogonal_cs]) 57 | print "new distance diff = %s" %pts_none[0].distance(pts_orth[0]) 58 | 59 | print "interpolating between two points that share a basis will result in a new point defined in that basis" 60 | pi = Point.interpolate(pts_cyld[0],pts_cyld[1],0.5) 61 | print "%s -> %s == %s" %(pts_cyld[0],pts_cyld[1],pi) 62 | print "pi.basis = %s" %pi.basis 63 | outie_red.put(pi) 64 | 65 | print "interpolating between two points with different bases will result in a point defined in R3" 66 | print "even if those bases happen to be very similar to one another" 67 | p0_clone = copy.deepcopy(pts_cyld[0]) 68 | pi = Point.interpolate(p0_clone,pts_cyld[1],0.75) 69 | print "%s -> %s == %s" %(p0_clone,pts_cyld[1],pi) 70 | print "pi.basis = %s" %pi.basis 71 | outie_red.put(pi) 72 | 73 | print "_centroid() returns a basis space centroid, so long as all points share the same basis" 74 | print "centroid() always returns a world space centroid" 75 | cpt_b = Point._centroid(pts_cyld) 76 | print "cpt_b = %s" %cpt_b 77 | cpt_w = Point.centroid(pts_cyld) 78 | print "cpt_w = %s" %cpt_w 79 | outie_red.put([cpt_b,cpt_w]) 80 | 81 | print "calling _centroid() on points of differing bases will raise an error" 82 | ##print "_centroid cyld to orth = %s" %Point._centroid([pts_cyld[0],pts_orth[10]]) 83 | 84 | 85 | 86 | outie.draw() 87 | outie_red.draw() -------------------------------------------------------------------------------- /tests/test_interval.py: -------------------------------------------------------------------------------- 1 | import unittest, math 2 | import decodes.core 3 | from decodes.core import * 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | interval = Interval() 8 | def test_empty_constructor(self): 9 | inter_test = Interval(0,1) 10 | self.assertEqual(self.interval,inter_test,"intervals with empty constructors are from 0 to 1") 11 | self.assertEqual(self.interval.a,inter_test.a) 12 | self.assertEqual(self.interval.b,inter_test.b) 13 | 14 | def test_properties(self): 15 | self.assertEqual(self.interval.list,[0,1]) 16 | self.assertEqual(self.interval.is_ordered,True) 17 | self.assertEqual(self.interval.length,1) 18 | self.assertEqual(self.interval.delta,1) 19 | self.assertEqual(self.interval.is_ordered,True) 20 | 21 | def test_operations(self): 22 | inter_test = Interval(5,2) 23 | self.assertEqual(inter_test.order,Interval(2,5)) 24 | self.assertEqual(inter_test.invert,Interval(2,5)) 25 | self.assertEqual(inter_test.divide,range(5,2,.3)) 26 | self.assertEqual(inter_test.divide(include_last=True),range(5,2.3,.3)) 27 | self.assertEqual(inter_test.subinterval(2),[Interval(5,3.5),Interval(3.5,2)]) 28 | 29 | def test_operations(self): 30 | inter_test = Interval(0,math.pi*2) 31 | self.assertEqual(inter_test.eval(0.5),math.pi) 32 | self.assertEqual(inter_test.deval(math.pi),0.5) 33 | self.assertEqual(Interval.remap(.5, Interval(), Interval(0,10)),5) 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /tests/test_line.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import decodes.core as dc 3 | from decodes.core import * 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | 8 | def test_segment(self): 9 | p1 = Point(0,0,0) 10 | p2 = Point (1,0,0) 11 | segment = Segment(p1,p2) 12 | self.assertEqual(segment.spt,Point(0,0,0)) 13 | self.assertEqual(segment.length,1.0) 14 | self.assertEqual(segment.midpoint,Point(0.5,0,0)) 15 | 16 | def test_line(self): 17 | p1 = Point(0,0,0) 18 | p2 = Point (1,0,0) 19 | line = Line(p1,p2) 20 | self.assertEqual(line.spt,Point(0,0,0)) 21 | self.assertEqual(line.ept,Point(1,0,0)) 22 | 23 | def test_ray(self): 24 | p1 = Point(0,0,0) 25 | p2 = Point (1,0,0) 26 | ray = Ray(p1,p2) 27 | self.assertEqual(ray.spt,p1) 28 | 29 | def test_near_pt(self): 30 | p1 = Point(0,0,0) 31 | p2 = Point (10,0,0) 32 | pt_a = Point(5,0,1) 33 | pt_b = Point(-5,0,1) 34 | pt_c = Point(15,0,1) 35 | 36 | le = Line(p1,p2) 37 | self.assertEqual(le.near_pt(pt_a),Point(5,0,0)) 38 | self.assertEqual(le.near_pt(pt_b),Point(-5,0,0)) 39 | self.assertEqual(le.near_pt(pt_c),Point(15,0,0)) 40 | 41 | le = Ray(p1,p2) 42 | self.assertEqual(le.near_pt(pt_a),Point(5,0,0)) 43 | self.assertEqual(le.near_pt(pt_b),Point(0,0,0)) 44 | self.assertEqual(le.near_pt(pt_c),Point(15,0,0)) 45 | 46 | le = Segment(p1,p2) 47 | self.assertEqual(le.near_pt(pt_a),Point(5,0,0)) 48 | self.assertEqual(le.near_pt(pt_b),Point(0,0,0)) 49 | self.assertEqual(le.near_pt(pt_c),Point(10,0,0)) -------------------------------------------------------------------------------- /tests/test_pgon.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import decodes.core as dc 3 | from decodes.core import * 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | 8 | def test_empty_constructor(self): 9 | pgon = PGon() 10 | self.assertEqual(len(pgon.pts),0,"a polygon constructed with no arguments contains an empty list of verts") 11 | 12 | def test_segs_and_edges(self): 13 | p0 = Point(0,0,1) 14 | p1 = Point(1,0,1) 15 | p2 = Point(1,1,1) 16 | p3 = Point(0,1,1) 17 | pgon = PGon([p0,p1,p2,p3],CS(Point(0,0,2)) ) 18 | self.assertEqual(len(pgon.edges),4,"len(PGon.edges) returns the number of segments in the PGon") 19 | self.assertEqual(len(pgon),4,"len(PGon) returns the number of verts in the PGon") 20 | 21 | def func(n,seg): 22 | self.assertEqual(seg.spt,pgon.seg(n).spt) 23 | self.assertEqual(seg.ept,pgon.seg(n).ept) 24 | self.assertEqual(seg.spt,pgon.edges[n].spt) 25 | self.assertEqual(seg.ept,pgon.edges[n].ept) 26 | 27 | func(0,Segment(Point(0,0,3),Point(1,0,3))) 28 | func(1,Segment(Point(1,0,3),Point(1,1,3))) 29 | func(2,Segment(Point(1,1,3),Point(0,1,3))) 30 | func(3,Segment(Point(0,1,3),Point(0,0,3))) 31 | 32 | 33 | def test_rgon_construction(self): 34 | argon = RGon.from_edge(Segment.by_coords2d(0,0,0,1),3) 35 | self.AssertPointsAlmostEqual( argon.pts[0] , Point() ) 36 | self.AssertPointsAlmostEqual( argon.pts[-1] , Point(0,1) ) 37 | 38 | 39 | def test_rgon_to_pgon(self): 40 | rgon = RGon(3,1.0) 41 | pgon = rgon.to_pgon() 42 | 43 | self.assertFalse(isinstance(pgon, RGon)) 44 | for n in range(len(rgon)) : self.assertEqual(rgon.pts[n],pgon.pts[n]) 45 | 46 | def test_inflation(self): 47 | tri_a = RGon(3,1.0) 48 | tri_b = tri_a.inflate() 49 | 50 | self.AssertPointsAlmostEqual( tri_b.pts[0] , tri_a.edges[0].midpoint ) 51 | 52 | 53 | 54 | def test_bounds(self): 55 | p0 = Point(1,1) 56 | p1 = Point(2,1) 57 | p2 = Point(2,2) 58 | p3 = Point(1,2) 59 | pgon = PGon([p0,p1,p2,p3],CS(Point(0,0,2)) ) 60 | 61 | self.assertEqual(pgon.bounds.cpt,Point(1.5,1.5)) 62 | 63 | 64 | def test_containment(self): 65 | p0 = Point(1,1) 66 | p1 = Point(2,1) 67 | p2 = Point(2,2) 68 | p3 = Point(1,2) 69 | p4 = Point(1.5,1.5) 70 | pgon = PGon([p0,p1,p2,p3,p4],CS(Point(0,0,2)) ) 71 | 72 | self.assertTrue( Point(1.5,1,2) in pgon ) 73 | self.assertTrue( Point(1.75,1.50,2) in pgon ) 74 | self.assertTrue( Point(1.50,1.01,2) in pgon ) 75 | self.assertFalse(Point(3.00,1.50,2) in pgon ) 76 | self.assertFalse(Point(0.00,0.00,2) in pgon ) 77 | self.assertFalse( Point(1.20,1.50,2) in pgon ) 78 | 79 | 80 | 81 | 82 | def AssertPointsAlmostEqual(self,pa,pb,places=4): 83 | self.assertAlmostEqual(pa.x,pb.x,places) 84 | self.assertAlmostEqual(pa.y,pb.y,places) 85 | self.assertAlmostEqual(pa.z,pb.z,places) 86 | -------------------------------------------------------------------------------- /tests/test_plane.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import decodes.core as dc 3 | from decodes.core import * 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | 8 | def test_empty_constructor(self): 9 | pln = Plane() 10 | self.assertEqual(Point(0,0,0),pln,"planes with empty constructors are at 0,0,0 with a normal of 0,0,1") 11 | self.assertEqual(Vec(0,0,1),pln._vec,"planes with empty constructors are at 0,0,0 with a normal of 0,0,1") 12 | self.assertEqual(Vec(0,0,1),pln.normal,"planes with empty constructors are at 0,0,0 with a normal of 0,0,1") 13 | 14 | def test_copy_constructors(self): 15 | pa = Point(1,2,3) 16 | va = Vec(-1,1,2) 17 | pln = Plane(pa,va) 18 | 19 | self.assertEqual(Point(1,2,3),pln) 20 | self.assertEqual(Point(1,2,3),pln.origin) 21 | self.assertEqual(Vec(-1,1,2).normalized(),pln._vec) 22 | 23 | pa = Point(10,20,30) 24 | va = Vec(1,2,3) 25 | self.assertEqual(Point(1,2,3),pln,"planes, like vecs, keep a copy of cpts (and not a reference)") 26 | self.assertEqual(Vec(-1,1,2).normalized(),pln._vec, "planes make a unitzed copy of their vecs") 27 | self.assertEqual(Vec(-1,1,2).normalized(),pln.normal, "planes make a unitzed copy of their vecs") 28 | 29 | def test_near(self): 30 | pa = Point(2,2,2) 31 | va = Vec(0,0,1) 32 | pln = Plane(pa,va) 33 | 34 | pt_a = Point(1,1,0) 35 | pt_b = Point(1,1,3) 36 | pt_c = Point(2,2,2) 37 | 38 | self.assertEqual(Point(1,1,2),pln.near_pt(pt_a),"behind plane") 39 | self.assertEqual(Point(1,1,2),pln.near_pt(pt_a),"in front of plane") 40 | self.assertEqual(Point(2,2,2),pln.near_pt(pt_c),"on plane at center point") 41 | 42 | 43 | def test_xform(self): 44 | pa = Point(2,2,2) 45 | va = Vec(1,0,0) 46 | pln = Plane(pa,va) 47 | 48 | xf = Xform.scale(2.0) 49 | pln_scaled = pln * xf 50 | self.assertEqual(Point(4,4,4),pln_scaled.origin,"scaling transforms plane origin") 51 | self.assertEqual(Vec(1,0,0),pln_scaled.normal,"scaling does not transform plane normal") 52 | 53 | xf = Xform.rotation(axis=Vec(0,0,1),angle=math.pi/2) 54 | pln_rotated = pln * xf 55 | self.AssertPointsAlmostEqual(Point(-2.0,2.0,2.0),pln_rotated.origin) 56 | self.AssertPointsAlmostEqual(Vec(0,1,0),pln_rotated.normal) 57 | 58 | 59 | def test_dist_from_origin(self): 60 | pa = Point(2,2,2) 61 | va = Vec(1,0,0) 62 | pln = Plane(pa,va) 63 | 64 | self.assertEqual( pln.d , 2.0 ) 65 | 66 | def AssertPointsAlmostEqual(self,pa,pb,places=4): 67 | self.assertAlmostEqual(pa.x,pb.x,places) 68 | self.assertAlmostEqual(pa.y,pb.y,places) 69 | self.assertAlmostEqual(pa.z,pb.z,places) -------------------------------------------------------------------------------- /tests/test_pline.py: -------------------------------------------------------------------------------- 1 | import unittest, math 2 | import decodes.core as dc 3 | from decodes.core import * 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | 8 | def test_empty_constructor(self): 9 | pline = PLine() 10 | self.assertEqual(len(pline.pts),0,"a polyline constructed with no arguments contains an empty list of verts") 11 | 12 | def test_segs_and_edges(self): 13 | pl = PLine([Point(t,t,0) for t in Interval(0,10).divide(10,True)]) 14 | self.assertEqual(len(pl.edges),10,"len(PLine.edges) returns the number of segments in the Pline") 15 | self.assertEqual(len(pl),11,"len(PLine) returns the number of verts in the Pline") 16 | 17 | 18 | for n,ival in enumerate(Interval(0,10)//10): 19 | seg = Segment(Point(ival.a,ival.a),Point(ival.b,ival.b)) 20 | self.assertEqual(seg.spt,pl.seg(n).spt) 21 | self.assertEqual(seg.ept,pl.seg(n).ept) 22 | self.assertEqual(seg.spt,pl.edges[n].spt) 23 | self.assertEqual(seg.ept,pl.edges[n].ept) 24 | 25 | 26 | -------------------------------------------------------------------------------- /tests/test_point.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import decodes.core as dc 3 | from decodes.core import * 4 | 5 | 6 | class Tests(unittest.TestCase): 7 | 8 | def test_empty_constructor(self): 9 | self.assertEqual(Point(0,0,0),Point(),"points with empty constructors are at 0,0,0") 10 | 11 | def test_based_constructor(self): 12 | # there's a unique case where we've been passed a based point along with a defined basis here. 13 | # in this case, we should take the local coordinates of the given point interpreted through the given basis 14 | pta = BPoint(0,0,0,basis=CS(Point(2,2,2))) 15 | ptb = BPoint(pta,basis=CS(Point(-4,-4))) 16 | self.assertEqual(ptb,Point(-4,-4,0),"point b adopts local coordinates of point a") 17 | 18 | def test_nearest_point(self): 19 | pt = Point(4,1) 20 | pts = [Point(x,0,0) for x in range(10)] 21 | npt = Point.near(pt, pts) 22 | self.assertEqual(npt,Point(4,0,0),"nearest point in list") 23 | 24 | def test_cull_dups(self): 25 | pts = [Point(x,0,0) for x in range(10)] 26 | pts.append(Point(0,0,0)) 27 | culled_pts = Point.cull_duplicates(pts) 28 | self.assertEqual(len(pts),len(culled_pts)+1) 29 | 30 | def test_cull_dups2(self): 31 | pts = [Point(x,0,0) for x in range(10)] 32 | pts.append(Point(.5,0,0)) 33 | culled_pts = Point.cull_duplicates(pts,.51) 34 | self.assertEqual(len(pts),len(culled_pts)+1) 35 | 36 | ''' 37 | print "operators" 38 | # operations between points and vectors are performed in basis space 39 | p0 = Point(0,2) 40 | v = Vec(0,0,1) 41 | p2 = p0+v # __add__ 42 | p3 = p0-v # __sub__ 43 | p4 = p0/2 # __div__ 44 | p5 = p0*3 # __mul__ 45 | p6 = ~p0 # __inv__ 46 | #outie.put([p0,p2,p3,p4,p5,p6]) 47 | 48 | 49 | print "random points" 50 | #TODO: random points 51 | 52 | 53 | print "interpolate" 54 | # two points with the same basis will interpolate according to that basis 55 | # two points with different bases will interpolate in world space 56 | # to force interpolation in world space, use Interpolate 57 | p0 = Point(1,0,1) 58 | p1 = Point(1,1,1) 59 | p2 = Point.interpolate(p0,p1,0.3) 60 | #outie.put([p0,p1,p2]) 61 | 62 | print "distance" 63 | # two points with the same basis will measure distance according to that basis 64 | # two points with different bases will measure distance in world space 65 | # to force distance in world space, use Distance 66 | p0 = Point(2,2,0.5) 67 | p1 = Point(2,2,1.0) 68 | print "%s.distance(%s) = %s" % (p0,p1, p0.distance(p1) ) 69 | print "%s.distance2(%s) = %s" % (p1,p0, p1.distance2(p0) ) 70 | 71 | print "centroid" 72 | # two points with the same basis will calculate centroid according to that basis 73 | # two points with different bases will calculate centroid in world space 74 | # to force centroid in world space, use Centroid 75 | p0 = Point(1,0,2) 76 | p1 = Point(0,1,2) 77 | p2 = Point(1,1,2) 78 | cent = Point.centroid([p0,p1,p2]) 79 | #outie.put([p0,p1,p2,cent]) 80 | 81 | print "comparison and sorting" 82 | 83 | print "points are sorted in basis space by position: z, then y, then x" 84 | p0 = Point(0,0,0) 85 | p1 = Point(-1,1,0) 86 | p2 = Point(-1,0,0) 87 | p3 = Point(1,0,0) 88 | p4 = Point(1,-1,1) 89 | p5 = Point(1,-1,0) 90 | p0.name,p1.name,p2.name,p3.name,p4.name,p5.name = "p0","p1","p2","p3","p4","p5" 91 | pts = [p0,p1,p2,p3,p4,p5] 92 | pts.sort() 93 | print "sort pts: %s!" % [p.name for p in pts] 94 | 95 | #pts = [Point.random() for n in range(100)] 96 | #pts.sort() 97 | #rs.AddPolyline([p.to_tuple() for p in pts]) 98 | #redoutie = dc.make_out(dc.outies.Rhino, "redstuff") 99 | #redoutie.set_color(1.0,0,0) 100 | #redoutie.put(Point(pts[0])) 101 | #redoutie.draw() 102 | 103 | ''' -------------------------------------------------------------------------------- /tests/test_vec.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import decodes.core as dc 3 | from decodes.core import * 4 | import math 5 | 6 | 7 | class Tests(unittest.TestCase): 8 | 9 | def test_empty_constructor(self): 10 | vec = Vec() 11 | self.assertEqual(Vec(0,0,0),vec,"vectors with empty constructors are at 0,0,0") 12 | self.assertEqual(0,vec.x,"vectors with empty constructors have an x value of 0") 13 | self.assertEqual(0,vec.y,"vectors with empty constructors have an y value of 0") 14 | self.assertEqual(0,vec.z,"vectors with empty constructors have an z value of 0") 15 | 16 | def test_operators(self): 17 | v1 = Vec(2,2,2) 18 | v2 = Vec(1,1,1) 19 | 20 | self.assertEqual(Vec(3,3,3),v1+v2) 21 | self.assertEqual(Vec(1,1,1),v1-v2) 22 | self.assertEqual(v1.cross(v2),v1*v2) 23 | self.assertEqual(Vec(1,1,1),v1/2) 24 | self.assertEqual(Vec(-2,-2,-2),-v1) 25 | 26 | def test_properties(self): 27 | v1 = Vec(2,2,2) 28 | v2 = Vec(1,1,1) 29 | v3 = Vec(-1,-1,-1) 30 | v4 = Vec(1,1,1) 31 | v5 = Vec(0,1) 32 | 33 | self.assertEqual((2,2,2),v1.to_tuple()) 34 | self.assertEqual(True,v1>v2) 35 | self.assertEqual(True,v1>=v2) 36 | self.assertEqual(True,v2>=v3) 37 | self.assertEqual(False,v1