Page 1 of 2

Sketcher: Entity and Dimension Colours

Posted: Thu Sep 23, 2021 1:39 pm
by ideasvacuum
Is there a way to change the colour of Entities and Dimensions? When using the Sketcher to workout a complex layout (it is not going to be used to produce a 3D model), it would be really helpful to colour code them.

Re: Sketcher: Entity and Dimension Colours

Posted: Thu Sep 23, 2021 2:18 pm
by mario52

Re: Sketcher: Entity and Dimension Colours

Posted: Thu Sep 23, 2021 3:07 pm
by ideasvacuum
mario52 wrote: Thu Sep 23, 2021 2:18 pm Hi

Sketcher_Preferences#Colors

mario
Hi mario, thanks but that's not what I'm looking for, it is controlling the defaults so all edges for example are the same colour whereas I want to colour code them (so several colours for edges). Would it be possible to change the colours of some of the edges with a macro?

Re: Sketcher: Entity and Dimension Colours

Posted: Thu Sep 23, 2021 3:13 pm
by Bance
One can change line colour in the view menu, but I think it is global also.

Re: Sketcher: Entity and Dimension Colours

Posted: Thu Sep 23, 2021 3:23 pm
by GeneFC
ideasvacuum wrote: Thu Sep 23, 2021 1:39 pm Is there a way to change the colour of Entities and Dimensions?
If you are talking about making some lines red and some lines green I believe the answer is no. You can change the color scheme as noted by Mario52, but not separately for individual elements.

gene

Re: Sketcher: Entity and Dimension Colours

Posted: Fri Sep 24, 2021 9:37 pm
by ideasvacuum
If you are talking about making some lines red and some lines green I believe the answer is no.
Yup, that's what I hoped to do, for example a domestic pipe layout would use blue for cold water and red for hot :(

Re: Sketcher: Entity and Dimension Colours

Posted: Sat Sep 25, 2021 9:18 am
by chrisb
Inside Sketcher you could use normal geometry and construction geometry - not very smart :roll: .
Outside of Sketcher you could use one sketch for hot and another for cold water and set the line color.

Re: Sketcher: Entity and Dimension Colours

Posted: Sat Sep 25, 2021 10:07 am
by thomas-neemann
ideasvacuum wrote: Thu Sep 23, 2021 1:39 pm
is that a possibility?


https://www.youtube.com/watch?v=6kbuJb2JMFA


phpBB [video]


1157.FCStd
(7.5 KiB) Downloaded 31 times

Re: Sketcher: Entity and Dimension Colours

Posted: Sat Sep 25, 2021 1:55 pm
by ideasvacuum
chrisb wrote: Sat Sep 25, 2021 9:18 am Inside Sketcher you could use normal geometry and construction geometry - not very smart :roll: .
Outside of Sketcher you could use one sketch for hot and another for cold water and set the line color.
That sounds interesting, but would I lose the parametrics between those Objects if in separate Sketches - I see can reference an edge from another Object so maybe I just answered my own question. There are of course other separate items that would have their own colours too (but I have used the normal v construction geometry trick just to roll-off a print - and FreeCAD printing is far better than other systems I have used).

I think I can pick a line from one Sketch to use as reference in another, but with up to six Sketches I think it could get messy, especially if a line referenced in that way gets deleted/trimmed/re-orientated. ZW3D has this facility and indeed it does get very problematical if the geometry is complicated.

Re: Sketcher: Entity and Dimension Colours

Posted: Sun Sep 26, 2021 2:23 am
by TheMarkster
You cannot change individual edges in the same object to different colors, but you can change the face colors. So what is needed is a convenient way to convert the edges to small faces. To do this create a small circle in another sketch or you can also use a part workbench circle primitive. Make the radius very small, something like 0.25mm. The circle should be centered on the origin. Select the circle sketch, and then select the other sketch and run the macro. It sweeps the circle on every edge, creating a small cylindrical face. You can then apply the colors to those faces.

But the object produced is not parametric. You would need to run the macro again if changes are made, and go through the process of also setting the colors again. You can make it parametric by editing line #12 PARAMETRIC = True. This is slower because it retains the sweeps as individual document objects. But you will be able to set the sweeps' face colors individually (very tedious because the dialog must be dismissed with each color change) and they will retain that color if you change the sketch as long as it is only a dimensional change and not deleting or adding edges.

If you set the object produced's display mode property (view tab) to shaded you will not see the seamlines.

To set the colors, right click the object in the tree, choose set colors from the menu.
Snip macro screenshot-467eb9.png
Snip macro screenshot-467eb9.png (34.46 KiB) Viewed 1838 times