News:

The purpose of these forums is to discuss TurboCAD.  Please keep the discussion of other products to compatibility issues or how the other software can be used with TurboCAD.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Underlays, Viewports and a Scaling Problem - RedSDK & GDI

Started by NiSiWi, January 11, 2017, 11:46:48 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

NiSiWi

Firstly RedSDK (the advanced TC 2D and 3D rendering engine) cannot be used for this job ... (well most any job really).  This is the case because:

Viewports cannot be displayed as transparent, they always show the white paper meaning you cannot overlay them onto an underlay so I'm forced to use the GDI engine.
Now that I've got that off my chest (again) .... lets begin with the underlay and scaling problem.

Basically I'm trying overlay a piece of a drawing (viewport) onto a pre-scaled OS map generated as a scaled PDF document (underlay).
The map is a scaled 1:500 drawing from OS which I import as an underlay into TC.

Firstly I notice that when an underlay is placed on paperspace it appears at the upper most drawing level despite it being an underlay.  So I used Tools > Draw Order to shift it to the back.

I set the paperspace printing scale to 1:1 meaning that whatever viewport I place on the paperspace (if not rescaled) should be full scale, which is no good as it won't print / fit on the paperspace.

So in this instance I want 1:500 to match the underlay, so I place the viewport and rescale it to 1:500 - I know the viewport scale should be correct as other paperspaces with similar viewports roughly scale up correctly when they print.

Now I realise that my 1:500 underlay and the 1:500 viewport don't match.  If I convert from PDF to DXF I have the same problem.
So any clues/tips how I scale the underlay correctly ?
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

NiSiWi

#1
My first idea is to measure the scale on the imported PDF / underlay (assuming 1:1 scale of underlay) - then I can work out a rescaling factor - however measuring the scale is a bit tricky so there is some manual lining up required.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

NiSiWi

#2
So now I start to see problems working with images in TC even in GDI mode.
I'm simply trying to measure a piece of the graphics which I have to do manually as snapping to vectors in the PDF does not work, however I don't know what to believe as every zoom level repositions the dimensions and the anchor points relative to the image and paperspace.  The same anchor point and final dimension are different at every level of zoom.  How can I accurately measure this.
See attached images ???
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

RCFlyingKnight

#3
Odd thing to happen since everything is placed and does not move with zooming.

I tried it in both RedSDK and GDI mode and the dimension point stayed at the corner.  I use an image pdf and a vector underlay (snaps would work on vector) and manually placed it.

Did your view to workplane get skewed?

Matthew

Edit: snaps are useless with pdf underlays as the snap doesn't go to the corner of the line -.003 on the x and -.001 on the y (per trial) and different on another corner.  It could be TC or how primo Pdf read and printed it?

NiSiWi

I certainly don't have this problem with any element drawn within TC, just the underlay PDF - which kinda makes the underlay useless.

Did you try this in paperspace (not model view) Matthew ?

I don't believe there are workplanes in paperspace, other than the 2D paper.

As its paperspace I can't use RedSDK as I cannot overlay a viewport onto an underlay with RedSDK (see my previous post) so I'm forced to use GDI.

Edit: I also tried this in modelspace and made sure the workplane was set correctly and I got exactly the same result with the floating anchor and text dimensions against the PDF underlay with GDI mode ???   If I convert the PDF to a vector the site drawing plan loses its relationship with the scale on the document so that also won't work.  I need to use a graphic underlay to ensure the integrity with its scaling.  I also tried the underlay in RedSDK and guess what .... dimension and anchor stable, however if I rescale (down, not up) the PDF becomes totally unreadable .... and I can't use RedSDK anyhow because of the viewport overlay issue ?????

I've seen this before though with some of the community not having the problem I experience, whilst others do.

I'm about to fire another rocket at the IMSI devs.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

RCFlyingKnight

Sorry missed that you were using paper space.......

So I did everything I did before in paper space and got the same results.

Also observed, RedSDK doesn't update the underlay when zooming as cleanly as GDI does even after you press F5.

Matthew


NiSiWi

Well, I got a reply from TC:

Why don’t you just put the underlay on the model space? I have never heard of anyone putting an underlay on the paper space.

Also the Underlay does not come in at any specific scale. If you know the size sheet the underlay is you should use the inspector bar size field to make it that size so you know the scale is correct. I would then scale it by 500 and draw on it in a 1:1 scale and then do a viewport  and insert it on the paper space.

Travis Fleenor
Product Training Coordinator

---

Here is my reply:

Ok let’s say I use the model space Travis.

I realise the underlay does not come in a specific size, however given that the PDF is a scaled drawing from OS if I set the size to 1:1 it should be the same size (or very close) as the TC drawing, given that its a 1:1 model, however it’s not ?

I know the scaled drawing is correct as when I print it out and measure the components and rescale them they are roughly correct so why is the scaling of the underlay incorrect in TC.

For TC I had to rescale the original scale of the PDF underlay by a factor of 2.5225 which I determined by measuring the scale on the underlay (good job it has a scale) to establish a ratio ?

Now, the next problem :-)
Some elements in model space don't (no matter if you send the underlay to the back and bring the elements forward) show overlayed onto the overlay ??????

Please forgive my frustration, however the user experience is not great with TC at the moment.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

Alvin Gregorio

#7
Quote from: NiSiWi on January 14, 2017, 02:39:39 AM
...
Some elements in model space don't (no matter if you send the underlay to the back and bring the elements forward) show overlayed onto the over[Under]lay ??????
...

Have you tried putting the Underlay on a Layer with a lower Layer Order than that of the Layers which you want to draw your other stuff on?

Example:
>Create a Layer that is "Underlay-1", and set its Layer Order to "0".
>Then all your other Layers-- including Layer-0 and $CONSTRUCTION Layers-- would have a Layer Order assigned that is "1" or higher.

Should work.  I'm curious if it does.



[Edit]  Along the same theory, if the above doesn't work, another thing to try is to move the inserted Underlay to a Z-value that is less than "0".  That is, a Z-value that is lower than the stuff you want to draw on top of it.
    --Just another workaround suggestion...
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

NiSiWi

Yes, thats how I designed it Alvin (underlay on a separate layer) using a $ prefix (top of tree).  I also tried giving the other layer (overlay) a higher order no and I moved the underlay to a -Z value and ...... it makes no difference I'm afraid.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

NiSiWi

The elements that are not showing through are some (not all) 3D ?
The only way to get this to work is to draw a 2D polygon where the 3D elements should be ????

The last problem is moving the underlay causes the underlay to overlay all other elements making it very tricky to position it as you cannot see the other TC elements.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

Torfinn

That is why i always try to explode the underlay pdf, if it is raster i just use ctrl+z to bring it back again.
If it is vector i can insert one more time if i want the colour, messurement or similar.

When i should place the underlay correct i use two big circles, 1 at a spesiffic point of the drawing, the other at the point that match on the pdf, Select the pdf and circle, set refpoint to the center of the cirkle and then snap on center of the othe circle, most of the time i get it correct in first attempt.

Else the Generic Transformation is a nice tool to use, then you can rotate and scale it in the same time if you need to.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

Andy H

Its tough to do a proper test without the same underlay (but obviously you can't supply it as that would be against the OS licence)

I can't answer as to any cure, but just posting to say I can confirm and replicate your findings using a pdf underlay.

As far as 'fuzzy' underlay, it's only refreshing to that zoom level, what seemed to work for me, was zoom way in, press F5 to refresh, and it then seems ok at other zoom levels providing I then don't alter the underlay in any way, objects not refreshing properly does seem to be a problem with RedSDK, not just with underlays.

With the missing objects, its having problems with some items like walls, slabs (though OK with roof slab for some reason), rails etc., its ok for me with 2D, Acis and TC surfaces or exploding the pdf or the objects, but I realise none of this is of any help, so just posting in case IMSI think its just your system.

Tested using RedSDK only

NiSiWi

Thanks Torfinn.  Whilst exploding (to vector) made it much simpler to move and I could also snap to vectors in the exploded underlay (i.e. move ref points to a relative position and place on drawing) I'm not sure how CtrlZ (undo) would work as it would reverse all previous steps, including the repositioning ??
However what I did was use the original raster and move the reference point on the underlay to a logical reference point on the drawing and snapped it to the same location which worked.

Thanks for confirming Andy.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

Torfinn

You'r welcome

The ctrl+z is just if everything dissapear and you are left with only a frame after explode, then the pdf is not very useful :)

You should also know that sometimes there is "Hatch" inside the pdf's and for some reason many like to make it with spline's, TC dont like that as there will be to many and TC will work like moving in old syrup, then this splines has to be deleted and TC work like normal again.
Earlier we could use "Select by Entety type"/ "Splines", but some genie's have figured out that we dont need that option anymore.
There is now SDK Splines available, maybe it work, never tested.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

NiSiWi

Now that I have my design overlayed onto the OS Map underlay I generated a viewport which I placed into paperspace.
Looks fine, however it won't print.
Any idea how I get the underlay to print ?
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

NiSiWi

For some unknown reason its now started printing the underlay ? however dimensions are illegible.
Any tips on improving the quality of generated PDF's ?

Edit: Resolved it by increasing the Page Setup > Rendering to 600dpi.
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

NiSiWi

Nope, resolution now OK, however I'm now getting a RedSDK error when printing (I believe its triggered by the page set to render for print only) ?

Edit: I resolved it by replacing the viewport with the same viewport ??
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

NiSiWi

Travis from IMSI finally resolved the scaling issue with the following.

Bring in the PDF underlay into TC, insert into model space and then set it to the same size as the original paper using the inspector bar.
In my case it was A4 and I was working in cm units so x=21cm y=29.7cm

Then scale the PDF using the scaling factor on the drawing, again in my case it was 1:500 so x=500 and y=500.

Now you have a 1:1 underlay you can draw over.

And .... I'm using RedSDK (with some workarounds).
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

Torfinn

""
Now you have a 1:1 underlay you can draw over.""

Only if the A4 pdf is printet in correct scale and maybe there was no margins when they did it.
If you dont know anything about the size on the objects inside the pdf, then this guess will be as good as anything else, but it is seldom accurate is my experience.

Torfinn
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB

NiSiWi

Understood Torfinn.
The PDF was generated by OS Map services so the scale has to be correct (or all maps are incorrect) and as its digitally generated it should therefore be relative to the paper size it was generated for.
In my case this proved to be correct as the resizing and scaling factors matched my design almost perfectly.
However I do understand that depending on the source you may need to play about with it - which is why having a scale on the original is always good as a backup :-).
Intel i7-4720HQ 2.6GHz CPU, 32GB RAM, 500GB SSD, Intel HD4600 GPU + NVidia GeForce GTX 970M 3GB GPU
Win 10 64bit
TC2016 Plat

nikkipollard

I agree with Torfinn. My method is usually to dimension a line on the pdf  where I know what the distance should be.
Then take the length that It should be divide by the dimension-ed length ( I use the built in windows calculator) Copy and paste the answer into the x and y scale fields in the inspector bar.
Nikki
TC20 platinum, TC 2015 platinum
TC 2017 with lightworks
TC 2021 platinum
Windows 11 Home 22h