Hi,
I need to do a personal widget to scale a figure with previous conditions. Is complicated to me to start this and I will be grateful if you can help me.
I need to do something similar to the original scale function, but I need to calculate previously the factor to be the figure scaled. I will to try to explain that.
I have a figure with wrong millimeters, but i know some real measures. I need to measure one line that I know his real measure and scale this figure with a calculate factor (real measure / draw measure).
I don’t need to see the measure of the drawned figure, I only need this process:
- Select the figure to be scaled.
- Execute personalized scale command or widget.
- Ask me about take measure and take the measure of the draw line.
- Ask me about real measure.
- (Optional) Select the focus point.
- Scale the draw applying the factor (real measure / draw measure).
There is something that help me to do the first step on this.
I hope I explained well.
Many thanks.
Personalized scale widget or command
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: Personalized scale widget or command
Just curious! QCAD has already a tool to accomplish that task. What is the reason to invent the wheel again?sinase wrote: ↑Mon Mar 22, 2021 5:18 pmI don’t need to see the measure of the drawned figure, I only need this process:
- Select the figure to be scaled.
- Execute personalized scale command or widget.
- Ask me about take measure and take the measure of the draw line.
- Ask me about real measure.
- (Optional) Select the focus point.
- Scale the draw applying the factor (real measure / draw measure).
Work smart, not hard: QCad Pro
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Win10/64, QcadPro, QcadCam version: Current.
If a thread is considered as "solved" please change the title of the first post to "[solved] Title..."
Re: Personalized scale widget or command
Hi,
I was asking about scale tool but with some particular modifications that facilitate and automate the user's work.
The principal difference, i don't know the measure of the drawed figure when i am executing the scale action. CVH give me an idea to take this measure and save on a variable. It works when i am working with the command line but i can't do this action in scale text box (that last option it would be perfect for me). I can do this:
- Take a measure with command line. - I have the measure on "d1" variable. - Scale action.
Sorry if i asking something repetitive, but is it possible to execute all the scale action only with command line? For example, in this case, something like this "scale 100/d1".
Many thanks.
Regards.
I was asking about scale tool but with some particular modifications that facilitate and automate the user's work.
The principal difference, i don't know the measure of the drawed figure when i am executing the scale action. CVH give me an idea to take this measure and save on a variable. It works when i am working with the command line but i can't do this action in scale text box (that last option it would be perfect for me). I can do this:
- Take a measure with command line. - I have the measure on "d1" variable. - Scale action.
Sorry if i asking something repetitive, but is it possible to execute all the scale action only with command line? For example, in this case, something like this "scale 100/d1".
Many thanks.
Regards.
Re: Personalized scale widget or command
Thank you for the answer, could you help me with a simple example of that please?
I would need,
(1) ask me to take a measure and save on a variable (d1)
(2)ask me to write the real measure and save on other variable (d2)
(3) ask me to select the elements that i need to scale with a factor d2/d1
(4) scale and delete the original elements.
I know that the QCAD scale function do this but i need to automatizate the proccess the maximum possible to aviod user's mistakes.
Is there a similar example that it help me?
Many thanks!
Regards.
I would need,
(1) ask me to take a measure and save on a variable (d1)
(2)ask me to write the real measure and save on other variable (d2)
(3) ask me to select the elements that i need to scale with a factor d2/d1
(4) scale and delete the original elements.
I know that the QCAD scale function do this but i need to automatizate the proccess the maximum possible to aviod user's mistakes.
Is there a similar example that it help me?
Many thanks!
Regards.
Re: Personalized scale widget or command
Hi,
Yes, about any method that requires a selection, a picked entity and a picked point is an example.
In the line of common QCAD methods:
- Make selection. (Method requires selection)
- Activate tool.
- Select focal point.
- Select reference entity to get its length.
- Display dialog for real measurement.
When complied to dialog:
>> Uniform scale selected by factor in regards with the focal point.
>> Update entities.
State 1 = SettingPos (PickCoordinate)
State 2 = ChoosingEntity (PickEntity)
State 3 = dialog
What comes close qua states:
- LineOrthogonal.js, a specific case of LineRelativeAngle.js
- Offset.js
...
Regards,
CVH
Yes, about any method that requires a selection, a picked entity and a picked point is an example.
In the line of common QCAD methods:
- Make selection. (Method requires selection)
- Activate tool.
- Select focal point.
- Select reference entity to get its length.
- Display dialog for real measurement.
When complied to dialog:
>> Uniform scale selected by factor in regards with the focal point.
>> Update entities.
State 1 = SettingPos (PickCoordinate)
State 2 = ChoosingEntity (PickEntity)
State 3 = dialog
What comes close qua states:
- LineOrthogonal.js, a specific case of LineRelativeAngle.js
- Offset.js
...
Regards,
CVH