Commit Graph

10856 Commits

Author SHA1 Message Date
balazs-bamer
bb6620aa85 Fix: edges of a solid can be used as surface input
Edges of a solid can be used as surface input. The real subName is
passed instead of the constant 'Edge1'
2017-04-17 16:20:44 +02:00
balazs-bamer
dd6775e0f2 Curve validation is done in a common ancestor of App and GUI
Curve validation is done in a common ancestor class of Surface::BSurf
and SurfaceGui::CmdSurfaceBSurf
2017-04-17 16:20:44 +02:00
balazs-bamer
e47e22e395 Check for null shape before calling ShapeType
Check for null shape before calling ShapeType
2017-04-17 16:20:44 +02:00
balazs-bamer
073749e931 Unhide surface props and set the filltype to read-only in data tab
I made the surface property (FillType and boundary) default again.
Status bit 2 is set on fill type to hide it in data tab.
2017-04-17 16:20:44 +02:00
balazs-bamer
ef27ba2c8a allow wires as surface input
Now an arbitrary mixture of edges and wires can be used as input.
However, the total count of edges together with the wire members
can only be 2, 3 or 4.

For some reason, wires do not work in Python script:
test1.BoundaryList = [(Draft.upgrade([bs1a, bs2a]), 'Wire1')]
yields an empty BoundaryList
2017-04-17 16:20:44 +02:00
balazs-bamer
4e2eede777 try to convert non-b-splines into b-splines; further parameter check
Non b-spline curves are converted into b-splines if possible.
This means circles, lines etc are allowed.

Further parameter checks prohibiting surfaces being accepted as input.
2017-04-17 16:20:44 +02:00
balazs-bamer
85c3aa10c1 Surface properties are hidden
Surface properties are now hidden. Read-only made creation
2017-04-17 16:20:44 +02:00
balazs-bamer
972e024174 PropertyEnumerator for fill type
Fill type is now of type PropertyEnumerator, allowing enumerated names
in the Data tab. However, it has 2 problems:
1. Invalid shows up
2. The user has the illusion to see the result after changing the value.
However, the result gets updated only
2017-04-17 16:20:44 +02:00
balazs-bamer
3d70ef9ab7 Corrected feature property names
aBList -> BoundaryList
filltype -> FillType
2017-04-17 16:20:44 +02:00
balazs-bamer
3bceb867b7 Surface icon in the object tree
Bezier- and b-spline surfaces now have a surface icon in the tree.
2017-04-17 16:20:44 +02:00
balazs-bamer
901ff4a211 Warning for surfaces with 2 edges only
If the user creates a surface from 2 edges, a warning dialog appears.
Some refactoring in Command.cpp to make it simpler.
2017-04-17 16:20:44 +02:00
balazs-bamer
f47dbb54da Cancelling the just created surface deletes it
Now if the user creates a surface, the cancel in the widget deletes it.
If an already existing one is opened for editing, cancel rejects the
user change in fill type, but the surface remains.
2017-04-17 16:20:44 +02:00
balazs-bamer
512671b1e2 Unified UI for Bezier and b-spline surfaces
I have unified the user interface for Bezier and b-spline surfaces.
Based on the selection contents the CmdSurfaceBSurf::isActive method
determines which one can be created, and marks it for the activate
method.

For any sort of inappropriate selection contents, including foreign
shapes or mixture of Bezier and b-spline curves, the tool remains
disabled.
2017-04-17 16:20:44 +02:00
balazs-bamer
23067d60f2 Cancel by fill type edit did not work
After clicking Apply the old fill type was overwritten and canceling the
whole edit did not revert the fill type into the original value.
2017-04-17 16:20:44 +02:00
blobfish
a7ff0786ea use taskbox in taskdialog 2017-04-17 16:20:44 +02:00
blobfish
ab37648977 header clean up 2017-04-17 16:20:44 +02:00
blobfish
7ae5dbde01 createFace function signature 2017-04-17 16:20:44 +02:00
blobfish
9c632cdf22 task widget based from qwidget instead of qdialog 2017-04-17 16:20:44 +02:00
blobfish
2ff65140e1 task flow
synchronize fill types on setEdit
    finishing up command
    make activate for commands similar
    don't call execute directly
    remove unneeded update calls
2017-04-17 16:20:44 +02:00
blobfish
9a11431b73 class hierarchy and macros 2017-04-17 16:20:44 +02:00
balazs-bamer
254aa167e4 Dialog with radio buttons for choosing Bezier and b-spline surface fill type
A regular common dialog with apply, cancel and OK buttons allowing
surface fill type selection for Bezier and b-spline surfaces.

The Bezier and b-spline surface functionality now seems to be complete.
2017-04-17 16:20:44 +02:00
balazs-bamer
06645251ad diagnostics
Some diagnostics to let me see what happens
2017-04-17 16:20:44 +02:00
balazs-bamer
c88fe0edc0 One more experiment
No success yet
2017-04-17 16:20:44 +02:00
balazs-bamer
6d35abbf74 One step towards the dialog
Problem registering the own ViewProvider
2017-04-17 16:20:44 +02:00
balazs-bamer
71e37ef75b Next try for showing dialog
Does not work yet.
2017-04-17 16:20:44 +02:00
balazs-bamer
7a28d5de8b fill type radio buttons - incomplete
I tried to implement a dialog with fill type radio buttons, but no
success yet.
2017-04-17 16:20:44 +02:00
balazs-bamer
7b090bcc5e Bezier and B spline cleanup, fixed B spline error
I have made further cleanup in Bezier and B spline surface code, and
corrected the bug in face creation for B splines (Nate has also written
that that was incomplete).
2017-04-17 16:20:44 +02:00
balazs-bamer
1037cce62f B-spline surface operation enabled
I have converted Nate's b-spline generation to use my superclass
FeatureBSurf and added it to the GUI. Other half-ready operations as
filling and cut are commented out.

Missing:
- the fill type must be queried from the user. The data panel lets it
modify, but it is not user-friendly.
- b-spline surface is generated, but it covers only a fraction of the
supporting curves. It may lie on OCC error.
2017-04-17 16:20:44 +02:00
balazs-bamer
f85011c869 Bezier surface: check selected objects
As the GUI selection changes, the Bezier surface tool avaibility is
always updated, so it is active if and only if 2-4 Bezier curves are
selected.
2017-04-17 16:20:44 +02:00
balazs-bamer
fbef2d7ced cleanup: fill type into superclass
Fill type translation gets into superclass BSurf
2017-04-17 16:20:44 +02:00
balazs-bamer
8b7a661cf6 Refactor and cleanup: FeatureBezSurf
Refactored and cleaned up code for FeatureBezSurf and created a new
common ancestor class for this and FeatureBSplineSurf.
2017-04-17 16:20:44 +02:00
balazs-bamer
6461e94467 WMayer's fix: subshape copy
The subshape is copied to prevent the wire tool from modifying it. This
lets the user modify any supporting Bezier curves and the Bezier surface
will follow them.
2017-04-17 16:20:44 +02:00
balazs-bamer
7aad0598a9 Fix build failures on Windows by WMayer
Patch request from WMayer to fix build failures on Windows.
2017-04-17 16:20:44 +02:00
balazs-bamer
8bbec39c70 Transformed Bezier curves work now
One gets the curve and the location from the healed wire. However, the
curve has the original coordinates, the transformation the user used to
obtain it need to be applied before adding it to the surface builder.
2017-04-17 16:20:44 +02:00
balazs-bamer
16eb3f74eb Specify edge name correctly
PropertyLinkSubList does not work without a correctly specified edge name.

Signed-off-by: balazs-bamer <kolaloka@freemail.hu>
2017-04-17 16:20:44 +02:00
balazs-bamer
d3e12636b0 Let the Surface workbench appear and try to create a Bezier surface
Modifications for:
 - let the surface workbench appear
 - use only one Surface menu and toolbar instead of two separate ones
 - create a Bezier surface using 2..4 Bezier curves (does not work yet)
 - use enums for fill type

Signed-off-by: balazs-bamer <kolaloka@freemail.hu>
2017-04-17 16:20:44 +02:00
NateAM
59fe379f5a Added Surface module
I have added Nate's SurfaceTools module with the name changed to Surface in all files and filenames.
2017-04-17 16:20:44 +02:00
wmayer
a3be7248ac fix segmentation fault in TaskFeaturePick::makeCopy 2017-04-17 11:07:54 +02:00
Yorik van Havre
30188fec9e Moving Arch BIMServer, Arch Git and Web Sketchfab to new external WebTools workbench 2017-04-16 16:37:25 -03:00
Yorik van Havre
a3154480ff Draft: Clones now adopt color/transparency of their cloned objects on creation 2017-04-16 15:37:34 -03:00
Yorik van Havre
f7d9d66448 Arch: Allow to set which wire cuts the hole in Arch Windows 2017-04-16 14:54:59 -03:00
Yorik van Havre
a397f6a412 Draft: Adding missing stuff from last commit 2017-04-16 14:09:57 -03:00
Yorik van Havre
404b5da5d9 Draft: Finally fixed Draft UI focus bug - fixes #2810 2017-04-16 14:07:15 -03:00
Yorik van Havre
f2fb31a432 TechDraw: Fixed scaling of Draft/Arch views 2017-04-16 13:51:34 -03:00
Yorik van Havre
a3c0606530 Arch: Support for Panels based on other shapes in PanelCut 2017-04-16 13:13:14 -03:00
Yorik van Havre
9ce60ba553 Draft: Fixed weaknesses in Draft Edit command 2017-04-16 12:18:21 -03:00
wmayer
7a97e815c1 when removing faces in thickness tool via context menu then remove selection gate 2017-04-15 13:29:19 +02:00
wmayer
e96aafd6e1 do not use translated text for icon names 2017-04-15 12:58:35 +02:00
wmayer
d6214383ce readd removed preferences icon for sketcher 2017-04-14 11:57:17 +02:00
Yorik van Havre
0f1b6af20c Arch: Fixed support of v/vt/vn notation in OBJ importer 2017-04-12 20:30:38 -03:00