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

Curve divided by number, or by length #16

Open
GeneKao opened this issue Apr 20, 2022 · 2 comments
Open

Curve divided by number, or by length #16

GeneKao opened this issue Apr 20, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@GeneKao
Copy link

GeneKao commented Apr 20, 2022

Feature Request

@brgcode @Licini Can we have a function that divides the curve by the number of points, or by length?
Currently, when we use locus, the points are located from curve parameters, which are not equally spaced.

Thanks!

@GeneKao
Copy link
Author

GeneKao commented Apr 22, 2022

If open cascade doesn't have this function, I also have found some code online to hack a workaround script and I can push it to the compas.geometry.curve.divide_by_count() or somewhere that makes sense. But I assume would be better and have more efficient code if we can wrap open cascade c++ function.
Screenshot 2022-04-22 at 12 05 55
Screenshot 2022-04-22 at 12 05 03

@tomvanmele
Copy link
Member

there is no function in OCC that provides this functionality directly. or at least none that i am aware of, but that doesn't mean it is not somewhere hidden in there... can you point me to the sample code? perhaps it provides inspiration for where to look in the OCC codebase.

@tomvanmele tomvanmele self-assigned this Apr 27, 2022
@tomvanmele tomvanmele added the enhancement New feature or request label Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants