Welcome! Log In Create A New Profile

Advanced

Segment length

Posted by NitroXpress 
Segment length
March 29, 2015 03:39PM
Hi all,

I wonder, if it's possible to adjust the min. segment length.
It seems that Slic3r cannot create more than 128 segments for a circle.

I have a 50mm diameter cylinder created with a angle resolution of 1° (360 segments)
But Slic3r output is only 128 segments.

Cura for example creates up to 250 segments...

Frank

Edited 1 time(s). Last edit at 03/29/2015 03:40PM by NitroXpress.
Re: Segment length
March 30, 2015 08:49AM
As far as I am aware both Slic3r and Cura simply follow the pattern in the STL file (which can only contain straight lines). It is the 3D CAD program that created the STL that determined the number of segments in a circle (e.g. via the $fn variable in OpenScad). I am therefore extremely puzzled why Slic3r should give a different result with the same STL file. Could you post a simple STL that exhibits this difference between Slic3r and Cura?

Dave
Re: Segment length
March 30, 2015 11:02AM
Hi Dave,

here is the 50mm cylinder in high resolution.
If slic3r follows the original resolution it should generate 360 segments.

I know, this restriction is because a standard RepRap controller can not handle such a data flood.
But i have a very fast CNC controller with ethernet connection.
So he can handle 0,2mm segments at 400mm/sec and more...

Frank

Edited 3 time(s). Last edit at 03/30/2015 11:20AM by NitroXpress.
Attachments:
open | download - 50.stl (74.1 KB)
Re: Segment length
March 31, 2015 09:06AM
Quote
NitroXpress
Hi Dave,

here is the 50mm cylinder in high resolution.
If slic3r follows the original resolution it should generate 360 segments.

I know, this restriction is because a standard RepRap controller can not handle such a data flood.
But i have a very fast CNC controller with ethernet connection.
So he can handle 0,2mm segments at 400mm/sec and more...

Frank

Many (most) of us use printers that store the print files in non-volatile memory (such as an SD card) in the printer's controller, so data input speed is not an issue. This also applies to many RepRap controllers, and the one I use (the Duet) is plenty fast enough to cope with both data input and data processing (and it also has an Ethernet connection), so your assumption about the restriction is unfounded.

I sliced your STL with both Cura and Slic3r. I found the opposite than you did - while Slic3r did indeed use 128 moves to draw the perimeter, Cura used only 80 moves. I tried changing nozzle diameter and extrusion width in Slic3r, but it generated the same number of moves. I then scaled the STL to 200% in Slic3r's "plater" (i.e. made it 100mm diameter but the same number of segments), and this time Slic3r used 236 segments to draw the perimeter. My guess therefore is that Slic3r and Cura have a minimum move distance and will combine moves that are less than that quantum. Perhaps in Cura this is dependent on print settings (I did not experiment with Cura's settings), or maybe you used a different version than I did which accounts for the different result I saw in Cura.

In practice there will come a point when a series of very small moves of very small angular change will be smoothed out by both the mechanics of the printer and the viscosity of the extruded plastic so as to make negligible difference to the finished part, so the use of a minimum move quantum is not of itself unreasonable, though perhaps the value is higher than it could be for some printers.

Dave
Update...
April 01, 2015 05:47PM
I forced the output of my CAD Software to decrease the number of vertices.
Output resolution is now 2° (180 segments)

Now Slic3r generates 188 segments.

How is that ?
I am very confused...

Frank
Attachments:
open | download - 50.stl (37.2 KB)
Re: Update...
April 02, 2015 08:10AM
Quote
NitroXpress
I forced the output of my CAD Software to decrease the number of vertices.
Output resolution is now 2° (180 segments)

Now Slic3r generates 188 segments.

How is that ?
I am very confused...

Frank

Are you 100% certain that the STL really does contain exactly 180 segments and that slic3r is printing 188 segments? If slicer now outputs the same number of segments as contained in the STL it would make sense if my theory about minimum move length is correct. By decreasing the number of segments you have increased the segment length, which if they are then above the minimum move limit they will all print.

If however slic3r really is printing more segments than are contained in the STL then I am also confused. Maybe try scaling up to 200% in plater and see whether the number of segments change. I used the following method to determine the number of segments slic3r produced: Set the print settings to a single perimeter and no infill at all (0%), (and no wipe after retract). Slice the part with those settings and then open the gcode file in a text editor. Search for the string "Z2" to find the place where the layer changes at a height of 2mm (or any other distance above the base layers). Skip any filament retraction & unretract commands and then count the number of lines up to the next layer change, which will be the number of segments printed.

It is easy to control the number of segments or segment angle in OpenScad - you simply set the $fn or $fa variable in any command that draws circular objects.

Dave
Re: Update...
April 02, 2015 09:11AM
Hi Dave,

yes I am pretty certain.

You can see the different resolutions already on the file sizes.

I made a single wall with no retraction and counted the segments in the RepetierHost Preview one by one.
Have you sliced the second file too ?

I have opened a Feature Request at GitHub but Alessandro closed it very quick...
[github.com]

If I did something wrong, shame on me and I am very sorry.
But I don't understand this behavior.

I don't know what to do...

Frank

Edited 1 time(s). Last edit at 04/02/2015 09:12AM by NitroXpress.
Re: Segment length
April 02, 2015 10:06AM
Hi Dave,

I've made a few experiments with the CAD Output.

It seems that 2° is the optimal angle at 50mm diameter to force slic3r output at highest resolution.
If I go 0.1° higher or lower slic3r reduces the number of segments.

I can force my CAD Software to output segments with edge length not more than x.xx, if that's the problem.
But what is the optimal value for all diameters ?


I have changed from Skeinforge to Slic3r because the Skeinforge resolution was even worse.
Same problem with Simplify...

The highest resolution i could achieve was 250 segments with CURA.
But Cura have other problems I don't want.

At the moment Slic3r have the most advantages to become the best slicer software.
Only a few tweaks away...

Frank
Re: Segment length
April 02, 2015 01:51PM
Then I also don't understand what's going on. I usually make my designs in OpenScad with a very high resolution (<.5mm segment lengths) on the circles, and have printed designs with circles ranging in size from 2mm diameter to 180mm diameter, and after slicing with Simplify3D (my preferred slicer), the circles all print very smoothly with no detectable segmentation in the final print, though I have not looked at any G code files to see how many segments are actually sent to the printer. AFAIAA none of the slicing applications detect what is and what is not a curve, but simply follow the straight-edged shapes that the STL describes. I should think therefore that it is the result of some sort of optimisation that combines groups of very thin triangles in the STL. You may get a better idea by looking at the STL with a viewer that displays the triangles within it.

Have you verified that the number of segments output in the g-code remains constant for the entire length of the cylinder? My thinking is that the geometry of the triangles probably changes with height and so this may affect the output. I don't know what 3D CAD design tool you are using, but in case you are interested in looking further I have attached a 50mm cylinder created from openscad that has 1 degree segments (360) on the offchance that it behaves differently to the STL you created.

Dave
Attachments:
open | download - Cyl50_360_oscad.stl (227.8 KB)
Re: Segment length
April 02, 2015 02:01PM
Thanks, I will try it...
Re: Segment length
April 02, 2015 02:15PM
Damned...

Same problem as in my file.
Exactly 128 segments

I have tried it with many different CAD programs and same effect every time.
That must be a problem with all slicers and the minimum segment length.

Can you export it with 2° resolution ?
I want to know if there are 188 segments like with my model.


I can see the facetes in my prints because i often print thinwall objects with 0,2mm.
Also my mechanics and controller is very precise.
If you extrude wider lines and possibly overextrudet, you don't see the effect.

Frank

Edited 1 time(s). Last edit at 04/02/2015 02:16PM by NitroXpress.
Re: Segment length
April 02, 2015 03:01PM
Hi Dave,

here you can see a typical print object :-)

The "beer-glass" is 380mm high.
0,18mm single wall.
Printed with 240mm/sec and up to 320mm/sec.

And it is waterproof !

If you look just enough you can see the water drops inside and through the wall.

But I want more...

Frank

Edited 1 time(s). Last edit at 04/02/2015 03:02PM by NitroXpress.
Attachments:
open | download - Beer1.jpg (564 KB)
open | download - Beer2.jpg (549.7 KB)
Re: Segment length
April 03, 2015 01:10PM
What poll or survey shows most use SD card?

I would suppose MOST use computer software (repetier-host, Printrun / Pronterface ,
Replicator G / Makerware, XYZ DaVinci )
to drive 3D printers?

and

115200 baud can keep up with any mechanical system.

confused smiley


Quote
Dmould
"Many (most) of us use printers that store the print files in non-volatile memory (such as an SD card) in the printer's controller, so data input speed is not an issue. "
Re: Segment length
April 04, 2015 08:33AM
Hi Dave,

I did some more experiments...

Let's say 128 is the highest number of segments for a "50mm cylinder", that slic3r can produce.

Now a simple calculation :

50*3,14= 157mm circumference
157/128=1,23mm radians

So let's just say we have a segment length of ~1,23mm (mathematically not correct because we have 128 chords of a circle)

Than i did a slice of a "10mm cylinder" with 1° angle resolution.
The output from slic3r was 64 segments.

Same calculation again:

10*3,14 =31,4mm circumference
31,4/64=0,49mm radians

As you can see, the "segment resolution" for a "10mm cylinder" is much higher.
This means the presumption of a "minimum segment length" restriction is not correct.
And it confirms your observation with small diameters.

But how can i force slic3r to produce shorter segments for large diameters ?

By the way...
With CURA now i could reach 350 segments for the 50mm cylinder, by tweaking the triangle output of my CAD software.


Frank
Re: Segment length
April 07, 2015 09:01AM
Quote
NitroXpress
Hi Dave,

I did some more experiments...

Let's say 128 is the highest number of segments for a "50mm cylinder", that slic3r can produce.

Now a simple calculation :

50*3,14= 157mm circumference
157/128=1,23mm radians

So let's just say we have a segment length of ~1,23mm (mathematically not correct because we have 128 chords of a circle)

Than i did a slice of a "10mm cylinder" with 1° angle resolution.
The output from slic3r was 64 segments.

Same calculation again:

10*3,14 =31,4mm circumference
31,4/64=0,49mm radians

As you can see, the "segment resolution" for a "10mm cylinder" is much higher.
This means the presumption of a "minimum segment length" restriction is not correct.
And it confirms your observation with small diameters.

But how can i force slic3r to produce shorter segments for large diameters ?

By the way...
With CURA now i could reach 350 segments for the 50mm cylinder, by tweaking the triangle output of my CAD software.


Frank

I don't have any answers, I think you would have to ask one of the Slic3r developers why Slicer is behaving in the way it is. For further experimentation I suppose you could try constructing your own cylinder out of multiple thin rectangles progressively rotated.

Here's an OpenScad program that will allow you to make a cylinder with any number of segments using that method, and an STL generated when the number of segments was set to 360. (If you have not used openscad, you can download it for free. After loading the file into openscad and changing the three variables to what you want, hit "F6" to render)

Dave


Dave
Attachments:
open | download - Test.scad (410 bytes)
open | download - Test.stl (228.6 KB)
Re: Segment length
April 07, 2015 09:42AM
Quote
cozmicray
What poll or survey shows most use SD card?

I would suppose MOST use computer software (repetier-host, Printrun / Pronterface ,
Replicator G / Makerware, XYZ DaVinci )
to drive 3D printers?

and

115200 baud can keep up with any mechanical system.
confused smiley

Sure 115200 Bd is fast enough if there are never any delays. The problem however is that your PC is probably running a multi-tasking OS such as Windows, and the output will occasionally stop while Windows services other tasks. The printer will buffer 30 or so moves, but if the hesitation is long enough during a series of very short moves (such as when printing a circle), the printer will experience a buffer under-run. You might not see this on a fast PC with plenty of RAM, but those using low-spec PC's can experience hesitations of half a second or more as the OS swaps its virtual RAM to and from disk or performs other housekeeping tasks - and even fast PCs can hesitate if you have other windows open or there are certain background tasks working (such as performing an automatic update). If you are using a USB connection there are other things that can cause delays.

Yes, the front-end may be Pronterface or similar, but that has the option of printing on the fly or printing from SD card. I have a Duet based printer, and due to USB handshaking the data speed is too slow to print via the USB - the printer very visibly hesitates when printing circles, which causes blobbing and other undesirable effects.

Dave

Edited 2 time(s). Last edit at 04/07/2015 09:42AM by dmould.
Re: Segment length
April 07, 2015 12:00PM
Hi Dave,

thanks for the SCAD script.
But in between i have made attempts with more than 300000 facetes on this simple cylinder. (.stl file with 15MB's !)

Now i am 100% certain, that there is no problem with the model resolution.
CURA for example, generates 350 segments with this model. That's what i expect !

Unfortunately I expect no help from slic3r developer side...

So inevitably, i will continue with CURA.

Great pity...

Frank
Sorry, only registered users may post in this forum.

Click here to login