========= PolyMesh_ ========= shrinkWrap ========== .. autofunction:: hwx.inspire.core.PolyMesh.shrinkWrap **Example** .. code-block:: from hwx import inspire model = inspire.newModel() box = model.createSolidBlock() # There are two ways to create a shrinkWrap over a Part # First is using the shrinkWrap method wrappedPart1 = inspire.shrinkWrap(parts=box) wrappedPart1.location = (1.5, 0, 0) inspire.fitView() print("New part added in the model: ", wrappedPart1) print("New Part location: ", wrappedPart1.location) box = model.createSolidBlock(location=(0, 0, 1)) #Second calling the shrinkWrap method on the part wrappedPart2 = box.shrinkWrap(voxelSize=0.1, merge=False, sharpen=True) inspire.fitView() print("New part added in the model: ", wrappedPart2) model = inspire.newModel() model.createSolidBlock() model.createSolidBlock(location=(0, 0, 1)) wrappedParts = inspire.shrinkWrap(parts=model.parts) inspire.fitView() print("New part added in the model: ", wrappedParts) makeSmooth ========== .. autofunction:: hwx.inspire.core.PolyMesh.makeSmooth **Example** .. code-block:: from hwx import inspire model = inspire.newModel() inspire.openTutorialFile('Structures/Compare_Optimization.stmod') synthesis = model.getChild(type=inspire.TopologyOptimization) synthesis.switchToOptimizedParts() part = model.getChild("Part 1",True) # There are two ways to create a makeSmooth or removeSmooth over a Part # First is using the makeSmooth or removeSmooth method inspire.makeSmooth(parts = part, maintainVolume=True, intensity=0.6, iterations=25) print("Smooth is applied on "+ str(model.getChild(type=inspire.TopologyOptimization))) #Second calling the makeSmooth or removeSmooth method on the part part.removeSmooth() print("Smooth is removed on "+ str(model.getChild(type=inspire.TopologyOptimization))) part.makeSmooth(iterations=45) print("Smooth is applied on "+ str(model.getChild(type=inspire.TopologyOptimization))) inspire.fitView() removeSmooth ============ .. autofunction:: hwx.inspire.core.PolyMesh.removeSmooth **Example** .. code-block:: from hwx import inspire model = inspire.newModel() inspire.openTutorialFile('Structures/Compare_Optimization.stmod') synthesis = model.getChild(type=inspire.TopologyOptimization) synthesis.switchToOptimizedParts() part = model.getChild("Part 1",True) # There are two ways to create a makeSmooth or removeSmooth over a Part # First is using the makeSmooth or removeSmooth method inspire.makeSmooth(parts = part, maintainVolume=True, intensity=0.6, iterations=25) print("Smooth is applied on "+ str(model.getChild(type=inspire.TopologyOptimization))) #Second calling the makeSmooth or removeSmooth method on the part part.removeSmooth() print("Smooth is removed on "+ str(model.getChild(type=inspire.TopologyOptimization))) part.makeSmooth(iterations=45) print("Smooth is applied on "+ str(model.getChild(type=inspire.TopologyOptimization))) inspire.fitView() removeIsland ============ .. autofunction:: hwx.inspire.core.PolyMesh.removeIsland **Example** .. code-block:: from hwx import inspire from hwx.inspire.demo import openDemoFile model = openDemoFile("radial_with_obstacle_constraint.stmod") part = model.parts[-1] part.removeIsland() print("Island has been removed from part") inspire.fitView() convertToTriangleMesh ===================== .. autofunction:: hwx.inspire.core.PolyMesh.convertToTriangleMesh **Example** .. code-block:: from hwx import inspire model = inspire.newModel() box1 = model.createSolidBlock() box1.convertToTriangleMesh() print("Box1 has been converted in to triangle mesh") inspire.fitView()