Skip to content

Commit 92cb46d

Browse files
committed
fix: addressing issue with changed sketch origin when triming stacking lip #56
1 parent 0c90fd9 commit 92cb46d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/gridfinityUtils/binBodyLipGenerator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def createGridfinityBinBodyLip(
5555
adsk.core.ValueInput.createByReal(0)
5656
)
5757
lipCutoutConstructionPlane = targetComponent.constructionPlanes.add(lipCutoutPlaneInput)
58+
lipCutoutConstructionPlane.name = "lip cutout construction plane"
5859

5960
if input.hasLipNotches:
6061
lipCutoutInput = BaseGeneratorInput()
@@ -112,10 +113,11 @@ def createGridfinityBinBodyLip(
112113
lipCutoutBodies.append(lipCutout)
113114

114115
topChamferSketch: adsk.fusion.Sketch = targetComponent.sketches.add(lipCutoutConstructionPlane)
116+
topChamferSketch.name = "Lip top chamfer"
115117
sketchUtils.createRectangle(
116118
actualLipBodyWidth,
117119
actualLipBodyLength,
118-
adsk.core.Point3D.create(-actualLipBodyWidth / 2, -actualLipBodyLength / 2, 0),
120+
topChamferSketch.modelToSketchSpace(adsk.core.Point3D.create(0, 0, topChamferSketch.origin.z)),
119121
topChamferSketch,
120122
)
121123
topChamferNegativeVolume = extrudeUtils.simpleDistanceExtrude(
@@ -126,6 +128,7 @@ def createGridfinityBinBodyLip(
126128
[],
127129
targetComponent,
128130
)
131+
topChamferNegativeVolume.name = "Lip top chamfer cut"
129132
bodiesToSubtract.append(topChamferNegativeVolume.bodies.item(0))
130133
bodiesToSubtract = bodiesToSubtract + lipCutoutBodies
131134

0 commit comments

Comments
 (0)