Author Topic: How do I edit lines in mechanical layer 1?  (Read 1325 times)

0 Members and 1 Guest are viewing this topic.

Offline KonsolkongenTopic starter

  • Contributor
  • Posts: 14
  • Country: dk
How do I edit lines in mechanical layer 1?
« on: May 02, 2024, 07:36:34 pm »
I'm trying to learn Altium since we have a license for it through school.

I wanted to do a PCB that had a really specific shape as it will be soldered on top of an existing product. For this I took a photo and drew the board shape I wanted in Illustrator, saved that as a DXF-file and imported that into Altium to use as board shape.

That worked well enough and was easy to figure out. However, late in the design process I realized that I had to tweak the board layout a little. For example I had a U-shaped notch that I wanted to replace with a hole. I was able to highlight the U-shape on the mechanical layer and delete it, but that left me with a gaping hole in the outline, and I haven't been able to reconnect that again (see photo). How do I do that? If I press and drag any of the line's anchor-points it will just move the entire outline.



I later realised that I could actually alter the board shape by pressing 1 to enter board shape mode, then Design > Edit Board Shape. Although this altered board shape did not match up with my mechanical layer 1 anymore, it gave me the result I wanted - and the PCB looked fine in the gerber viewer, so I sent it off for production at JLCPCB.

Unfortunately they detected an error in the mechanical 1 layer, and contacted me about it. They suggested that we used "ko" layer as board outline instead. That looked alright to me, so hopefully that works, but I would like to know how to edit the mechanical layer properly, so that my next pcb will be error-free :)

« Last Edit: May 02, 2024, 07:44:05 pm by Konsolkongen »
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6716
  • Country: ca
  • Non-expert
Re: How do I edit lines in mechanical layer 1?
« Reply #1 on: May 02, 2024, 09:17:45 pm »
Select Mechanical 1 layer, at the top Place -> Line then draw the line to connect them.
Then once its complete, ctrl-a to select all, Design -> Board shape -> Define from selected objects

You could also delete it all and draw it in DXF again and re-import it.

Using Mech1 or Keepout layer shouldn't really make any difference. Assuming board edge clearance rules are in place.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Konsolkongen

Offline KonsolkongenTopic starter

  • Contributor
  • Posts: 14
  • Country: dk
Re: How do I edit lines in mechanical layer 1?
« Reply #2 on: May 03, 2024, 06:41:43 am »
I see, that was actually pretty obvious :)

But there is no way to shrink or expand a shape on the mechanical layer then? As you can see in my image the board shape (the black area) has been slimmed a bit and made a bit taller too. I would like the mechanical layer to match. Am I correct that the best way to do this is to change the X/Y coordinates of the lines so they match?

I'm guessing I am so used to Illustrator that the handles and anchorpoints that appear when I select a line is throwing me off. I'm used to just be able to pull on these to modify the shapes :)

Another question. Do the Mechanical layer 1 represent everything that is being cut? I ask because I created a logo, also in DXF that I wanted to show up in copper on the top layer. In the gerber viewer this does look correct but the outline is present on both the Mechanical 1 and the top solder mask layer, and the engineer at JLCPCB was unsure if I wanted the logo cut out.

If I delete the outline from Mechanical 1 the logo still shows fine in the gerber viewer, so am I correct that I should just do that?
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2677
  • Country: us
Re: How do I edit lines in mechanical layer 1?
« Reply #3 on: May 03, 2024, 03:03:42 pm »
What version?

I'm trying to learn Altium since we have a license for it through school.

I wanted to do a PCB that had a really specific shape as it will be soldered on top of an existing product. For this I took a photo and drew the board shape I wanted in Illustrator, saved that as a DXF-file and imported that into Altium to use as board shape.

That worked well enough and was easy to figure out. However, late in the design process I realized that I had to tweak the board layout a little. For example I had a U-shaped notch that I wanted to replace with a hole. I was able to highlight the U-shape on the mechanical layer and delete it, but that left me with a gaping hole in the outline, and I haven't been able to reconnect that again (see photo). How do I do that? If I press and drag any of the line's anchor-points it will just move the entire outline.

You should be able to edit the lines via the grips as you expect.  If the entire outline is moving when you grab one line, it sounds like the lines were imported as a union.  If you right click on one of the lines, and select the 'Unions' submenu, do you see a 'Break objects from Union' option?  If so, you can click that, and then uncheck click the 'All Off' button, then 'OK' to remove everything from the union and then delete it.  Alternatively, in the 'PCB' Panel, select 'Unions' from the dropdown at the top, then select '<All Union Types>' in the box below that, then in the box below that you should your union listed somewhere.  If you right click on it, you can select 'Delete Selected Unions' which will do the same thing.  If you see multiple unions listed, make sure that the 'Normal/Mask/Dim' dropdown at the top of the PCB panel is set to 'Mask' or 'Dim' and 'Clear Existing' is checked.  Then you can click on each union in the list and see it highlighted to find out what each union is. 

Once you have everything broken from the union it should be possible to edit via the grips.

Quote
Unfortunately they detected an error in the mechanical 1 layer, and contacted me about it. They suggested that we used "ko" layer as board outline instead. That looked alright to me, so hopefully that works, but I would like to know how to edit the mechanical layer properly, so that my next pcb will be error-free :)

I wouldn't use the keepout layer, because that gets special 'keepout' handling in design rules, it's not just another mechanical layer.  The fabricator only sees the gerber, so they have no way to know or care what layer it was in the PcbDoc, and it doesn't really matter as long as the geometry in the gerber is correct.  I would stick with M1 and just make sure your gerber file names match one of the conventions or are otherwise clear as to what they contain.  Also if your Altium version is new enough to have layer types (AD22+?), make sure those are set correctly.  Not just for the board outline, but especially for your component layer pairs, otherwise things can get messy when you import footprints that have those set.

But there is no way to shrink or expand a shape on the mechanical layer then? As you can see in my image the board shape (the black area) has been slimmed a bit and made a bit taller too. I would like the mechanical layer to match. Am I correct that the best way to do this is to change the X/Y coordinates of the lines so they match?

Generally it's easier to have your board outline drawn on M1 (or whatever) and set the board shape from that, rather than try to match the the drawn outline to the board shape. 

Quote
Another question. Do the Mechanical layer 1 represent everything that is being cut? I ask because I created a logo, also in DXF that I wanted to show up in copper on the top layer. In the gerber viewer this does look correct but the outline is present on both the Mechanical 1 and the top solder mask layer, and the engineer at JLCPCB was unsure if I wanted the logo cut out.

Generally, yes, M1 is used for the board outline and should include all edges of the board, including edges of internal cutouts.  I believe JLCPCB recommends that you place 'CUTOUT' text inside of any of those internal cutouts for clarity.  For your logo, the objects that you want to appear in copper should only be on the copper layer (or on the silkscreen layer for silkscreen objects, same for soldermask). 

Quote
If I delete the outline from Mechanical 1 the logo still shows fine in the gerber viewer, so am I correct that I should just do that?

If you *regenerated* the gerbers and they came out okay, then it sounds like you'll be fine, and likely had multiple copies of the logo objects on different layers.  For future reference, you should be able to select which layers from a DXF end up imported onto which layers in the PCB.
 
The following users thanked this post: thm_w, Konsolkongen

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6716
  • Country: ca
  • Non-expert
Re: How do I edit lines in mechanical layer 1?
« Reply #4 on: May 03, 2024, 08:24:36 pm »
Yeah for JLC don't put anything on M1 other than the outline of the board and any internal cutouts you want.
I don't write "cutout" but if you have lots of junk on M1 I can see how it would be needed.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Konsolkongen

Offline KonsolkongenTopic starter

  • Contributor
  • Posts: 14
  • Country: dk
Re: How do I edit lines in mechanical layer 1?
« Reply #5 on: May 06, 2024, 06:47:41 pm »
What version?

Version 24.4.1

Quote
You should be able to edit the lines via the grips as you expect.  If the entire outline is moving when you grab one line, it sounds like the lines were imported as a union.  If you right click on one of the lines, and select the 'Unions' submenu, do you see a 'Break objects from Union' option?  If so, you can click that, and then uncheck click the 'All Off' button, then 'OK' to remove everything from the union and then delete it.  Alternatively, in the 'PCB' Panel, select 'Unions' from the dropdown at the top, then select '<All Union Types>' in the box below that, then in the box below that you should your union listed somewhere.  If you right click on it, you can select 'Delete Selected Unions' which will do the same thing.  If you see multiple unions listed, make sure that the 'Normal/Mask/Dim' dropdown at the top of the PCB panel is set to 'Mask' or 'Dim' and 'Clear Existing' is checked.  Then you can click on each union in the list and see it highlighted to find out what each union is. 

Once you have everything broken from the union it should be possible to edit via the grips.

Thank you for your very comprehensive walkthrough, I appreciate that. I managed to get the M1 layer lined up with the board shape perfectly.

I then for good measure highlighed my outline on M1 and did Design > Board Shape > Define Board Shape from Selected Objects. This made the board shape disappear completely - until I did it again. And it looks the same as before, which is good :)

I also removed the logo from the M1 layer, and have it on the solder mask layer only.

I then tried to export the gerbers again File > Fabrication Outputs > Gerber X2 and NC Drill Files, and packed that up in zip. I tried uploading this to OSHpark who I used in the past with Eagle CAD, but I am still getting a lot of errors. I even tried removing the logo altogether.

It's a bit overwhelming to figure out why they are discarding layers like crazy, and the cutouts are missing completely :/ It sounds like what they are saying is that the outline is still not correct on M1, hence why they discarded it?

I have attached screenshots of the error messages on OSHpark, the gerber viewer in Altium (this looks correct), and a screenshot of the correct outline that matched the old board layout.
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6716
  • Country: ca
  • Non-expert
Re: How do I edit lines in mechanical layer 1?
« Reply #6 on: May 06, 2024, 09:12:36 pm »
I thought you were using JLC, but you can read about oshpark here:
https://docs.oshpark.com/submitting-orders/board-outline/
https://docs.oshpark.com/submitting-orders/slots/

"Note, currently renders for the board will not fully handle board cutouts. Paying close attention the the thin black lines of the Top preview, as well as the board outline will ensure that your cutout is detected for fabrication."

Its possible you've violated this rule: "Must not cut through another slot or drill hit".
Even if you haven't it seems unlikely to intend to make the board like this.

What is the need for all of those cutouts?
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Someone

Offline KonsolkongenTopic starter

  • Contributor
  • Posts: 14
  • Country: dk
Re: How do I edit lines in mechanical layer 1?
« Reply #7 on: May 07, 2024, 01:03:39 pm »
I thought you were using JLC, but you can read about oshpark here:
https://docs.oshpark.com/submitting-orders/board-outline/
https://docs.oshpark.com/submitting-orders/slots/

"Note, currently renders for the board will not fully handle board cutouts. Paying close attention the the thin black lines of the Top preview, as well as the board outline will ensure that your cutout is detected for fabrication."

Its possible you've violated this rule: "Must not cut through another slot or drill hit".
Even if you haven't it seems unlikely to intend to make the board like this.

What is the need for all of those cutouts?

I am making a PCB that will install on top on the PCB of another product. That's why I need the cutouts. Please see attached image.

I plan to release this design so that others can build their own and I would like to share them through JLC and OSHpark if possible.

Maybe the issue with OSHpark is that the cutout (green colored cutout in Altium, in previous post) is going through the two pads?

I should mention that the gerber viewer on JLC does not look correct now that I fixed the M1 layer.
Now that same cutout is filled in :/ In my first design the cutout looked exactly like I was hoping it would. I have attached screenshots of the JLC gerber viewer for both the old and new versions, the one with the logo and cutout is the old version.

JLC does not give any error with the new version, but it never did with my first one either. Not until their engineer contacted me.
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 2677
  • Country: us
Re: How do I edit lines in mechanical layer 1?
« Reply #8 on: May 07, 2024, 05:51:33 pm »
It looks like the only real issue with the files as far as Oshpark is concerned is that one drill file. 

For the other warnings, it looks like you're supplying a gerber for M1 as well as a separate 'Profile' gerber containing the board outline, and Oshpark is just picking 'Profile', and then rejecting 'Mechanical_1' because it's redundant.  It's also rejecting M6 and M15, which might be fine depending on what they contain.  Generally for a 2-layer PCB, you only need to provide the following (silkscreen are optional):

  • board outline
  • top silkscreen
  • top soldermask
  • top copper
  • bottom copper
  • bottom soldermask
  • bottom silkscreen
  • holes

You could try resubmitting with just M1, leaving out the M6, M15, and Profile files, and see if it accepts that.  For the drill file, I'm not super familiar with all of the vagaries of those files, but you might need to check the 'Generate Additional Tools by Drill Symbols' option in the NC Drill Files output setup?  Or if there aren't actually any unplated drill holes on the board, that file might just be redundant.  You could poke at it in the gerber viewer to see, maybe.

Its possible you've violated this rule: "Must not cut through another slot or drill hit".

I don't think they will actually reject a design for violating that rule. They allow (but do not fully support) castellated edges after all, which require routing through holes: https://docs.oshpark.com/tips+tricks/castellation/
 
The following users thanked this post: Konsolkongen

Offline KonsolkongenTopic starter

  • Contributor
  • Posts: 14
  • Country: dk
Re: How do I edit lines in mechanical layer 1?
« Reply #9 on: May 11, 2024, 08:21:07 am »
Thank you again for your support! :)

I received the first boards today and luckily the JLC engineer understood what I was trying to do and they turned out pretty great. Some _very_ minor alterations are needed before everything lines up perfectly, but I'm pleasantly surprised how close I got on my first try :)

I will make those slight alterations and order again from JLC. Hopefully I won't get any errors this time. Then I will try to tackle OSHpark following your advice.

EDIT: Unfortunately the vias are not tented. Even though I specified that in Altium. Perhaps JLC require a special design rule for that. I remember having to do something like that in Eagle once.

« Last Edit: May 11, 2024, 12:30:44 pm by Konsolkongen »
 
The following users thanked this post: thm_w

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6716
  • Country: ca
  • Non-expert
Re: How do I edit lines in mechanical layer 1?
« Reply #10 on: May 13, 2024, 08:55:08 pm »
Looks good, not sure why they got rid of the tenting, I've not had them do that before.

https://jlcpcb.com/help/article/122-pcb-via-covering
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 7040
  • Country: va
Re: How do I edit lines in mechanical layer 1?
« Reply #11 on: May 14, 2024, 05:57:53 pm »
Under tented vias they have:

Quote
[Cons]
Minimal Risk of short circuits when closely assembling with metal components;

What would be the pro? Maximal risk?
 

Online Someone

  • Super Contributor
  • ***
  • Posts: 4682
  • Country: au
    • send complaints here
Re: How do I edit lines in mechanical layer 1?
« Reply #12 on: May 14, 2024, 09:46:53 pm »
Looks good, not sure why they got rid of the tenting, I've not had them do that before.
Most of the low cost suppliers using that style of interface do their own via editing to macth what you selected on their form (overriding what the supplied files say).
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6716
  • Country: ca
  • Non-expert
Re: How do I edit lines in mechanical layer 1?
« Reply #13 on: May 14, 2024, 10:07:27 pm »
Looks good, not sure why they got rid of the tenting, I've not had them do that before.
Most of the low cost suppliers using that style of interface do their own via editing to macth what you selected on their form (overriding what the supplied files say).

Yeah correct they do have it in the Quote page, but it defaults as Tented (and I assume this means them usually not changing anything, if I had a mix of tented and untented).
If OP went and changed the selection to Untented, well..
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf