Skip to content

Commit

Permalink
fix: addressing issue with changed sketch origin when triming stackin…
Browse files Browse the repository at this point in the history
…g lip #56
  • Loading branch information
Le0Michine committed Nov 3, 2023
1 parent 0c90fd9 commit 92cb46d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/gridfinityUtils/binBodyLipGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def createGridfinityBinBodyLip(
adsk.core.ValueInput.createByReal(0)
)
lipCutoutConstructionPlane = targetComponent.constructionPlanes.add(lipCutoutPlaneInput)
lipCutoutConstructionPlane.name = "lip cutout construction plane"

if input.hasLipNotches:
lipCutoutInput = BaseGeneratorInput()
Expand Down Expand Up @@ -112,10 +113,11 @@ def createGridfinityBinBodyLip(
lipCutoutBodies.append(lipCutout)

topChamferSketch: adsk.fusion.Sketch = targetComponent.sketches.add(lipCutoutConstructionPlane)
topChamferSketch.name = "Lip top chamfer"
sketchUtils.createRectangle(
actualLipBodyWidth,
actualLipBodyLength,
adsk.core.Point3D.create(-actualLipBodyWidth / 2, -actualLipBodyLength / 2, 0),
topChamferSketch.modelToSketchSpace(adsk.core.Point3D.create(0, 0, topChamferSketch.origin.z)),
topChamferSketch,
)
topChamferNegativeVolume = extrudeUtils.simpleDistanceExtrude(
Expand All @@ -126,6 +128,7 @@ def createGridfinityBinBodyLip(
[],
targetComponent,
)
topChamferNegativeVolume.name = "Lip top chamfer cut"
bodiesToSubtract.append(topChamferNegativeVolume.bodies.item(0))
bodiesToSubtract = bodiesToSubtract + lipCutoutBodies

Expand Down

0 comments on commit 92cb46d

Please sign in to comment.