Skip to content

Conversation

asmith26
Copy link
Contributor

@asmith26 asmith26 commented Oct 16, 2025

All thoughts very welcome. Thanks!
In case helpful here is my command:

from jupytercad_core.schema.interfaces.geomCircle import IGeomCircle
circle = IGeomCircle(
    AngleXU=0.0,
    CenterX=0.0,
    CenterY=0.0,
    CenterZ=0.0,
    NormalX=0.0,
    NormalY=0.0,
    NormalZ=1.0,
    Radius=1.0146630059408888,
    TypeId="Part::GeomCircle",
)
from jupytercad_core.schema.interfaces.geomLineSegment import IGeomLineSegment
line = IGeomLineSegment(
    EndX=1.0,
    EndY=-1.0,
    EndZ=0.0,
    StartX=-1.0,
    StartY=-1.0,
    StartZ=0.0,
    TypeId="Part::GeomLineSegment",
)
doc.add_sketch(geometry=[line, circle])
sketch.mp4

Copy link
Contributor

github-actions bot commented Oct 17, 2025

Preview PR at appsharing.space

Copy link
Contributor

Preview PR at appsharing.space

Copy link
Contributor

github-actions bot commented Oct 17, 2025

Integration tests report: appsharing.space

Copy link
Contributor

Integration tests report: appsharing.space

@trungleduc trungleduc added the enhancement New Feature or improvement label Oct 17, 2025
@trungleduc
Copy link
Member

Please lint the code

Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @asmith26, nice work again

from .interfaces.fillet import IFillet # noqa
from .interfaces.any import IAny # noqa

from .interfaces.sketch import ISketchObject
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to take a look at pre-commit failure for this or just add # noqa at the end of the line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for your help, following the other imports I've added # noqa in 0403be4

Comment on lines +550 to +552
geometry: List[
Union[geomCircle.IGeomCircle, geomLineSegment.IGeomLineSegment]
] = [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have point, line and circle in sketch tool but i don't see point as option here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good spot. I couldn't find a geomPoint.py. I'm not sure exactly how this works, but possibly geomLinSegment.py and geomCircle.py are generated from the schemas at github.com/jupytercad/JupyterCAD/tree/main/packages/schema/src/schema, in particular it appears geomPoint.json is missing.

I've noticed an issue with drawing Points which might be related (see #806) - I think I might have a fix for this, so happy to have try this before merging this PR (if helpful).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New Feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants