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

feature request - advice needed #59

Open
owai1980 opened this issue Mar 28, 2023 · 2 comments
Open

feature request - advice needed #59

owai1980 opened this issue Mar 28, 2023 · 2 comments

Comments

@owai1980
Copy link

Hello... again!

I need a 2D geometric primitive that you don't have in your library. It is similar to a polygon2 composed of linear "segment2" and curved "arc2" (convex / concave). I somehow found a way to create this "2D potatoe" object, and use your functions independently to calculate intersections (loop through all the segment2/arc2, and test if anyone has an intersection with the other object, ...)

that's ok.

now i would like to create a Prism (extrusion through Z axis) of this Potatoe2D object, so it will be 3D. (with up and bottom equals, perpendicular to Z axis, all other sides parallel to Z axis).
And i need to calculate the intersection of this "PrismPotatoe" with a cylinder. The axis of my cylinders will always be in the XY plane, perpendicular to the Z axis.

Do you have any advice? maybe i could use "IntrTriangle3Cylinder3.h" to test each vertical rectangle (split in 2 triangles) with my cylinder...

but i still have no solution to calculate the instersection of a cylinder3 and an "extrudedArc3" (a part of a cylinder3). Any idea for this last question?

Thank you again, and don't worry if you don't have time to write this!!

Johan

@davideberly
Copy link
Owner

How do you envision the interface for the "polyedge" object (edge = segment or arc)?

Regarding your 3D problem, I need to think about an algorithm for intersection. My technical support load has been significant these days, so I doubt I can get to this problem for a while.

@owai1980
Copy link
Author

Thank you for your answer.

The 2D Polyedge is just a list (std::vector?) of "segment2" and/ or "arc2". It could also be 1 "circle2".
i like to see those segment2/arc2 turning clockwise into a closed loop (non crossing) . (each end is the start of the next one, and the last ends where the first start)

I also imagine this 2d polyedge in a "non closed" version. (all segment2/arc2 connected, except the last and the first one).

About the 3d problem... It is not super urgent, but it would be a wonderful improvement if i can use it in a few months. I know it is a big problem, with many sub problems (we will need this polyedge2 in a 3d version!!)...

Thank you again...

Johan

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

No branches or pull requests

2 participants