Snap problem, entities inside block
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Junior Member
- Posts: 19
- Joined: Thu Nov 29, 2012 4:28 pm
Snap problem, entities inside block
Hi
I have a problem with snap on entities inside a block reference. It seems it cannot sense centers, midpoints etc of geometry inside references.
If I cut+paste the blockrefs in a new document it works without problem.
In attachment, the incriminated drawing.
I don't have the problem with other drawing, but I can't say what's the difference between them.
I run on QCad 3.0 on Windows 7 (the same with 3.0.8 ).
I have a problem with snap on entities inside a block reference. It seems it cannot sense centers, midpoints etc of geometry inside references.
If I cut+paste the blockrefs in a new document it works without problem.
In attachment, the incriminated drawing.
I don't have the problem with other drawing, but I can't say what's the difference between them.
I run on QCad 3.0 on Windows 7 (the same with 3.0.8 ).
- Attachments
-
- test snap.dxf
- (52.11 KiB) Downloaded 808 times
Re: Snap problem, entities inside block
Hello,
I stumbled on the same problem. I don't recall noticing that with the previous version 2.2.2.0
JJ
I stumbled on the same problem. I don't recall noticing that with the previous version 2.2.2.0
JJ
Re: Snap problem, entities inside block
Is this an original drawing by you in QCAD or is it originally from another source?mariosboarina wrote:In attachment, the incriminated drawing.
-
- Junior Member
- Posts: 19
- Joined: Thu Nov 29, 2012 4:28 pm
Re: Snap problem, entities inside block
It is the export of an annotation view froma a 3D CAD.
(I verified arcs to be arcs and Z coordinates to be 0)
(I verified arcs to be arcs and Z coordinates to be 0)
Re: Snap problem, entities inside block
My observation was with one of my own drawings. This seems to happen mostly with ref points on circles...
-
- Junior Member
- Posts: 19
- Joined: Thu Nov 29, 2012 4:28 pm
Re: Snap problem, entities inside block
Ok, it seems reasonable, but in some way the most of drawings don't have this problem.
For example, see attached drawing, in which snaps works perfectly from outside blockRefs: So, there is somehow a way to access snap points in subentities without exploding blockRefs.
Maybe some script lines that regenerate entities representation or other internal entities data (hoping it was a problem of scene/view representation, I've tried with rebuildSpatialIndex() without success...)
It would be nice to work out a solution, since exploding a block in order to snap its entities it's a big work related to the simple purpose of selecting a point (it involves modifing the drawing strucutre, which has to be restored in a second moment).
For example, see attached drawing, in which snaps works perfectly from outside blockRefs: So, there is somehow a way to access snap points in subentities without exploding blockRefs.
Maybe some script lines that regenerate entities representation or other internal entities data (hoping it was a problem of scene/view representation, I've tried with rebuildSpatialIndex() without success...)
It would be nice to work out a solution, since exploding a block in order to snap its entities it's a big work related to the simple purpose of selecting a point (it involves modifing the drawing strucutre, which has to be restored in a second moment).
Re: Snap problem, entities inside block
J-J wrote:My observation was with one of my own drawings. This seems to happen mostly with ref points on circles...
My understanding is that when a block is created a block 'reference point' is created at this time and becomes the main reference point for the block!
When a block is created including circles/arcs all the entities are 'grouped' together and 'locked' including the references for the arcs, however snapping to the endpoints/mid points of line entities should still be available, but in order to snap to the reference points of Arcs and Circles - the block will need to be exploded first to 'un-group' everything and thereby releasing the reference points again for the arcs and circles.
Re: Snap problem, entities inside block
To my understanding your example shows clearly what I was explaining in my response to J-J - that you cannot snap to the ref points of arcs/circles in a block, but you should be able to snap to end points etc... to line entities.mariosboarina wrote:Ok, it seems reasonable, but in some way the most of drawings don't have this problem.
For example, see attached drawing, in which snaps works perfectly from outside blockRefs:
Re: Snap problem, entities inside block
Hi Clive,
That's right, all other entities are recognized except circles and arcs. I checked this behavior in 2.2.2.0, same thing.
That's right, all other entities are recognized except circles and arcs. I checked this behavior in 2.2.2.0, same thing.
-
- Junior Member
- Posts: 19
- Joined: Thu Nov 29, 2012 4:28 pm
Re: Snap problem, entities inside block
Sorry, perhaps one thing I didn't mention : I'm not using Auto snap mode, but instead I activate Center mode before selecting.
In fact with Autosnap I can replicate J-J behaviour; instead, using Center snap, I have some drawings which snap to centers and some which doesn't.
With Center snap active, in the last example file I've no problem to snap to circles' center from outside blocks; all entities are recognized to my QCad with this drawing. This does not happen with the first drawing, in which I can't.
So I'm speaking of selecting centers when Qcad is in SnapCenter mode. It's not a bad matter in fact if, with Auto snap mode, block reference points and line ends (rightly) have precedence over (and therefore do mask) centers.
So, in short, my initial problem still remains:
I have 2 drawings: in the 1st I can't snap centers inside blocks (in Center snap mode) whereas in the 2nd drawing I can do it; the 2 drawings have different behaviour and I can't guess which is the difference between them. If I cut+paste the problematic block in a new drawing the problem disappears: so it's a problem specific to the drawing (which in fact comes from outside cad).
As a user it's not a big deal (keyboard BD, slect block and then snap to center, then keyboard EM: and I'm still into my main command with my center selected!).
Sorry for taking it long: I really know it's not a big problem for a designer, but I'm developing a mechanism simulation application in which selections will be 80% arc centers inside blocks and I solving this problem would dramaticaly speed up the user interaction. Also I feel (having drawings without this problem) that likely there is a solution.
In fact with Autosnap I can replicate J-J behaviour; instead, using Center snap, I have some drawings which snap to centers and some which doesn't.
With Center snap active, in the last example file I've no problem to snap to circles' center from outside blocks; all entities are recognized to my QCad with this drawing. This does not happen with the first drawing, in which I can't.
So I'm speaking of selecting centers when Qcad is in SnapCenter mode. It's not a bad matter in fact if, with Auto snap mode, block reference points and line ends (rightly) have precedence over (and therefore do mask) centers.
So, in short, my initial problem still remains:
I have 2 drawings: in the 1st I can't snap centers inside blocks (in Center snap mode) whereas in the 2nd drawing I can do it; the 2 drawings have different behaviour and I can't guess which is the difference between them. If I cut+paste the problematic block in a new drawing the problem disappears: so it's a problem specific to the drawing (which in fact comes from outside cad).
As a user it's not a big deal (keyboard BD, slect block and then snap to center, then keyboard EM: and I'm still into my main command with my center selected!).
Sorry for taking it long: I really know it's not a big problem for a designer, but I'm developing a mechanism simulation application in which selections will be 80% arc centers inside blocks and I solving this problem would dramaticaly speed up the user interaction. Also I feel (having drawings without this problem) that likely there is a solution.
-
- Junior Member
- Posts: 19
- Joined: Thu Nov 29, 2012 4:28 pm
Re: Snap problem, entities inside block [SOLVED (workaround)
Finally, I almost found out what's the matter!
Sure I found out a difference between the 2 drawings I attached: origin of blocks in the problematic drawing is different from (0,0) and I think this is not somehow contemplated by Snap algorithm (or perhaps it makes some noise over it or over some spatial indexing, I don't know).
Anyway: resetting origin of block to (0,0) do actually solve my original snap problem.
I posted, in developers section, a workaround to reset origin of all blocks in the drawing (viewtopic.php?f=30&t=2332): applied to a drawing it makes snaps work.
Sure I found out a difference between the 2 drawings I attached: origin of blocks in the problematic drawing is different from (0,0) and I think this is not somehow contemplated by Snap algorithm (or perhaps it makes some noise over it or over some spatial indexing, I don't know).
Anyway: resetting origin of block to (0,0) do actually solve my original snap problem.
I posted, in developers section, a workaround to reset origin of all blocks in the drawing (viewtopic.php?f=30&t=2332): applied to a drawing it makes snaps work.