Focus on Sketches
Updated : 21 November 2024
Sketches and Topologies
Sketches are composed of several objects known as topologies, which are linked to geometries. These topologies include:
- Vertices: Attached to points.
- Segments: Attached to curves.
- Profiles: Composed of a sequence of segments.
Sections: Composed of one or more profiles and must be closed.
Links Between Sketch Elements
The diagram below illustrates the relationships between the various elements of a sketch. From a section, we can deduce the profiles that make it up. Similarly, from a section, we can determine the segments it contains, and from a segment, we can identify the associated vertices.
Access to 2D and 3D Sketches
2D and 3D sketches can be accessed through the ISketches2D
and ISketches3D
interfaces, which are returned by the TopSolidHost.Sketches2D
and TopSolidHost.Sketches3D
properties, respectively.
In a 2D or 3D document, sketches can be retrieved using the methods TopSolidHost.Sketches2D.GetSketches
and TopSolidHost.Sketches3D.GetSketches
.
Modifying a Sketch
To begin modifying a sketch, first create it using the CreateSketchIn3D
method.
Important
You must initiate the modification process with TopSolidHost.Sketches2D.StartModification
and conclude it with TopSolidHost.Sketches2D.EndModification
.
Any topology created during this modification will be associated with the sketch.