Replies: 6 comments 9 replies
-
Thanks Lin, this is great! |
Beta Was this translation helpful? Give feedback.
-
Hello Lin,
just a short question, i tried the code sample within my projekt but i
couldnt get it to work.
[image: image.png]
can see what the problem could be?
PikoGK Library available within the project?
best regards Torsten
…On Thu, May 23, 2024 at 11:46 AM Lin Kayser ***@***.***> wrote:
As a result of many requests, PicoGK can now be run in headless mode,
starting in 1.6. The caveat: You cannot access the viewer (obviously) and
also not the log file. The idea is to have PicoGK run without any system
interaction, except what you initiate yourself.
Here's an example:
try{
using (PicoGK.Library oLibrary = new(0.1f))
{
PicoGK.Voxels vox = new(PicoGK.Utils.mshCreateCube());
vox.mshAsMesh().SaveToStlFile(Path.Combine(PicoGK.Utils.strDocumentsFolder(), "PicoGK_XS.stl"));
}
using (PicoGK.Library oLibrary = new(0.2f))
{
PicoGK.Voxels vox = new(PicoGK.Utils.mshCreateCube());
vox.mshAsMesh().SaveToStlFile(Path.Combine(PicoGK.Utils.strDocumentsFolder(), "PicoGK_XS2.stl"));
}
using (PicoGK.Library oLibrary = new(0.3f))
{
PicoGK.Voxels vox = new(PicoGK.Utils.mshCreateCube());
vox.mshAsMesh().SaveToStlFile(Path.Combine(PicoGK.Utils.strDocumentsFolder(), "PicoGK_XS3.stl"));
}}
catch (Exception e){
Console.Write(e.ToString());}
This showcases how to run the PicoGK library with several different voxel
sizes and do something useful in between. Note the using syntax, which
ensures proper cleanup, after you are done with your task.
This greatly simplifies running parameter sweeps, especially with
different voxel sizes, etc.
It requires PicoGK 1.6.
Best,
Lin
—
Reply to this email directly, view it on GitHub
<#30>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AO2B6BSYJJYYOBHGDTUZ7S3ZDW3ILAVCNFSM6AAAAABIFJBRNWVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWG4YTMNZSGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
hold on maybe the version 1.6 is it...
On Fri, May 31, 2024 at 4:18 PM Torsten Reinauer ***@***.***>
wrote:
… Hello Lin,
just a short question, i tried the code sample within my projekt but i
couldnt get it to work.
[image: image.png]
can see what the problem could be?
PikoGK Library available within the project?
best regards Torsten
On Thu, May 23, 2024 at 11:46 AM Lin Kayser ***@***.***>
wrote:
> As a result of many requests, PicoGK can now be run in headless mode,
> starting in 1.6. The caveat: You cannot access the viewer (obviously) and
> also not the log file. The idea is to have PicoGK run without any system
> interaction, except what you initiate yourself.
>
> Here's an example:
>
> try{
> using (PicoGK.Library oLibrary = new(0.1f))
> {
> PicoGK.Voxels vox = new(PicoGK.Utils.mshCreateCube());
> vox.mshAsMesh().SaveToStlFile(Path.Combine(PicoGK.Utils.strDocumentsFolder(), "PicoGK_XS.stl"));
> }
>
> using (PicoGK.Library oLibrary = new(0.2f))
> {
> PicoGK.Voxels vox = new(PicoGK.Utils.mshCreateCube());
> vox.mshAsMesh().SaveToStlFile(Path.Combine(PicoGK.Utils.strDocumentsFolder(), "PicoGK_XS2.stl"));
> }
>
> using (PicoGK.Library oLibrary = new(0.3f))
> {
> PicoGK.Voxels vox = new(PicoGK.Utils.mshCreateCube());
> vox.mshAsMesh().SaveToStlFile(Path.Combine(PicoGK.Utils.strDocumentsFolder(), "PicoGK_XS3.stl"));
> }}
> catch (Exception e){
> Console.Write(e.ToString());}
>
> This showcases how to run the PicoGK library with several different voxel
> sizes and do something useful in between. Note the using syntax, which
> ensures proper cleanup, after you are done with your task.
>
> This greatly simplifies running parameter sweeps, especially with
> different voxel sizes, etc.
>
> It requires PicoGK 1.6.
>
> Best,
> Lin
>
> —
> Reply to this email directly, view it on GitHub
> <#30>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AO2B6BSYJJYYOBHGDTUZ7S3ZDW3ILAVCNFSM6AAAAABIFJBRNWVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWG4YTMNZSGI>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
You need to install the 1.6 runtime. The image isn't showing up for me, so I can't see the issue. https://github.com/leap71/PicoGK/releases/tag/PicoGK-v1.6.0 Best, |
Beta Was this translation helpful? Give feedback.
-
Hi Lin, I am attempting to run PicoGK headless on a linux environment (I used Corrie's instructions to install it). I have succeeded in running PicoGK with the viewer, but when I try the code that is provided above so I can run it in headless mode I get the following two errors: Program.cs(3,38): error CS1729: 'Library" does not contain a constructor that takes 1 arguments I am new to C# so I'm still learning, but if you or anyone has info that could help me resolve this issue, please let me know. Thank you! |
Beta Was this translation helpful? Give feedback.
-
I wanted to share this if anyone else is trying to run PicoGK in headless mode. I was able to create a way to run PicoGK headless on Google Colab. I put it here in a repo: https://github.com/michaelp91-dev/PicoGK-Colab I hope I'm not overstepping boundaries. But I wanted to share this if other people were wanting to do something this root. Obviously, with this, it gives you access to creating a STL file and then using within python, which is exactly what I plan to do with it. I need to run physics based simulations on what I design, and the physics engine I use can take in an STL file. I hope this is of use to others out there! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As a result of many requests, PicoGK can now be run in headless mode, starting in 1.6. The caveat: You cannot access the viewer (obviously) and also not the log file. The idea is to have PicoGK run without any system interaction, except what you initiate yourself.
Here's an example:
This showcases how to run the PicoGK library with several different voxel sizes and do something useful in between. Note the
using
syntax, which ensures proper cleanup, after you are done with your task.This greatly simplifies running parameter sweeps, especially with different voxel sizes, etc.
It requires PicoGK 1.6.
Best,
Lin
Beta Was this translation helpful? Give feedback.
All reactions