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

Allow selection of ends of Revolve and Helix #467

Closed
phkahler opened this issue Aug 27, 2019 · 3 comments
Closed

Allow selection of ends of Revolve and Helix #467

phkahler opened this issue Aug 27, 2019 · 3 comments

Comments

@phkahler
Copy link
Member

phkahler commented Aug 27, 2019

The ends of extrusions are flat surfaces that can be selected. Points can be constrained to those surfaces. The same should be possible for objects created with Revolve and Helix.

I tried adding the following to SShell::MakeFromHelicalRevolutionOf

`

    hEntity face = Entity::NO_ENTITY;

    hEntity hface = group->Remap(face, Group::REMAP_BOTTOM);

    s0.face = hface.v;

`
Which made it crash when hovering over one end.

@phkahler
Copy link
Member Author

@whitequark I made a branch "end_surfaces" in my repo that adds some Remap magic. I copied the function Group::MakeExtrusionTopBottomFaces to create one Group::MakeRevolveEndFaces. This does the same Remap stuff. I also added the above Remap stuff to the code that creates the extrusion - rather than finding those two surfaces again later like extrude does. Anyway, this allows a mouse hover to highlight the end surfaces. But it crashes if you click on them.

I wandered back into this issue while working on something else in Entity.cpp and looking at surface entities. For one, I don't see where and surface entities are actually created extrusion end caps. So maybe I didn't copy enough, but I don't know where else to look.

Also, any good writeup on how Remap actually works would be nice. Maybe an old thread has a good description?

@whitequark
Copy link
Contributor

I have a flight at 25th, I think I'll have time to dive into this shortly after that but probably not before.

@phkahler
Copy link
Member Author

This is done in PR #584.

phkahler added a commit to phkahler/solvespace that referenced this issue Jul 12, 2020
Use the grid spacing algorithm for helical curve PWL creation.
This makes the grid and trim curves have similar spacing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants