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

Add shell method without removing faces to 3DShape class #120

Closed
wants to merge 1 commit into from

Conversation

Niels-IO
Copy link
Contributor

@Niels-IO Niels-IO commented Nov 16, 2023

Hi @sgenoud,

I would like to enable a way to have a shell without removing faces. Opencascade has the method MakeThickSolidBySimple for this. Somehow, it returns an undefined shape. Do you have an idea on how to make it work?

An example for a script would be this:

const { drawCircle, drawPolysides, polysideInnerRadius } = replicad;

const defaultParams = {
  height: 150,
  radius: 40,
  sidesCount: 12,
  sideRadius: -2,
  sideTwist: 6,
  endFactor: 1.5,
  topFillet: 0,
  bottomFillet: 5,

  holeMode: 1,
  wallThickness: 3,
};

const main = (
  r,
  {
    height,
    radius,
    sidesCount,
    sideRadius,
    sideTwist,
    endFactor,
    topFillet,
    bottomFillet,
    holeMode,
    wallThickness,
  }
) => {
  const extrusionProfile = endFactor
    ? { profile: "s-curve", endFactor }
    : undefined;
  const twistAngle = (360 / sidesCount) * sideTwist;

  const drawing = drawPolysides(radius, 6)
  let shape = drawing.sketchOnPlane("XY").extrude(20).shell(2)
 
  return [{shape:shape}];
};

@Niels-IO Niels-IO changed the title Add shell method to 3DShape class Add shell method without removing faces to 3DShape class Nov 16, 2023
@sgenoud
Copy link
Owner

sgenoud commented Nov 16, 2023

Mmmm I wonder if this is the right method. In the doc it says:

Non-closed shell or face is expected as input.

The shapes that it can run on (as defined now) are only closed ones. Would you try to add the method on a simple face and see if it works (my guess is that it is some kind of weird extrude.

@Niels-IO
Copy link
Contributor Author

Niels-IO commented Jan 3, 2024

I will close this now, as Opencascade probably doesn't have a direct method for it

@Niels-IO Niels-IO closed this Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants