Skip to content

Commit 6c6b44f

Browse files
committed
Adds examples
1 parent ff5d2e1 commit 6c6b44f

85 files changed

Lines changed: 1111 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
*.obj filter=lfs diff=lfs merge=lfs -text
77
*.vdb filter=lfs diff=lfs merge=lfs -text
88
*.VDB filter=lfs diff=lfs merge=lfs -text
9-
*.zip filter=lfs diff=lfs merge=lfs -text
10-
*.ZIP filter=lfs diff=lfs merge=lfs -text
9+
*.igs filter=lfs diff=lfs merge=lfs -text
10+
*.iges filter=lfs diff=lfs merge=lfs -text
11+
*.step filter=lfs diff=lfs merge=lfs -text
12+
*.stp filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
.DS_Store
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import pyvcad as pv
2+
import pyvcad_rendering as viz
3+
4+
materials = pv.default_materials
5+
red = materials.id("red")
6+
7+
# The CAD node can be used in two modes: "exact" and "fast"
8+
# "exact" uses an exact computation for the geometry. Using this mode
9+
# results in better accuracy, but at the cost of computation time. This
10+
# mode works well when you are using the toolpaths compiler, but will
11+
# take too long for large-volume inkjet systems.
12+
# "fast" this mode first converts the CAD file to a triangulated mesh.
13+
# This improves the speed of this node, at the cost of accuracy.
14+
# Fast mode is enabled by setting the second parameter to "True"
15+
cad_node = pv.CAD("../data/3d_models/bracket.iges", True, red)
16+
root = cad_node
17+
18+
viz.Render(root, materials)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import pyvcad as pv
2+
import pyvcad_rendering as viz
3+
4+
materials = pv.default_materials
5+
red = materials.id("red")
6+
7+
# The CAD node can be used in two modes: "exact" and "fast"
8+
# "exact" uses an exact computation for the geometry. Using this mode
9+
# results in better accuracy, but at the cost of computation time. This
10+
# mode works well when you are using the toolpaths compiler, but will
11+
# take too long for large-volume inkjet systems.
12+
# "fast" this mode first converts the CAD file to a triangulated mesh.
13+
# This improves the speed of this node, at the cost of accuracy.
14+
# Fast mode is enabled by setting the second parameter to "True"
15+
cad_node = pv.CAD("../data/3d_models/bracket.step", True, red)
16+
root = cad_node
17+
18+
viz.Render(root, materials)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:74ec6ee3dba54a4973bad319c13e4d7df20a860ef82209912adceedeb8e8e643
3+
size 3084864
Lines changed: 3 additions & 0 deletions

examples/data/3d_models/bar.stl

Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:3a2daa229c07bf63cdebc1380be4c4f53d5322e2398ba5f60f1c563af9d2f236
3+
size 64616

0 commit comments

Comments
 (0)