Sketch (hwx.inspire.Sketch)#

class Sketch(system='Global Z', feature=None, origin=None, normal=None)#

Bases: Sketch

Inspire version of the core Sketch class. Redefines the initialization to use CFs and has method to convert to an Inspire Part.

Method Table#

Name

Description

intersect (self, input)

Extract curves resulting from the intersection of the sketch plane with

project (self, input)

Project selected geometry onto the sketch plane as construction geometry.

realize (self)

Return this sketch as an Inspire Part. This allows to do push/pull on it.

Example

from hwx import inspire
from hwx.inspire import Sketch

# Start with an empty model
model=inspire.newModel()
s = Sketch()
r = s.addRectangle2Vertex((0, 0), (2, 2))
c = s.addCircleCenterRadius((1, 1), 0.3)
skp = s.realize()
skp.features[10].pushPull(2.5)
inspire.orientView(direction="isometric")
realize()#

Return this sketch as an Inspire Part. This allows to do push/pull on it.

intersect(input)#

Extract curves resulting from the intersection of the sketch plane with selected parts or surfaces.

Parameters:

input (list[Parts | FeaturePlanar]) – List of Parts or Features to intersect.

project(input)#

Project selected geometry onto the sketch plane as construction geometry.

Parameters:

input (list[Feature]) – List of Features to project on sketch.