add issequence function to data and plot functions and examples for geometry
This commit is contained in:
30
examples/geometry_hexahedra.py
Normal file
30
examples/geometry_hexahedra.py
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""Example geometry of hexahedra.
|
||||
|
||||
:Date: 2019-12-24
|
||||
|
||||
.. module:: geometry_hexahedra
|
||||
:platform: *nix, Windows
|
||||
:synopsis: Example geometry of hexahedra.
|
||||
|
||||
.. moduleauthor:: Daniel Weschke <daniel.weschke@directbox.de>
|
||||
"""
|
||||
from pylib.geometry import World, Hexahedron
|
||||
from pylib.geometry_plot_pylab import cad_wireframe
|
||||
|
||||
def geometry():
|
||||
w = World()
|
||||
for i in range(3):
|
||||
for j in range(3):
|
||||
for k in range(3):
|
||||
w.add(Hexahedron().scale(0.8).translate(-2+2*i, -2+2*j, -2+2*k))
|
||||
return w
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
w = geometry()
|
||||
#print(w.bounding_box())
|
||||
#print(*w)
|
||||
#print(w.wireframes_xyz())
|
||||
cad_wireframe(w)
|
||||
Reference in New Issue
Block a user