Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/source/examples/dynamic_sketch_plane.mystnb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The sketch is a lightweight, two-dimensional modeler driven primarily by client-
At any point, the current state of a sketch can be used for operations such as extruding a body,
projecting a profile, or imprinting curves.

The sketch is designed as an effective Fluent-style API with all operations receiving 2D configurations.
The sketch is designed as an effective 'fluent functional-style' API with all operations receiving 2D configurations.

For easy reuse of sketches across different regions of your design, you can move a sketch around the
global coordinate system by modifying the plane defining the current sketch location.
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/plate_with_hole.mystnb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ kernelspec:

You can create multiple bodies from a single sketch by extruding the same sketch in different planes.

The sketch is designed as an effective Ansys Fluent-style API with all operations receiving 2D configurations.
To know more about the Fluent API, see [Fluent-based approach (Fluent API) in Sketch](../user_guide/shapes.rst).
The sketch is designed as an effective 'fluent functional-style' API with all operations receiving 2D configurations.
To know more about the API, see [Functional-style API in Sketch](../user_guide/shapes.rst).

In this example, a box is located in the center of the plate, with the default origin of a sketch plane (origin at ``(0, 0, 0)``).
Four holes of equal radius are sketched at the corners of the plate.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ PyGeometry is a Python wrapper for the Ansys Geometry service.
The key features of PyGeometry are:

* Ability to use the library alongside other Python libraries
* Fluent based API for a clean and easy coding experience
* A 'fluent functional-style' API for a clean and easy coding experience
* Built-in examples

Simple interactive example
Expand Down
7 changes: 5 additions & 2 deletions doc/source/user_guide/shapes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ You can initialize the sketch by:

The sketch can be constructed using different approaches.

Fluent-based approach (Fluent API)
==================================
Functional-style API
====================

This is sometimes termed a 'fluent functional-style api, or fluent API' in the developer community. We avoid
that term in the context of Ansys APIs to avoid confusion with the Ansys Fluent product.

One of the key features of this approach is keeping an active context based upon the previously created
edges to use as a reference start point for additional objects.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sketch.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ def test_sketch_segment_edge():
# Create a Sketch instance
sketch = Sketch()

# fluent api has 0, 0 origin as default start position
# sketch api has 0, 0 origin as default start position
assert len(sketch.edges) == 0
sketch.segment_to_point(Point2D([2, 3]), "Segment1")
assert len(sketch.edges) == 1
assert sketch.edges[0].start == ZERO_POINT2D
assert sketch.edges[0].end == Point2D([2, 3])
assert sketch.edges[0].length.m == pytest.approx(3.60555128, rel=1e-7, abs=1e-8)

# fluent api keeps last edge endpoint as context for new edge
# sketch api keeps last edge endpoint as context for new edge
sketch.segment_to_point(Point2D([3, 3]), "Segment2").segment_to_point(
Point2D([3, 2]), "Segment3"
)
Expand Down