discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Should have an option to ask to render when pressing F6

A
adrian
Sun, Feb 19, 2017 4:06 AM

There are times that I accidentally press F6 and I have to wait an inordinate
amount of time for it to complete the render as the cancel doesn't work well
enough to be useful. It would be nice if there was an option to ask the
user, "Are you sure you want to render?"

--
View this message in context: http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

There are times that I accidentally press F6 and I have to wait an inordinate amount of time for it to complete the render as the cancel doesn't work well enough to be useful. It would be nice if there was an option to ask the user, "Are you sure you want to render?" -- View this message in context: http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Sun, Feb 19, 2017 4:47 AM

There are 'hotkey' utilities out there that can intercept keystrokes and do
what you want.
For Windows I use  autohothey https://www.autohotkey.com/  .

Are you sure you want to render?

Yes

Are you sure you meant to say yes? (type YES to confirm)

YES GOD DAMN YOU

Render cancelled


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it! http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

There are 'hotkey' utilities out there that can intercept keystrokes and do what you want. For Windows I use autohothey <https://www.autohotkey.com/> . Are you sure you want to render? >Yes Are you sure you meant to say yes? (type YES to confirm) >YES GOD DAMN YOU Render cancelled > ----- Admin - PM me if you need anything, or if I've done something stupid... Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above. The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out! -- View this message in context: http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JD
Jerry Davis
Mon, Feb 20, 2017 12:29 AM

Well, this is what I think.

I really don't want the program to ask me if I really want to do something.
This annoys me.
BUT, I don't think the cancel render button (the x) works at all.
If we fix that, then all would be well.

I know from my old programming days, if you do some really cpu intensive
calculations, that if you don't check for the presence of a cancel variable
once in a while, then there is no way it can be cancelled. So, what would
be needed is to check every nook and cranny of the render code, to see
where it would be necessary to check that cancel variable and do the right
thing.

Jerry

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

On Sat, Feb 18, 2017 at 9:47 PM, MichaelAtOz oz.at.michael@gmail.com
wrote:

There are 'hotkey' utilities out there that can intercept keystrokes and do
what you want.
For Windows I use  autohothey https://www.autohotkey.com/  .

Are you sure you want to render?

Yes

Are you sure you meant to say yes? (type YES to confirm)

YES GOD DAMN YOU

Render cancelled


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/
Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Well, this is what I think. I really don't want the program to ask me if I really want to do something. This annoys me. BUT, I don't think the cancel render button (the x) works at all. If we fix that, then all would be well. I know from my old programming days, if you do some really cpu intensive calculations, that if you don't check for the presence of a cancel variable once in a while, then there is no way it can be cancelled. So, what would be needed is to check every nook and cranny of the render code, to see where it would be necessary to check that cancel variable and do the right thing. Jerry -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Openscad developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov On Sat, Feb 18, 2017 at 9:47 PM, MichaelAtOz <oz.at.michael@gmail.com> wrote: > There are 'hotkey' utilities out there that can intercept keystrokes and do > what you want. > For Windows I use autohothey <https://www.autohotkey.com/> . > > Are you sure you want to render? > >Yes > Are you sure you meant to say yes? (type YES to confirm) > >YES GOD DAMN YOU > Render cancelled > > > > > > ----- > Admin - PM me if you need anything, or if I've done something stupid... > > Unless specifically shown otherwise above, my contribution is in the > Public Domain; to the extent possible under law, I have waived all > copyright and related or neighbouring rights to this work. Obviously > inclusion of works of previous authors is not included in the above. > > The TPP is no simple “trade agreement.” Fight it! > http://www.ourfairdeal.org/ time is running out! > -- > View this message in context: http://forum.openscad.org/ > Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
DM
doug moen
Mon, Feb 20, 2017 12:38 AM

Adding cancel points to CGAL would require making a private copy of CGAL
,hacking it, then reapplying those hacks when new releases of CGAL come
out. It's a big complex library. I'm assuming we don't do that now, and it
seems undesirable.

We could also do the rendering in a separate thread, and abandon that
thread if cancel is pressed. That seems more achievable.

On 19 February 2017 at 19:29, Jerry Davis jdawgaz@gmail.com wrote:

Well, this is what I think.

I really don't want the program to ask me if I really want to do
something. This annoys me.
BUT, I don't think the cancel render button (the x) works at all.
If we fix that, then all would be well.

I know from my old programming days, if you do some really cpu intensive
calculations, that if you don't check for the presence of a cancel variable
once in a while, then there is no way it can be cancelled. So, what would
be needed is to check every nook and cranny of the render code, to see
where it would be necessary to check that cancel variable and do the right
thing.

Jerry

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

On Sat, Feb 18, 2017 at 9:47 PM, MichaelAtOz oz.at.michael@gmail.com
wrote:

There are 'hotkey' utilities out there that can intercept keystrokes and
do
what you want.
For Windows I use  autohothey https://www.autohotkey.com/  .

Are you sure you want to render?

Yes

Are you sure you meant to say yes? (type YES to confirm)

YES GOD DAMN YOU

Render cancelled


Admin - PM me if you need anything, or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.”  Fight it!
http://www.ourfairdeal.org/  time is running out!

View this message in context: http://forum.openscad.org/Shou
ld-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Adding cancel points to CGAL would require making a private copy of CGAL ,hacking it, then reapplying those hacks when new releases of CGAL come out. It's a big complex library. I'm assuming we don't do that now, and it seems undesirable. We could also do the rendering in a separate thread, and abandon that thread if cancel is pressed. That seems more achievable. On 19 February 2017 at 19:29, Jerry Davis <jdawgaz@gmail.com> wrote: > Well, this is what I think. > > I really don't want the program to ask me if I really want to do > something. This annoys me. > BUT, I don't think the cancel render button (the x) works at all. > If we fix that, then all would be well. > > I know from my old programming days, if you do some really cpu intensive > calculations, that if you don't check for the presence of a cancel variable > once in a while, then there is no way it can be cancelled. So, what would > be needed is to check every nook and cranny of the render code, to see > where it would be necessary to check that cancel variable and do the right > thing. > > Jerry > > > > -- > Extra Ham Operator: K7AZJ > Registered Linux User: 275424 > Raspberry Pi and Openscad developer > > > *The most exciting phrase to hear in science - the one that heralds new > discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov > > On Sat, Feb 18, 2017 at 9:47 PM, MichaelAtOz <oz.at.michael@gmail.com> > wrote: > >> There are 'hotkey' utilities out there that can intercept keystrokes and >> do >> what you want. >> For Windows I use autohothey <https://www.autohotkey.com/> . >> >> Are you sure you want to render? >> >Yes >> Are you sure you meant to say yes? (type YES to confirm) >> >YES GOD DAMN YOU >> Render cancelled >> > >> >> >> >> ----- >> Admin - PM me if you need anything, or if I've done something stupid... >> >> Unless specifically shown otherwise above, my contribution is in the >> Public Domain; to the extent possible under law, I have waived all >> copyright and related or neighbouring rights to this work. Obviously >> inclusion of works of previous authors is not included in the above. >> >> The TPP is no simple “trade agreement.” Fight it! >> http://www.ourfairdeal.org/ time is running out! >> -- >> View this message in context: http://forum.openscad.org/Shou >> ld-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html >> Sent from the OpenSCAD mailing list archive at Nabble.com. >> >> _______________________________________________ >> OpenSCAD mailing list >> Discuss@lists.openscad.org >> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >> > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > >
J
jon
Mon, Feb 20, 2017 1:06 AM

Jerry:

I thought he wanted an OPTION to add this feature/question.  If the rest
of us can turn the option off, I don't see what is wrong with his
suggestion.

Jon

On 2/19/2017 7:29 PM, Jerry Davis wrote:

Well, this is what I think.

I really don't want the program to ask me if I really want to do
something. This annoys me.
BUT, I don't think the cancel render button (the x) works at all.
If we fix that, then all would be well.

I know from my old programming days, if you do some really cpu
intensive calculations, that if you don't check for the presence of a
cancel variable once in a while, then there is no way it can be
cancelled. So, what would be needed is to check every nook and cranny
of the render code, to see where it would be necessary to check that
cancel variable and do the right thing.

Jerry

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

/The most exciting phrase to hear in science - the one that heralds
new discoveries - is not "Eureka!" but "That's funny...".
/- Isaac. Asimov

On Sat, Feb 18, 2017 at 9:47 PM, MichaelAtOz <oz.at.michael@gmail.com
mailto:oz.at.michael@gmail.com> wrote:

 There are 'hotkey' utilities out there that can intercept
 keystrokes and do
 what you want.
 For Windows I use  autohothey <https://www.autohotkey.com/>  .

 Are you sure you want to render?

Yes

 Are you sure you meant to say yes? (type YES to confirm)

YES GOD DAMN YOU

 Render cancelled
 -----
 Admin - PM me if you need anything, or if I've done something
 stupid...

 Unless specifically shown otherwise above, my contribution is in
 the Public Domain; to the extent possible under law, I have waived
 all copyright and related or neighbouring rights to this work.
 Obviously inclusion of works of previous authors is not included
 in the above.

 The TPP is no simple “trade agreement.”   Fight it!
 http://www.ourfairdeal.org/  time is running out!
 --
 View this message in context:
 http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html
 <http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html>
 Sent from the OpenSCAD mailing list archive at Nabble.com.

 _______________________________________________
 OpenSCAD mailing list
 Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org>
 http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
 <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org>

OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

No virus found in this message.
Checked by AVG - www.avg.com http://www.avg.com/email-signature
Version: 2016.0.7998 / Virus Database: 4756/13975 - Release Date: 02/19/17

Jerry: I thought he wanted an OPTION to add this feature/question. If the rest of us can turn the option off, I don't see what is wrong with his suggestion. Jon On 2/19/2017 7:29 PM, Jerry Davis wrote: > Well, this is what I think. > > I really don't want the program to ask me if I really want to do > something. This annoys me. > BUT, I don't think the cancel render button (the x) works at all. > If we fix that, then all would be well. > > I know from my old programming days, if you do some really cpu > intensive calculations, that if you don't check for the presence of a > cancel variable once in a while, then there is no way it can be > cancelled. So, what would be needed is to check every nook and cranny > of the render code, to see where it would be necessary to check that > cancel variable and do the right thing. > > Jerry > > > > -- > Extra Ham Operator: K7AZJ > Registered Linux User: 275424 > Raspberry Pi and Openscad developer > > /The most exciting phrase to hear in science - the one that heralds > new discoveries - is not "Eureka!" but "That's funny...". > /- Isaac. Asimov > > > On Sat, Feb 18, 2017 at 9:47 PM, MichaelAtOz <oz.at.michael@gmail.com > <mailto:oz.at.michael@gmail.com>> wrote: > > There are 'hotkey' utilities out there that can intercept > keystrokes and do > what you want. > For Windows I use autohothey <https://www.autohotkey.com/> . > > Are you sure you want to render? > >Yes > Are you sure you meant to say yes? (type YES to confirm) > >YES GOD DAMN YOU > Render cancelled > > > > > > ----- > Admin - PM me if you need anything, or if I've done something > stupid... > > Unless specifically shown otherwise above, my contribution is in > the Public Domain; to the extent possible under law, I have waived > all copyright and related or neighbouring rights to this work. > Obviously inclusion of works of previous authors is not included > in the above. > > The TPP is no simple “trade agreement.” Fight it! > http://www.ourfairdeal.org/ time is running out! > -- > View this message in context: > http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html > <http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20487.html> > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org <mailto:Discuss@lists.openscad.org> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > <http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org> > > > > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > > No virus found in this message. > Checked by AVG - www.avg.com <http://www.avg.com/email-signature> > Version: 2016.0.7998 / Virus Database: 4756/13975 - Release Date: 02/19/17 >
A
adrian
Mon, Feb 20, 2017 2:12 AM

Yup. Just an option.

Yes, I do know about AHK. I use it all the time, however, because the cancel
is broken, the user should be given the option to not start a render if it
says invoked by accident. And this should be in the program, not as an
external workaround.

--
View this message in context: http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20502.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Yup. Just an option. Yes, I do know about AHK. I use it all the time, however, because the cancel is broken, the user should be given the option to not start a render if it says invoked by accident. And this should be in the program, not as an external workaround. -- View this message in context: http://forum.openscad.org/Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20502.html Sent from the OpenSCAD mailing list archive at Nabble.com.
JD
Jerry Davis
Mon, Feb 20, 2017 4:39 AM

Jon:

I didn't see that. Ok. Option ok. Turn it off by default ok.

Doug:

Didn't know OpenSCAD used a separate lib for CGAL. Separate thread that is
cancellable is better.

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Openscad developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

On Sun, Feb 19, 2017 at 7:12 PM, adrian adrianh.bsc@gmail.com wrote:

Yup. Just an option.

Yes, I do know about AHK. I use it all the time, however, because the
cancel
is broken, the user should be given the option to not start a render if it
says invoked by accident. And this should be in the program, not as an
external workaround.

--
View this message in context: http://forum.openscad.org/
Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20502.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Jon: I didn't see that. Ok. Option ok. Turn it off by default ok. Doug: Didn't know OpenSCAD used a separate lib for CGAL. Separate thread that is cancellable is better. -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Openscad developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov On Sun, Feb 19, 2017 at 7:12 PM, adrian <adrianh.bsc@gmail.com> wrote: > Yup. Just an option. > > Yes, I do know about AHK. I use it all the time, however, because the > cancel > is broken, the user should be given the option to not start a render if it > says invoked by accident. And this should be in the program, not as an > external workaround. > > > > -- > View this message in context: http://forum.openscad.org/ > Should-have-an-option-to-ask-to-render-when-pressing-F6-tp20486p20502.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
RW
Rogier Wolff
Mon, Feb 20, 2017 8:49 AM

On Sun, Feb 19, 2017 at 07:38:16PM -0500, doug moen wrote:

Adding cancel points to CGAL would require making a private copy of CGAL
,hacking it, then reapplying those hacks when new releases of CGAL come
out. It's a big complex library. I'm assuming we don't do that now, and it
seems undesirable.

This strongly depends on how the library works. If you call it adding
objects and that at the end you call "now_render_it ()" then your
argument holds.

But if WE maintain the upper level loop that implements the time
consuming work, then of course we can step out of that loop easily
when cancel is pressed.

We could also do the rendering in a separate thread, and abandon that
thread if cancel is pressed. That seems more achievable.

But this is of cousr something that can always be done. (.... at least
once: if you abort a rendering, I'm not sure the internal state is clean
enough to ever be able to restart it again....)

Roger. 

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.

On Sun, Feb 19, 2017 at 07:38:16PM -0500, doug moen wrote: > Adding cancel points to CGAL would require making a private copy of CGAL > ,hacking it, then reapplying those hacks when new releases of CGAL come > out. It's a big complex library. I'm assuming we don't do that now, and it > seems undesirable. This strongly depends on how the library works. If you call it adding objects and that at the end you call "now_render_it ()" then your argument holds. But if WE maintain the upper level loop that implements the time consuming work, then of course we can step out of that loop easily when cancel is pressed. > We could also do the rendering in a separate thread, and abandon that > thread if cancel is pressed. That seems more achievable. But this is of cousr something that can always be done. (.... at least once: if you abort a rendering, I'm not sure the internal state is clean enough to ever be able to restart it again....) Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.
DM
doug moen
Mon, Feb 20, 2017 3:18 PM

Rogier: yes, that's it. I now remember a discussion by the dev team about
how CGAL is not thread safe. It is something they are working on. There is
also an open CGAL bug to add callbacks to better support progress bars.

My understanding is that we have a cancel operation, but cancellation is
deferred while executing a CGAL CSG operation, which can take hours. And
that's hard to fix given CGALs limitations, especially lack of thread
safety.

On Monday, 20 February 2017, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

On Sun, Feb 19, 2017 at 07:38:16PM -0500, doug moen wrote:

Adding cancel points to CGAL would require making a private copy of CGAL
,hacking it, then reapplying those hacks when new releases of CGAL come
out. It's a big complex library. I'm assuming we don't do that now, and

it

seems undesirable.

This strongly depends on how the library works. If you call it adding
objects and that at the end you call "now_render_it ()" then your
argument holds.

But if WE maintain the upper level loop that implements the time
consuming work, then of course we can step out of that loop easily
when cancel is pressed.

We could also do the rendering in a separate thread, and abandon that
thread if cancel is pressed. That seems more achievable.

But this is of cousr something that can always be done. (.... at least
once: if you abort a rendering, I'm not sure the internal state is clean
enough to ever be able to restart it again....)

     Roger.

--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
**    Delftechpark 26 2628 XH  Delft, The Netherlands. KVK: 27239233    **
-- BitWizard writes Linux device drivers for any device you may have! --
The plan was simple, like my brother-in-law Phil. But unlike
Phil, this plan just might work.


OpenSCAD mailing list
Discuss@lists.openscad.org javascript:;
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Rogier: yes, that's it. I now remember a discussion by the dev team about how CGAL is not thread safe. It is something they are working on. There is also an open CGAL bug to add callbacks to better support progress bars. My understanding is that we have a cancel operation, but cancellation is deferred while executing a CGAL CSG operation, which can take hours. And that's hard to fix given CGALs limitations, especially lack of thread safety. On Monday, 20 February 2017, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > On Sun, Feb 19, 2017 at 07:38:16PM -0500, doug moen wrote: > > Adding cancel points to CGAL would require making a private copy of CGAL > > ,hacking it, then reapplying those hacks when new releases of CGAL come > > out. It's a big complex library. I'm assuming we don't do that now, and > it > > seems undesirable. > > This strongly depends on how the library works. If you call it adding > objects and that at the end you call "now_render_it ()" then your > argument holds. > > But if WE maintain the upper level loop that implements the time > consuming work, then of course we can step out of that loop easily > when cancel is pressed. > > > We could also do the rendering in a separate thread, and abandon that > > thread if cancel is pressed. That seems more achievable. > > But this is of cousr something that can always be done. (.... at least > once: if you abort a rendering, I'm not sure the internal state is clean > enough to ever be able to restart it again....) > > Roger. > > > -- > ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** > ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** > *-- BitWizard writes Linux device drivers for any device you may have! --* > The plan was simple, like my brother-in-law Phil. But unlike > Phil, this plan just might work. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org <javascript:;> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org > > >
MK
Marius Kintel
Mon, Feb 20, 2017 7:58 PM

We could also do the rendering in a separate thread, and abandon that thread if cancel is pressed. That seems more achievable.

We already perform rendering in a separate thread: https://github.com/openscad/openscad/blob/master/src/cgalworker.cc

While we can abandon this thread, it would still continue to use resources and block any other CGAL operation until the thread ends. I’m not too excited about that idea.

I’m not aware of any safe way to kill a thread, but that could be a worthwhile investigation.

-Marius

> > We could also do the rendering in a separate thread, and abandon that thread if cancel is pressed. That seems more achievable. > We already perform rendering in a separate thread: https://github.com/openscad/openscad/blob/master/src/cgalworker.cc While we can abandon this thread, it would still continue to use resources and block any other CGAL operation until the thread ends. I’m not too excited about that idea. I’m not aware of any safe way to kill a thread, but that could be a worthwhile investigation. -Marius