Notifications
Clear all

[Solved] 2-Color print from 2 STL files - HOW?  

  RSS
Ira S
(@ira-s)
Trusted Member
2-Color print from 2 STL files - HOW?

I use OpenSCAD to design with. It does not directly support multiple colors. However, I can break my object into 2 pieces and generate 2 STL files that work together. The object I'm trying to print is pictured below. Basically and object of 1 color and lettering of a separate color. So I generated one STL file for the object and a 2nd STL file for the numbers, positioned at the correct Z height. 

Problem comes when I try to position the 2nd STL file above the main body in PrusaSlicer. I can move it in the X and Y directions to line it up. But when I try to enter a Z height, PrusaSlicer puts it back on the build plate. 

I've even tried to add a small cube as part of the 2nd color STL positioned at Z=0. This does put the numbers in the correct place, but then generates a slicer error. 

Any ideas how I can get around this? Thanks!

Bending Jig

Posted : 06/02/2024 10:39 pm
BaconFase
(@baconfase)
Reputable Member
RE: 2-Color print from 2 STL files - HOW?

One limitation in PS is that something of the object must touch the bed. To get around this, since we can add multiple parts to an object, is to add a small flat square on the bed off to the side so you can raise the 'real part'.

 

But you shouldn't even have to do this because you can just drag both stls into PS at the same time. It will ask you if you want to treat it as a single object of multiple parts. Click yes, and it should show up the same as your uploaded image.

 

XL-5T, MK3S MMU3 || GUIDE: How to print with multiple-nozzlesizes do read updated replies || PrusaSlicer Fork with multi-nozzlesize freedom || How Feasible is Printing PETG for PLA supports on XL very

Posted : 06/02/2024 10:57 pm
FoxRun3D
(@foxrun3d)
Famed Member
RE: 2-Color print from 2 STL files - HOW?

Or you can load them both separately, select them all and right-click>Merge. Once they're two parts of one object, you can move them separately in the Z direction.

Many ways to skin this cat. 

Formerly known on this forum as @fuchsr -- until all hell broke loose with the forum software...

Posted : 06/02/2024 11:06 pm
mUltic0re
(@multic0re)
Active Member
RE: 2-Color print from 2 STL files - HOW?

You can also export the models as one .3mf file then position data iis implemented and PrusaSlicer handels them as one object with multiple parts.

Posted : 06/02/2024 11:23 pm
Ira S
(@ira-s)
Trusted Member
Topic starter answered:
RE: 2-Color print from 2 STL files - HOW?

 

Posted by: @baconfase

One limitation in PS is that something of the object must touch the bed. To get around this, since we can add multiple parts to an object, is to add a small flat square on the bed off to the side so you can raise the 'real part'.

 

But you shouldn't even have to do this because you can just drag both stls into PS at the same time. It will ask you if you want to treat it as a single object of multiple parts. Click yes, and it should show up the same as your uploaded image.

 

I tried adding a small flat square but did so where the main body was, so that generated an error - didn't think of just putting that square elsewhere (Doh!)

I will try dragging both into PS (I thought that would be the same as clicking +, but apparently not. 

Or you can load them both separately, select them all and right-click>Merge. Once they're two parts of one object, you can move them separately in the Z direction.

I'll try this too - didn't know that option existed. So many features in PS that aren't hidden, but aren't obvious either.

Thanks for all of the suggestions. 

Posted : 06/02/2024 11:41 pm
MileHigh3Der
(@milehigh3der)
Honorable Member
RE: 2-Color print from 2 STL files - HOW?

So, in TinkerCad I design the multi part object objects.  I use a square off on the upper right past all the parts as a ‘register pin’.  The ‘pin’ was included in each individual part.   If the parts interfere with each other I make negative versions and use that to ‘cut’ out a space on the other part.  (Don’t make the ‘pin’ a negative space, since it will erase the other pins.)  I then save each as a STL file.  Open Prusa and select all the files at one time.  It gives a message about importing them, import as separate parts.  Then select each part and assign it to an extruder.

I then select the main file and add a negative space to remove the upper right pin.

The pin system works in TinkerCad, I can post a longer version of that process with the particulars of setting up negative spaces and such.  The pin comes in handy when making multiple copies of the parts and getting them to line back up again.

I have NO IDEA if this is the best way, but it works for me

Posted : 07/02/2024 1:38 am
Diem
 Diem
(@diem)
Illustrious Member

Here is a simple OpenSCAD example, avoiding shorter layout for clarity:

// Two colour demo

// Change the next value as required

colour=1; // set 1 and export part1.stl, set 2 and export part2.stl

x=40;
y=20;
z=10;

script="Ira S";

textdepth=0.4;

if (colour==1){
  difference(){
    cube([x,y,z]);
    textpart();
  }
}

if (colour==2){
  textpart();
}

module textpart(){
  translate([x/2,y/2,z-textdepth]){
    linear_extrude(height=textdepth){
      text(script,halign="center",valign="center");
    }
  }
}

Run once, export the stl, change the value of colour, run again and export the second stl. Now load both files into PrusaSlicer together and the positioning is snug.

Cheerio,

Posted : 07/02/2024 6:33 am
Ira S
(@ira-s)
Trusted Member
Topic starter answered:
RE: 2-Color print from 2 STL files - HOW?

 

Posted by: @diem

Here is a simple OpenSCAD example, avoiding shorter layout for clarity:

// Two colour demo

// Change the next value as required

colour=1; // set 1 and export part1.stl, set 2 and export part2.stl

x=40;
y=20;
z=10;

script="Ira S";

textdepth=0.4;

if (colour==1){
  difference(){
    cube([x,y,z]);
    textpart();
  }
}

if (colour==2){
  textpart();
}

module textpart(){
  translate([x/2,y/2,z-textdepth]){
    linear_extrude(height=textdepth){
      text(script,halign="center",valign="center");
    }
  }
}

Run once, export the stl, change the value of colour, run again and export the second stl. Now load both files into PrusaSlicer together and the positioning is snug.

Cheerio,

This is exactly what I did in OpenSCAD. But what I originally did (which caused my problem) was to load object 1, then load object 2.  The solution (as pointed out above) is to click the ADD icon, then select BOTH objects at the same time. PrusaSlicer then asked if I want to treat them as one item, which resolves the issue. 

Thanks for all of the help - I'm all set now. 

Posted : 07/02/2024 2:40 pm
Share: