Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit 0376507

Browse files
committed
Updated Python examples
1 parent 1f75818 commit 0376507

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

examples/01_generate_solid_block.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
Please see the LICENSE file for details.
88
"""
99

10+
from ACIS import utilities as utils
1011
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms
1112

1213
# Start ACIS Modeler
1314
Modeler.api_start_modeller(0)
1415

1516
# Unlock ACIS Modeler components
16-
unlock_key = "Your ACIS Unlock Key here"
17+
unlock_key = utils.read_spa_license_key("license.txt")
1718
Licensing.spa_unlock_products(unlock_key)
1819

1920
# Generate a simple solid block

examples/02_boolean_subtract.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99

1010
# This example is taken from the book "Rapid Prototyping and Engineering Applications" by Frank W. Liou (Example 5.1)
1111

12-
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms
12+
from ACIS import utilities as utils
13+
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms, Booleans
1314

1415
# Start ACIS Modeler
1516
Modeler.api_start_modeller(0)
1617

1718
# Unlock ACIS Modeler components
18-
unlock_key = "Your ACIS Unlock Key here"
19+
unlock_key = utils.read_spa_license_key("license.txt")
1920
Licensing.spa_unlock_products(unlock_key)
2021

2122
# Make a cuboid
@@ -37,7 +38,7 @@
3738
Modeler.api_apply_transf(cylinder, cylinder_transf)
3839

3940
# Subtract frustum from cuboid
40-
Modeler.api_subtract(cylinder, block)
41+
Booleans.api_subtract(cylinder, block)
4142

4243
# Assign attributes after generation
4344
block.name = "Drilled Cuboid"

examples/03_sweeping.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
Please see the LICENSE file for details.
88
"""
99

10+
from ACIS import utilities as utils
1011
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms, Sweeping, Query
1112

1213
# Start ACIS Modeler
1314
Modeler.api_start_modeller(0)
1415

1516
# Unlock ACIS Modeler components
16-
unlock_key = "Your ACIS Unlock Key here"
17+
unlock_key = utils.read_spa_license_key("license.txt")
1718
Licensing.spa_unlock_products(unlock_key)
1819

1920
# Make a cuboid

0 commit comments

Comments
 (0)