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

Can't cut SplineShape with another SplineShape when azimuth_placement_angle=0 #757

Open
RemDelaporteMathurin opened this issue Mar 4, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@RemDelaporteMathurin
Copy link

When trying to cut an ExtrudeSpline

How to reproduce

import paramak 
shape1 = paramak.RotateSplineShape(
    points=[
        (1.1 + 0, 0),
        (1.1 + 0.5, 0),
        (1.1 + 0.5, 0.5),
        (1.1 + 0, 0.5),
    ],
    rotation_angle=360
)

shape2 = paramak.ExtrudeSplineShape(
    points=[
        (0 + 1, 0),
        (1 + 1, 0),
        (1 + 1, 1),
        (0 + 1, 1),
    ],
    distance=0.5,
    azimuth_placement_angle=0,
    cut=shape1
)

shape2.solid

These alterations work:

Using StraightShape

import paramak

shape1 = paramak.RotateStraightShape(
    points=[
        (1.1 + 0, 0),
        (1.1 + 0.5, 0),
        (1.1 + 0.5, 0.5),
        (1.1 + 0, 0.5),
    ],
    rotation_angle=360
)

shape2 = paramak.ExtrudeSplineShape(
    points=[
        (0 + 1, 0),
        (1 + 1, 0),
        (1 + 1, 1),
        (0 + 1, 1),
    ],
    distance=0.5,
    azimuth_placement_angle=0,
    cut=shape1
)

shape2.solid

or

import paramak

shape1 = paramak.RotateSplineShape(
    points=[
        (1.1 + 0, 0),
        (1.1 + 0.5, 0),
        (1.1 + 0.5, 0.5),
        (1.1 + 0, 0.5),
    ],
    rotation_angle=360
)

shape2 = paramak.ExtrudeStraightShape(
    points=[
        (0 + 1, 0),
        (1 + 1, 0),
        (1 + 1, 1),
        (0 + 1, 1),
    ],
    distance=0.5,
    azimuth_placement_angle=0,
    cut=shape1
)

shape2.solid

Modifying azimuth_placement_angle

import paramak 
shape1 = paramak.RotateSplineShape(
    points=[
        (1.1 + 0, 0),
        (1.1 + 0.5, 0),
        (1.1 + 0.5, 0.5),
        (1.1 + 0, 0.5),
    ],
    rotation_angle=360
)

shape2 = paramak.ExtrudeSplineShape(
    points=[
        (0 + 1, 0),
        (1 + 1, 0),
        (1 + 1, 1),
        (0 + 1, 1),
    ],
    distance=0.5,
    azimuth_placement_angle=90,
    cut=shape1
)

shape2.solid

Modifying rotation angle

shape1 = paramak.RotateSplineShape(
    points=[
        (1.1 + 0, 0),
        (1.1 + 0.5, 0),
        (1.1 + 0.5, 0.5),
        (1.1 + 0, 0.5),
    ],
    rotation_angle=180
)

shape2 = paramak.ExtrudeSplineShape(
    points=[
        (0 + 1, 0),
        (1 + 1, 0),
        (1 + 1, 1),
        (0 + 1, 1),
    ],
    distance=0.5,
    azimuth_placement_angle=0,
    cut=shape1
)

shape2.solid

This issue is causing #733 tests to fail.

@shimwell @billingsley-john have you ever experienced that kind of issue ?

@RemDelaporteMathurin RemDelaporteMathurin mentioned this issue Mar 4, 2021
10 tasks
@shimwell
Copy link
Collaborator

shimwell commented Mar 4, 2021

I wonder if this is similar to the port cutting problem John observed

@billingsley-john
Copy link

I have managed to produce the shape locally.

Screenshot from 2021-03-04 10-00-00

@RemDelaporteMathurin
Copy link
Author

I have managed to produce the shape locally.

I'm using the latest ukaea/paramak:dependencies image. Shall I try and run this in the CI (open a PR ?)

@billingsley-john
Copy link

I have managed to produce the shape locally.

I'm using the latest ukaea/paramak:dependencies image. Shall I try and run this in the CI (open a PR ?)

Yes, could be a quick way to check. I'm not sure which version of the paramak and cadquery that image is using. I think i'm using a fairly recent version of the cadquery main branch

@RemDelaporteMathurin
Copy link
Author

I'll do that then. My image was pulled yesterday

RemDelaporteMathurin pushed a commit that referenced this issue Mar 4, 2021
@billingsley-john
Copy link

Just realised the CI uses that docker image too, so it will most likely fail in the CI as well. I will pull the image and have a look

@RemDelaporteMathurin
Copy link
Author

I've opened a PR #758

@billingsley-john
Copy link

I've opened a PR #758

Looks like it's failing. I got it to work with CQ2.1RC1 which is an older version of CQ2.1. Will test out some different versions

@billingsley-john
Copy link

Matrix testing for different cadquery versions is being added to actions CI #760. This should help solve these types of problems

shimwell added a commit that referenced this issue Mar 5, 2021
shimwell added a commit that referenced this issue Mar 5, 2021
@RemDelaporteMathurin RemDelaporteMathurin added the bug Something isn't working label Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants