def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() my_toolProperty.TitleText = "AuFast 1.6" file_path = os.path.dirname(os.path.realpath(__file__)) #my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(file_path), r'..\\icons\\auFast.png') my_toolProperty.TitleImageUriString = file_path + "./auFast.png" my_toolProperty.WorkFlowInstructions = """<HTML><BODY><P STYLE=\"font-size:10;\"><SPAN>AuFast 1.4</SPAN></P> <P><SPAN> </SPAN></P> <P><SPAN>This script creates hole-to-hole fastener connections for surface-to-surface, surface-to-solid, and solid-to-solid connections.</SPAN></P> <P STYLE=\"font-size:10;\"><SPAN>Send questions, comments and Elvis sightings to [email protected]</SPAN></P></BODY></HTML>""" #handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # handle exit button (red) click event my_toolProperty.ExitCommand = apex_sdk.ActionCommand( System.Action(HandleExitButton)) my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() #define pickFiterTools my_toolProperty.ShowPickChoice = True my_toolProperty.IsCustomTool = True #setPickFilterTools() my_toolProperty.PickFilterList = setPickFilterTools() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Round corners" my_toolProperty.WorkFlowInstructions = ''' <p><strong><span style="color: #999999;">Round corners<br /></span></strong></p> <p><span style="color: #999999;">Description: This tool creates fillets at the corners of selected faces. This helps with improving contact when running simulations.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Corner radius</span>: Fillet size definition<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Round selected faces</span>: Click to perform the filleting <br /></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Select the faces to be filleted<br /></span></li> <li><span style="color: #999999;">Define fillet radius size</span><span style="color: #999999;"><br /></span></li> <li><span style="color: #999999;">Click round selected faces button<br /></span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Find bodies within distance" my_toolProperty.WorkFlowInstructions = ''' <p><strong><span style="color: #999999;">Find fixture<br /></span></strong></p> <p><span style="color: #999999;">Description: This tools uses the distance search algorithm to find bodies in contact with the selected assembly.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Distance (mm)</span>: Search distance.<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Separate in new assembly</span>: Check this option if you want to separate the bodies found within the specified distance. This is usually the expected behavior.</span><span style="color: #999999;"><br /></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Define the search distance<br /></span></li> <li><span style="color: #999999;">Select/skip separate in new assembly<br /></span></li> <li><span style="color: #999999;">Select an assembly containing the reference geometries</span></li> <li><span style="color: #999999;">Click find close parts<br /></span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand(System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Get trajectory from edge" my_toolProperty.WorkFlowInstructions = ''' <p><strong><span style="color: #999999;">Get trajectory tool<br /></span></strong></p> <p><span style="color: #999999;">Description: This tool was designed to help extracting trajectory information to be used in Simufact Welding.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Calculate normal direction</span>: Using this option the user also gets the normal direction at the points of the trajectory.</span><span style="color: #999999;"></span><span style="color: #999999;"></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Get trajectory from edge</span>: Extract trajectories from selected edges.<br /></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Select the edges you want to create trajectories from (one or multiple)<br /></span></li> <li><span style="color: #999999;">Define whether you need the normal direction by marking the checkbox<br /></span></li> <li><span style="color: #999999;">Click get trajectory from edge<br /></span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Slice body" my_toolProperty.WorkFlowInstructions = '''<p><strong><span style="color: #999999;">DED - Vertical slicing<br /></span></strong></p> <p><span style="color: #999999;">Description: This tool was designed to help with slicing geometries vertically.</span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Layer height (mm)</span>: expected/desired layer height<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Do not create multiple solids</span>: this option will create body partitions instead of splitting the body into multiple solids</span><span style="color: #999999;"><span style="color: #00ccff;"></span></span><span style="color: #999999;"><span style="color: #00ccff;"></span></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Define the layer height</span></li> <li><span style="color: #999999;">Choose whether to create multiple solids or not</span></li> <li><span style="color: #999999;">Select the starting face of the splitting</span></li> <li><span style="color: #999999;">Click Slice geometry</span></li> </ol> <p><span style="color: #999999;">Selected starting face defines the body to be sliced (the body to which the surface belongs).</span></p> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p>''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Hatching layers" my_toolProperty.WorkFlowInstructions = '''<p><strong><span style="color: #999999;">DED - Hatching tool<br /></span></strong></p> <p><span style="color: #999999;">Description: This tool was designed to help with hatching layers of sliced geometry.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Trajec. spacing (mm)</span>: Distance between two trajectories calculated from the centerline.<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Point spacing (mm)</span>: Distance between two points of a trajectory (sampling resolution)</span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Angular cut</span>: Algorithm to vary the angular cut</span><span style="color: #999999;"></span> <ul> <li><span style="color: #999999;"><span style="color: #ff6600;">Single angle</span>: one single angle will be used for all layers</span></li> <li><span style="color: #999999;"><span style="color: #ff6600;">Incremental</span>: the angle will be multiplied by the layer number (1*angle, 2*angle, 3*angle, ...)</span></li> <li><span style="color: #999999;"><span style="color: #ff6600;">Cycle through</span>: inform the specific angles to be used separating them by comma (ex: 0, 30, 45)</span></li> </ul> </li> <li><span style="color: #999999;"><span style="color: #00ccff;">Angle (deg)</span>: specify the cut angle for the hatching algorithm</span><span style="color: #999999;"></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Mesh the layers</span>: mesh the resulting hatched geometry with the 2.5D mesher (hexahedral elements)</span><span style="color: #999999;"></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Define trajectory spacing (this depends on your process)</span></li> <li><span style="color: #999999;">Define point spacing</span></li> <li><span style="color: #999999;">Select hatching algorithm</span></li> <li><span style="color: #999999;">Define initial angle or angles</span></li> <li><span style="color: #999999;">Choose whether to perform meshing aftewards</span></li> <li><span style="color: #999999;">Select where to save the trajectories</span></li> <li><span style="color: #999999;">Click create hatching to start the process</span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p>''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel my_toolProperty.TitleImageUriString = os.path.join( os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Create simple joints" # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Create refinement regions" my_toolProperty.WorkFlowInstructions = ''' This tool will infer the weld beads from the CAD. ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand(System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Design fixture by stiffness" # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Stiffness studies" my_toolProperty.WorkFlowInstructions = ''' <p><span style="background-color: #ff0000;">Experimental tool for running multiple stiffness analysis.</span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand(System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Expand & Split" my_toolProperty.WorkFlowInstructions = ''' <p><strong><span style="color: #999999;">Expand & Split<br /></span></strong></p> <p><span style="color: #999999;">Description: This tools takes existing geometries and creates expanded (offset) versions of the outer surfaces. No extra geometry will be created. It takes advantage of the existing built-in partitioning tool.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Distance (mm)</span>: Offset distance from the existing faces.<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Split solids</span>: Check this option if you want to split solids within reach of the expanded faces.<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Split surfaces</span>: Check this option if you want to split surfaces within reach of the expanded faces.</span><span style="color: #999999;"></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Suppress extra vertices</span>: Performs an extra step to cleanup vertices after performing the split (partitioning).<br /></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Define offset distance<br /></span></li> <li><span style="color: #999999;">Select/skip split solids<br /></span></li> <li><span style="color: #999999;">Select/skip split surfaces<br /></span></li> <li><span style="color: #999999;">Select/skip suppression of extra vertices<br /></span></li> <li><span style="color: #999999;">Select an assembly containing all geometries used for splitting</span></li> <li><span style="color: #999999;">Click expand beads and split</span><span style="color: #999999;"></span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Create refinement regions" my_toolProperty.WorkFlowInstructions = ''' <p><strong><span style="color: #999999;">Refinement region<br /></span></strong></p> <p><span style="color: #999999;">Description: This tool creates a solid body to envelope the selected edge. The idea is to define a refinement region to be used as split location.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Diameter</span>: Define the region diameter<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Extend region</span>: Do an extra push-pull to extend the region beyond the start and end points (capture HAZ better)<br /></span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Select the edges you want to create trajectories from (one or multiple)<br /></span></li> <li><span style="color: #999999;">Define the region diameter<br /></span></li> <li><span style="color: #999999;">Define whether extension is needed<br /></span></li> <li><span style="color: #999999;">Click create regions</span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty
def getUIContent(): my_toolProperty = apex_sdk.ToolPropertyContainer() # Provide an icon and a name for the tool property panel # my_toolProperty.TitleImageUriString = os.path.join(os.path.dirname(current_file_path), r"Icons\script.png") my_toolProperty.TitleText = "Create group from selection" my_toolProperty.WorkFlowInstructions = ''' <p><strong><span style="color: #999999;">Create group<br /></span></strong></p> <p><span style="color: #999999;">Description: This tools creates an assembly with selected solid bodies and/or surfaces.<br /></span></p> <ul> <li><span style="color: #999999;"><span style="color: #00ccff;">Group name</span>: Assign an assembly name to the new group manually.<br /></span></li> <li><span style="color: #999999;"><span style="color: #00ccff;">Create under the same parent</span>: Takes the common uppermost parent of all selected bodies/surfaces as reference for creating the new assembly group.</span></li> </ul> <p><span style="color: #999999;">Workflow:</span></p> <ol> <li><span style="color: #999999;">Select the solid bodies and/or surfaces<br /></span></li> <li><span style="color: #999999;">Give the new group a name (optional)<br /></span></li> <li><span style="color: #999999;">Select whether it should be created under a common parent assembly<br /></span></li> <li><span style="color: #999999;">Click create assembly</span><span style="color: #999999;"></span></li> </ol> <p><span style="color: #999999;">For support: <span style="color: #ff0000;"><a href="mailto:[email protected]">[email protected]</a></span></span></p> <p><span style="color: #999999;"><span style="color: #ff0000;"></span></span></p> ''' # Define UI my_toolProperty.ToolPropertyContent = getCustomToolPropertyContent() # Handle apply button (green) click event my_toolProperty.AppliedCommand = apex_sdk.ActionCommand( System.Action(HandleApplyButton)) # Define PickFilterList my_toolProperty.ShowPickChoice = True my_toolProperty.PickFilterList = setPickFilterList() return my_toolProperty