DrawDirection (hwx.inspire)#
- class DrawDirection(part, direction=(0, 0, 1), **kwds)#
Bases:
BoundaryCondition
Draw Directions Shape Control.
Draw directions are used to ensure that a design space can be physically manufactured using a specific process such as casting, stamping, or extrusion. Draw directions are a type of shape control.
If you intend for a part to be manufactured by casting it or stamping it, the optimized shape must allow the two halves of the mold or the stamping dies to separate after the part is formed. Negative draft angles must be avoided. You can generate shapes that can be molded or stamped by indicating a draw direction, which is the plane where the two halves of the mold are pulled apart.
Only one type of draw direction can be applied to a design space. Draw directions are valid for optimization but not analysis.
# Name
Type
Example
from hwx import inspire model = inspire.newModel() block = model.createSolidBlock() drawDir = inspire.DrawDirection(block) inspire.fitView() print("Initial draw type:", drawDir.type) drawDir.type = "Split" print("Changed draw type:", drawDir.type) print("Initial draw plane:", drawDir.activePlane) drawDir.activePlane = 2 print("Changed draw plane:", drawDir.activePlane) drawDir.type = "Overhang" print("Changed draw type:", drawDir.type) drawDir.method = "Lenient" print("Changed draw method:", drawDir.method) drawDir.type = "Milling" print("Changed draw type:", drawDir.type) drawDir.millingConType = "AccessAngle" print("Changed draw millingConType:", drawDir.millingConType) drawDir.millingAccessRadius = 0.3 print("Changed draw millingAccessRadius:", drawDir.millingAccessRadius) drawDir.millingAccessDepth = 0.06 print("Changed draw millingAccessDepth:", drawDir.millingAccessDepth) drawDir.millingConType = "DrillBitDimensions" print("Changed draw millingConType:", drawDir.millingConType) drawDir.millingToolRadius = 0.008 print("Changed draw millingToolRadius:", drawDir.millingToolRadius) drawDir.millingToolLength = 0.06 print("Changed draw millingToolLength:", drawDir.millingToolLength) drawDir.millingClampRadius = 0.03 print("Changed draw millingClampRadius:", drawDir.millingClampRadius)
- property type#
Sets/Gets the draw direction type.
- property method#
Sets/Gets the draw direction method. Only valid when draw direction type is ‘OVERHANG’. Valid choices are:
Strict
Lenient
- property millingConType#
Sets/Gets Milling param type such as by access angle or milling bit parms. Only valid when draw direction type is ‘MILLING’. Valid choices are:
AccessAngle
DrillBitDimensions
- property millingAccessRadius#
Sets/Gets Radius of the access angle. Only valid when draw direction type is ‘MILLING’.
- property millingAccessDepth#
Sets/Gets Length of the access angle. Only valid when draw direction type is ‘MILLING’.
- property millingToolRadius#
Sets/Gets Radius of the drill bit. Only valid when draw direction type is ‘MILLING’.
- property millingToolLength#
Sets/Gets Length of the drill bit. Only valid when draw direction type is ‘MILLING’.
- property millingClampRadius#
Sets/Gets Radius of the clamp that holds the milling bit. Only valid when draw direction type is ‘MILLING’.
- property activePlane#
Sets/Gets the active plane number. Allowed numbers are:
1
2
3