How do I edit lines in mechanical layer 1? - Page 1
Forum section: electronics / general

author: Konsolkongen
author_rank: Contributor
timestamp: May 02, 2024, 07:36:34 pm
content: 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

author: thm_w
author_rank: Super Contributor
timestamp: May 02, 2024, 09:17:45 pm
content: 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 objectsYou 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.

author: Konsolkongen
author_rank: Contributor
timestamp: May 03, 2024, 06:41:43 am
content: I see, that was actually pretty obviousBut 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 shapesAnother 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?

author: ajb
author_rank: Super Contributor
timestamp: May 03, 2024, 03:03:42 pm
content: What version?Quote from: Konsolkongen on May 02, 2024, 07:36:34 pmYou 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 belowthatyou 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.QuoteI 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.Quote from: Konsolkongen on May 03, 2024, 06:41:43 amGenerally 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.QuoteGenerally, 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).QuoteIf 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.

author: thm_w
author_rank: Super Contributor
timestamp: May 03, 2024, 08:24:36 pm
content: 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.

author: Konsolkongen
author_rank: Contributor
timestamp: May 06, 2024, 06:47:41 pm
content: Quote from: ajb on May 03, 2024, 03:03:42 pmVersion 24.4.1QuoteThank 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 goodI 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.

author: thm_w
author_rank: Super Contributor
timestamp: May 06, 2024, 09:12:36 pm
content: 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?

author: Konsolkongen
author_rank: Contributor
timestamp: May 07, 2024, 01:03:39 pm
content: Quote from: thm_w on May 06, 2024, 09:12:36 pmI 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.

author: ajb
author_rank: Super Contributor
timestamp: May 07, 2024, 05:51:33 pm
content: 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 outlinetop silkscreentop soldermasktop copperbottom copperbottom soldermaskbottom silkscreenholesYou 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.Quote from: thm_w on May 06, 2024, 09:12:36 pmI 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/

author: Konsolkongen
author_rank: Contributor
timestamp: May 11, 2024, 08:21:07 am
content: 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 tryI 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.

author: thm_w
author_rank: Super Contributor
timestamp: May 13, 2024, 08:55:08 pm
content: 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

author: PlainName
author_rank: Super Contributor
timestamp: May 14, 2024, 05:57:53 pm
content: Under tented vias they have:QuoteWhat would be the pro? Maximal risk?

author: Someone
author_rank: Super Contributor
timestamp: May 14, 2024, 09:46:53 pm
content: Quote from: thm_w on May 13, 2024, 08:55:08 pmMost 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).

author: thm_w
author_rank: Super Contributor
timestamp: May 14, 2024, 10:07:27 pm
content: Quote from: Someone on May 14, 2024, 09:46:53 pmYeah 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..