Selecting & Colouring Edges using Scheme
EDIT: Apologies, I selected the wrong forum when posting, can this be moved please?
I'm trying to automate some of the visualization checks we perform before running a simulation. This includes colour-coding some edges and zones. However I'm having some issues finding/figuring out the functions to call. I'm new to scheme and fluent, so please understand I may be looking at the wrong areas. First Issue: setting edge colour. The only way I've found to set specific edge colours was to record the journal of the clicks to manually set it. However, this results in sometimes the colour not applying to the edge. Adding a (cx-pause) guarantees that it's applied, however this has an obvious fault. I would have figured the /display/update-scene/display function would be able to set edge colour, as this seems to be the function that emulates the form used to set colours, but it doesn't. Code:
(define (set_edge_color name_filter edge_r edge_g edge_b edge_t is_edge) Code:
;display new zone Any input/suggestions would be greatly appreciated! |
In the spirit of not abandoning a thread. I've figured out the solution to one of the issues. After inspecting several functions related to surfaces I finally found the following:
Code:
(cx-store-surface-desc-attr (cx-get-surface surface_id) edge-color|face-color (1 0 0 0)) The colors are percentages of 255 and in order r g b trans This can set edge or face color easily enough. Now to figure out how to display faces properly... |
what is ~% in your code? What is functionality of this expression?
Code:
(display (format #f "Displaying ~a~%" elem)) May be you should make a loop to go though the whole list and execute calling function each time? best regards |
~% just causes a new line to be appended to the displayed string.
|
All times are GMT -4. The time now is 02:36. |