No problem, here to help!
I will try to answer your questions as best I can. This might be a long one...
Let's begin:
As with any kind of "law-like" text, there are several cases that might be considered a gray area. But also as with any law, if it's not stated that it's forbidden, well...
But one thing is important. The directives all states that the product should be safe, so whatever you do make sure it is and most importantly, that you can prove it. It might be with calculations that prove it should be able to carry the load with the stated safety factor, risk assessments, probable misuse of the product etc.
A manual that shows how the product should be used along with at least some text that explicitly forbid foreseeable misuse is a good start to say the least.
On to some meat:
This is the machinery directive in direct pdf form in english, and sources below can be found in this directive:
https://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2006:157:0024:0086:EN:PDF
Machine is a assembly with at least one moving part that have or is intended to have a power source other than direct human or animal effort.
Also, lifting equipment such as hoists are considered machines even though they have direct human input.
(Article 2, section "a")
What this means is that if you make a "machine" that is not used for lifting, and does not have any external power source, and importantly does not have any reduction
from the human input (lets say a table with fixed height on wheels that you can push around), it is not considered a machine.
If however the table has some kind of crank with a gear reduction or the like, it is not direct input anymore and is to be considered a machine.
That is important to keep in mind.
Now, about parts of machinery.
The directive have a section that describes what is called 'partly completed machinery'. These also falls under the machinery directive, that is true. But, the definition of a partly completed machine is that it should be made of
assembled parts that in themselves cannot function as a machine.
(Article 2, section "g")
So it is quite clear if you only make one part, replacement or not for any machine, it will not be considered a machine or partly completed machine.
That's it. NO CE mark applies here, and none should be put on the part!
EDIT: I need to clarify something here: A part that changes an existing machine's function is considered "interchangeable equipment". See Article 2 section "b".
However, you also had some questions about assemblies of parts, which unfortunately falls under the partly completed machine category.
This is more or less the same as a "full blown" CE marking, which in principle it is. But fear not!
(Oh and btw, it's fully legal to make parts or partly completed machinery that incorporates into other manufacturers machines. See Article 6 section "2".
But you probably will void the warranty if any)
It is not too complicated to produce a CE marked machine. Remember that it is all about safety. In essence follow these steps:
1) If the machine is not listed in Annex IV (also called a dangerous machine) you will use your own internal assessment (Article 12).
That means that you as a manufacturer (or importer) can put the CE mark on your product by yourself, after the assessment.
2) Article 12, section 2 refers to this by transferring you to Annex VIII, which in turn is three small sections. Read it if you want, but the meaty part is that Annex VIII refers to Annex VII,
which is the important part of this. A lot of jumping around but I can summarize Annex VIII for you:
A) Do Annex VII
B) Make sure you still fulfill Annex VII if serial production
C) Profit $$$$
3) Annex VII states what assessment you have to do. Let me summarize it for you:
A) Is the machine safe? Make a risk assessment (and include probable misuse!). It does not need to be a trillion pages, most of our "simpler" machines only have one A4 page, and it's not filled to the brim. In this risk assessment, state how you solve the risks that need to be solved. In sweden we consider any accident that will make you get a blue nail or worse to be taken into consideration and the risk reduced or eliminated. Save this risk assessment page somehow, does not need to be a physical copy.
B) Is the machine able to do what it should be doing without overloading any components? This might be a bit tricky if you do not have any calculation software or suck at math. But actually in that case, you can go russian style and just smack more meat to the part until anyone can see that it will not fail in a million years.
(This is an unofficial tip, it did not come from me if anyone asks: If you are fucki'n sure that the part will not fail
and it is not a safety component, just ignore it. If this part breaks down in a dangerous way and the investigator wants to see your documentation for this very part, you can make the calculations at a later date. No it is not illegal, Annex VII section "2" part "2" clearly states that you will have to be able to show this in a period of time if someone asks. Read that section, quite interesting..).
C) If A and B is good, time to make your machine. After you have made it, save the drawings.
We (in "my" company) creates everything in Inventor, including notes and the like. Then we just save the parts and the assemblies as a .STEP file in AP242 format to get the notes etc. into the file. Easy-peasy.
D) After the machine is made and you have tried that everything works as it should and the machine is safe as expected, you might take some pictures. Preferably with load on the machine. If you have an assembly checklist, save it. If not, no biggie..
E) Make a user manual. THIS IS THE IMPORTANT BIT!
Most if not all accidents happens because of deficient instructions.
1. Make sure that you describe how the machine should be used, or a partly completed machine should be assembled.
2. Explicitly state how it should not be used (remember the risk assessment with foreseeable misuse?).
2. How it should be cleaned. ("No aggressive detergents" as an example).
3. Other technical data (length, height, width, weight, max load etc.. etc..).
4.1. If it's a partly completed machine: Search for Annex II, section "2". This dictates how the DoC document should look like. Also search on the internet for examples, it's much easier to see. A partly completed machine has a different DoC document that a fully completed machine, thats more or less the difference between the two.
4.2. If it's a fully completed machine: Search for Annex II, section "1". If you followed any standard you should state it in this document, as well as what directive your machine applies to. You can look at examples of this document on the internet. Search for "Declaration of conformity".
F) When you're done with the above, smack that CE mark on the machine and push it through the door! Include a copy of the manual attached to the machine at delivery.
DONE!!
The above might be somewhat simplified. The mfg date, the mfg company etc. should be on the machine ID plate along with serial number and so on. But if you make a machine you're probably intelligent enough to get that.
To be noted, safety components is somewhat more complex and I would personally advice not to go there since it actually might put someone in danger.
This refers to if you're replacing a safety component on someone else's machine obviously.
Article 2 section "c" is related to safety components and feel free to read it.
On to the next question about materials:
"Construction Materials Directive" is no more, it has been superseded by Regulation 305/2011, also called "Construction Product Regulation".
But to answer your question: NO. The material you use in your machine/product does not need to be certified according to CPR directive.
The directive is targeted at the manufacturers of building materials, especially relating to safety in case of fire, mechanical properties etc.
Nothing you need to worry about unless you make big-ass lego blocks to build houses from.
When does it need to be certified?
When released to the market or putting into service (that includes if you produce it for yourself).
You cannot sell or give any machine to anyone in the EU if it's not CE marked (but should be). Never. Ever.
You can not use any machine that is not CE marked (but should be). Never. Ever. (In a company that is, as a civilian there are almost no rules)
There can be hefty fines for this.
The reason is that if someone uses your machine in your shop they should not risk being injured. Never. Ever.
There are some exceptions of course, regarding for example old machinery etc. But even old machinery need to be equipped with some basic safety equipment to be allowed to use.
About modification of existing machine
If you produced the machine yourself you need to update your documentation to incorporate the changes.
If someone else made the machine, well.. Here lies a problem.
Technically you can not do anything to someone else's machine without voiding their CE marking. If you drill a hole? No can do. If you paint it with/in different color? Nope nope nope...
Their CE marking is void after that, and the owner of the machine is responsible for the CE marking. In other words, the owner will be fined.
Now, if you get a real nazi to notice that knows the machine and is a piece of shit he can cause trouble.
In the real world though, not a big problem unless you actually compromise the machine safety or reliability.
However, Pro-tip! If the machine is not inherently unstable or the like, you
can actually clamp stuff to a machine. That is more or less a funny loop-hole since you do not compromise the integrity of the machine in any way. That is okay as long as their manual does not explicitly forbid it, and that is rare. Remember the foreseeable misuse part?
That's it I think...