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

Commit d6dd8e3

Browse files
committed
Updated examples after renames and module combines
1 parent 7a55f17 commit d6dd8e3

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

examples/01_generate_solid_block.py

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

10-
from ACIS import Modeler, Licensing, SaveRestore, Topology, Lists, GeometricAtoms
10+
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms
1111

1212
# Start ACIS Modeler
1313
Modeler.api_start_modeller(0)
@@ -19,7 +19,7 @@
1919
# Generate a simple solid block
2020
pt1 = GeometricAtoms.SPAposition(0.0, 0.0, 0.0)
2121
pt2 = GeometricAtoms.SPAposition(50.0, 50.0, 25.0)
22-
block = Topology.BODY()
22+
block = Entity.BODY()
2323

2424
Modeler.api_solid_block(pt1, pt2, block)
2525

examples/02_boolean_subtract.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
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, Topology, Lists, GeometricAtoms, GeometricOperators
12+
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms
1313

1414
# Start ACIS Modeler
1515
Modeler.api_start_modeller(0)
@@ -19,21 +19,21 @@
1919
Licensing.spa_unlock_products(unlock_key)
2020

2121
# Make a cuboid
22-
block = Topology.BODY()
22+
block = Entity.BODY()
2323
Modeler.api_make_cuboid(150, 75, 25, block)
2424

2525
# Generate and apply transformation to the cuboid
2626
block_vector = GeometricAtoms.SPAvector(0.0, 0.0, 12.7)
27-
block_transf = GeometricOperators.translate_transf(block_vector)
27+
block_transf = GeometricAtoms.translate_transf(block_vector)
2828
Modeler.api_apply_transf(block, block_transf)
2929

3030
# Make a frustum
31-
cylinder = Topology.BODY()
31+
cylinder = Entity.BODY()
3232
Modeler.api_make_frustum(19.05, 12.7, 12.7, 12.7, cylinder)
3333

3434
# Generate and apply transformation to the frustum
3535
cylinder_vector = GeometricAtoms.SPAvector(0.0, 0.0, 6.35)
36-
cylinder_transf = GeometricOperators.translate_transf(cylinder_vector)
36+
cylinder_transf = GeometricAtoms.translate_transf(cylinder_vector)
3737
Modeler.api_apply_transf(cylinder, cylinder_transf)
3838

3939
# Subtract frustum from cuboid

examples/03_sweeping.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Please see the LICENSE file for details.
88
"""
99

10-
from ACIS import Modeler, Licensing, SaveRestore, Topology, Lists, GeometricAtoms, GeometricOperators, Sweeping, Query
10+
from ACIS import Modeler, Licensing, SaveRestore, Entity, Lists, GeometricAtoms, Sweeping, Query
1111

1212
# Start ACIS Modeler
1313
Modeler.api_start_modeller(0)
@@ -17,7 +17,7 @@
1717
Licensing.spa_unlock_products(unlock_key)
1818

1919
# Make a cuboid
20-
block = Topology.BODY()
20+
block = Entity.BODY()
2121
Modeler.api_make_cuboid(150, 75, 25, block)
2222

2323
# Get faces of the cuboid
@@ -28,18 +28,18 @@
2828
block_face = face_list.first()
2929

3030
# Convert the chosen face into a sheet body
31-
sheet_body = Topology.BODY()
31+
sheet_body = Entity.BODY()
3232
Modeler.api_sheet_from_ff([block_face], sheet_body)
3333

3434
# Make a sweep path
3535
pt1 = GeometricAtoms.SPAposition(0.0, 0.0, 0.0)
3636
pt2 = GeometricAtoms.SPAposition(10.0, 55.0, 23.0)
37-
sweep_path = Topology.EDGE()
37+
sweep_path = Entity.EDGE()
3838
Sweeping.api_make_sweep_path([pt1, pt2], sweep_path)
3939

4040
# Sweep the chosen face using the sweep path
4141
opts = Sweeping.sweep_options()
42-
swept_body = Topology.BODY()
42+
swept_body = Entity.BODY()
4343
Sweeping.api_sweep_with_options(sheet_body, sweep_path, opts, swept_body)
4444

4545
# Assign attributes after generation

0 commit comments

Comments
 (0)