Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

intersecting a hole with a negative extrude in a solid results in a solid instead of empty intersection #3776

Open
yeroca opened this issue Sep 5, 2024 · 0 comments
Labels

Comments

@yeroca
Copy link

yeroca commented Sep 5, 2024

[Add a title above and insert a description of the issue here]

A hole that penetrates an object from one face intersecting with a negative extrude from another face, the volume of the intersection is solid rather than vacant.

In the object below, please notice the "slot" and cylindrical hole intersection. When I exported this model to STL, the result viewed in Orcaslicer was a solid slot inside the cylindrical hole rather than being empty.

Screenshot

Core Dump

coredump-2b4b4fdc-a710-434a-9731-fe673ec53df5.json

Reference ID: 2b4b4fdc-a710-434a-9731-fe673ec53df5

KCL Code
const holeFudge = 0.4
const frontBarD = 5.0
const yBarD = 6.7
const lowerBlockTransHoleD = frontBarD + holeFudge
const lowerBlockTransHoleR = lowerBlockTransHoleD / 2
const upperBlockLongHoleD = yBarD + holeFudge
const upperBlockLongHoleR = upperBlockLongHoleD / 2
const upperBlockTransHoleD = yBarD + holeFudge
const upperBlockTransHoleR = upperBlockTransHoleD / 2
const tubeClr = 1.5
const lowerBlockH = lowerBlockTransHoleD + 2 * tubeClr
const upperBlockH = upperBlockLongHoleD + 2 * tubeClr
const elevateH = 5
const upperBlockL = 25
const lowerBlockL = 60
const blockSz = max(upperBlockH, lowerBlockH)

const slotL = 10
const slotH = 1

fn slot = () => {
  const slotSketch = startSketchOn('XZ')
  |> startProfileAt([0, -(blockSz - slotH) / 2], %)
  |> xLine(slotL, %)
  |> yLine(-slotH, %)
  |> xLine(-slotL, %)
  |> close(%)
  return slotSketch
}
const sketch001 = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> yLine(blockSz, %, $edgeA)
  |> xLine(blockSz, %, $edgeB)
  |> yLine(-blockSz, %, $edgeC)
  |> xLine(upperBlockL - blockSz, %, $edge1)
  |> yLine(-(elevateH + blockSz), %, $edge2)
  |> xLine(lowerBlockL - blockSz, %, $edge3)
  |> yLine(-blockSz, %, $edge4)
  |> xLine(-lowerBlockL, %, $edge5)
  |> yLine(blockSz + elevateH, %, $edge6)
  |> xLine(-(upperBlockL - blockSz), %, $edge7)
  |> lineTo([profileStartX(%), profileStartY(%)], %, $seg01)
  |> close(%)
  |> hole(slot(), %)
  |> hole(circle([blockSz / 2, blockSz / 2], upperBlockTransHoleR, %), %)
  |> hole(circle([
       upperBlockL + lowerBlockL - blockSz - (lowerBlockTransHoleR) - tubeClr,
       -(blockSz + elevateH + blockSz / 2)
     ], lowerBlockTransHoleR, %), %)
const rad = 3
const extrude001 = extrude(blockSz, sketch001)
  |> fillet({
       radius: rad,
       tags: [
         getNextAdjacentEdge(edgeA),
         getNextAdjacentEdge(edgeB),
         getNextAdjacentEdge(edgeC),
         getNextAdjacentEdge(edge2),
         getNextAdjacentEdge(edge3),
         getNextAdjacentEdge(edge4),
         getNextAdjacentEdge(edge5),
         getNextAdjacentEdge(edge6)
       ]
     }, %)

const sketch002 = startSketchOn(extrude001, seg01)
   |> startProfileAt([0, 0], %)
   |> circle([blockSz / 2, -blockSz / 2], upperBlockLongHoleR, %)
const extrude2 = extrude(-upperBlockL, sketch002)


@jessfraz jessfraz added the engine label Sep 5, 2024
@yeroca yeroca changed the title intersecting holes in a solid result in a solid instead of empty intersection intersecting a hole with a negative extrude in a solid results in a solid instead of empty intersection Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants