How to see and change Clockwise/CCW orientation of entities?

Use this forum to ask questions about how to do things in QCAD 2.1/2.2.

Moderator: andrew

Locked
dormouse
Registered Member
Posts: 2
Joined: Thu Jan 01, 2009 6:21 pm

How to see and change Clockwise/CCW orientation of entities?

Post by dormouse » Thu Jan 01, 2009 6:36 pm

I see a "dark blue" end of not-closed polyline, so I can distinguish start/end. I need to export .dxf to CAM software which uses DIRECTION of entities to Cutter Radius Compensation left/right on each entity.

But...
1. Lines seems identical (can only manually swap coordinates in editing dialog).
2. Arcs - the same as lines
3. Closed polylines and circles - no solution at all (can't find direction, because "dark blue" coinsides with the starting point).

Please explain me how to make a tool to:
4. See a direction (little sign like an ARROW, parallel to the first polyline segment or line or a colored line endings like unclosed polylines)
5. Change a direction:
5.1. by clicking on lines/unclosed polylines/arcs - swapping begin and end
5.2. by clicking on closed polylines - changing CW/CCW

I think 4. can be only made by a)source code, b) Script which will create new layer with "arrows helpers" near each entity.
I think 5.1, 5.2 easily by scripting (pick an object and change direction. Easy for lines/arcs/ellipses=just swap points/change direction flag)

User avatar
andrew
Site Admin
Posts: 9036
Joined: Fri Mar 30, 2007 6:07 am

Post by andrew » Fri Jan 02, 2009 9:46 am

This is currently not possible with QCAD or with the scripting interface of QCAD. The direction of an entity is in most cases irrelevant for CAD applications.

You might want to have a look at CAM Expert which has some CAM specific functions such as reordering entities and slow motion simulation.

dormouse
Registered Member
Posts: 2
Joined: Thu Jan 01, 2009 6:21 pm

Post by dormouse » Mon Jan 05, 2009 4:57 pm

I've got only 2 solutions at the moment
1. make a "DirectionHelpers" layers and place an arrows on it.
It could be done by hard-coded part or by third-made application using dxflib (open todo.dxf by dxflib->analyse directions, add DH layer->write header, all existing data, additional layer with helpers, tail-> Open out.dxf in qCad). Can you slightly modify main() body from dxflib-2.2.0.0-1.src\test\main.cpp
from testReading(char* file); testWriting();
to testReading(char * file, dxf); testWriting(dxf);

2. Modify and test community qCad and send you a patch (lines and arcs).

P.S. to p.2: Should I do-it-by-myself or qCad team can add "dark blue" squares to line and arc entities (for closed polylines "semi-dark blue" for the SECOND VERTEX could be a solution)?

Locked

Return to “QCAD 2.1/2.2 'How Do I' Questions”