Update StepKernel.cpp - #7
Open
gsohler wants to merge 1 commit into
Open
Conversation
Now works if = is folllowed by space
Owner
|
Thanks for the PR. I need to study it a bit to jog my memory... |
Contributor
|
looks right to me fwiw |
Author
|
great, it also works "right" :)
I am planning to use parts of your code in pythonscad
(http://pythonscad.org)
pythonscad is a fork of openscad
where I want to offer step import/export functionality.
Of course I did not remove your name and it even appears in the exported
step files.
I have implemented way more bugfixes and adaptions there.
…On Sat, Mar 1, 2025 at 8:21 PM Brian K. White ***@***.***> wrote:
looks right to me fwiw
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCO4MR7OIH2JQ25LHI24R32SICDVAVCNFSM6AAAAABR4EESF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSGM3TIOBZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: bkw777]*bkw777* left a comment (slugdev/stltostp#7)
<#7 (comment)>
looks right to me fwiw
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCO4MR7OIH2JQ25LHI24R32SICDVAVCNFSM6AAAAABR4EESF2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJSGM3TIOBZGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Contributor
|
gsohler Nice looking project btw. I like your motivation text. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts STEP entity-line parsing in StepKernel::read_step to correctly extract the function name when the = character is followed by whitespace, improving robustness for STEP files that include spaces after =.
Changes:
- Updated function-name delimiter search to start after the first non-whitespace character following
=, so function names parse correctly when=is used.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
295
to
299
| auto id_str = cur_str.substr(1, equal_pos - 1); | ||
| id = std::atoi(id_str.c_str()); | ||
| auto func_start = cur_str.find_first_not_of("\t ", equal_pos+1); | ||
| auto func_end = cur_str.find_first_of("\t (", equal_pos + 1); | ||
| auto func_end = cur_str.find_first_of("\t (", func_start + 1); | ||
| auto func_name = cur_str.substr(func_start, func_end - func_start); |
Author
|
feel free to use any fixes in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now works if = is folllowed by space